[Qgis-developer] Link issues on mac

John C. Tull john.tull at wildnevada.org
Wed Apr 2 15:06:15 EDT 2008


Tom,

I started picking up those errors in my cmake step as well. I have  
added it to my cmake alias for qgis. Currently, this is what I do for  
cmake:

cmake -D CMAKE_INSTALL_PREFIX=/Applications -D GRASS_INCLUDE_DIR=/ 
Applications/GRASS-6.3.app/Contents/MacOS/include -D GRASS_PREFIX=/ 
Applications/GRASS-6.3.app/Contents/MacOS -D CMAKE_BUILD_TYPE=Release - 
D GEOS_INCLUDE_DIR=/Library/Frameworks/GEOS.framework/unix/include -D  
GEOS_LIBRARY=/Library/Frameworks/GEOS.framework/unix/lib/libgeos.dylib  
-D PROJ_INCLUDE_DIR=/Library/Frameworks/PROJ.framework/unix/include -D  
PROJ_LIBRARY=/Library/Frameworks/PROJ.framework/unix/lib/libproj.dylib  
-D SQLITE3_INCLUDE_DIR=/Library/Frameworks/SQLite3.framework/unix/ 
inlcude -D SQLITE3_LIBRARY=/Library/Frameworks/SQLite3.framework/unix/ 
lib/libsqlite3.dylib -D CMAKE_OSX_SYSROOT=/Developer/SDKs/ 
MacOSX10.5.sdk ..

I've not tried building without grass, so have not run into the grass  
issue you mentioned. I use William's frameworks on my Leopard system.

Cheers,
John

On Apr 1, 2008, at 11:16 PM, Tom Elwertowski wrote:
> 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
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer



More information about the Qgis-developer mailing list