[Qgis-developer] Link issues on mac
Tom Elwertowski
telwertowski at comcast.net
Wed Apr 2 02:16:35 EDT 2008
With Xcode 2.5 (Tiger), I get the link to /Library/Frameworks but not to /usr/local; I had to add it myself. With Xcode 3.0 (Leopard), I get links to /Library/Frameworks and /usr/local/lib (but not the rest of local).
I recently acquired a new Mac and also had build difficulties. I edited CMakeCache.txt to get around the problems so I could work on porting code to Qt4.4-Cocoa.
To build qgis quickly on my new Mac, I installed William's frameworks and compiled expat, gsl and postgres myself with installation to /usr/local.
When I run cmake, I get the following message:
CMake Error: This project requires some variables to be set,
and cmake can not find them.
Please set the following variables:
GEOS_INCLUDE_DIR
GEOS_LIBRARY
PROJ_INCLUDE_DIR
PROJ_LIBRARY
I manually set these in CmakeCache.txt to get past the problem.
If I configure without GRASS, I get georeferencer compile errors because gsl headers cannot be found. If I configure with GRASS, the build completes successfully.
georeferencer/CmakeLists.txt contains GSL_INCLUDE_DIR but the definition (-I/usr/local/include) doesn't appear in flags.make. When I manually add it to flags.make, the build succeeds. When configuring with GRASS, the definition still doesn't appear in flags.make but the headers get found anyway. I'm using William's GRASS which isn't in /usr/local.
Tom
William Kyngesburye wrote:
> That happens automatically, behind the scenes, when you use an SDK. The
> problem with the SDKs in Tiger (it's fixed in Xcode 3 for Leopard) is
> that they don't have either /Library/Frameworks or /usr/local symlinks
> to find user libraries and frameworks.
>
> Add those symlinks, and linking (and includes) should start working.
>
> /Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks -> /Library/Frameworks
>
> /Developer/SDKs/MacOSX10.4u.sdk/usr/local -> /usr/local
>
> On Apr 1, 2008, at 7:57 PM, Tim Sutton wrote:
>
>> Hi Tom & William (and anyone else who may know)
>>
>> I resinstalled my macbook yesterday and am compiling qgis against hand
>> built libs now. The same procedure worked fine on my imac at work but
>> here I get lots of errors like this when linking libqgis_core:
>>
>> ld: warning can't open dynamic library:
>> /Developer/SDKs/MacOSX10.4u.sdk/usr/local/qgis_universal_deps/lib/libproj.dylib
>>
>> referenced from: /usr/local/qgis_universal_deps/lib/libgdal.dylib
>> (checking for undefined symbols may be affected) (No such file or
>> directory, errno = 2)
>>
>> Do you know why its concatenating that /Developer/SDKs/MacOSX10.4u.sdk
>> onto the front of my lib paths? As always any hints will be most
>> appreciated.
>>
>> Many thanks
>>
>> Regards
>>
>> --
>> Tim Sutton
>
> -----
> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> http://www.kyngchaos.com/
>
> [Trillian] What are you supposed to do WITH a maniacally depressed robot?
>
> [Marvin] You think you have problems? What are you supposed to do if
> you ARE a maniacally depressed robot? No, don't try and answer, I'm
> 50,000 times more intelligent than you and even I don't know the answer...
>
> - HitchHiker's Guide to the Galaxy
>
>
>
More information about the Qgis-developer
mailing list