[Gdal-dev] Universal GDAL build on OS-X ??

William Kyngesburye woklist at kyngchaos.com
Fri Oct 26 18:22:24 EDT 2007


On Oct 26, 2007, at 11:53 AM, Christopher Barker wrote:

> William,
>
> Thanks for the detailed answer. I've probably screwed up threading  
> with this message, as our spam filter suddenly got all aggressive  
> and was filtering out all sort of mailing list messages -- I had to  
> go to the web to find this.
>
> I wonder if this should be put up on a Wiki page? It's in the list  
> archive, but the Wiki may be a better place for it.
>
I've been thinking about adding wiki to my site (I'm very behind on  
site software updates).  The info is general and applies to a few  
FOSS GIS packages, so maintaining one copy is easier for me.

>> You probably know about the arch flags needed, -arch ppc -arch  
>> i386,  and the SDK, -isysroot /Developer/SDKs/MacOSX10.4u.sdk.
>
> actually, I didn't know about the isysroot one...
>
Necessary on PPC, not needed on Intel but it doesn't hurt.

>> SO, for GDAL, if you have all other dependencies universal, after   
>> running configure edit port/cpl_config.h and delete the two lines   
>> with WORDS_BIGENDIAN and HOST_FILLORDER, and replace them with:
>> #ifdef __BIG_ENDIAN__
>>    #define WORDS_BIGENDIAN 1
>>    #define HOST_FILLORDER FILLORDER_MSB2LSB
>> #else
>>    #undef WORDS_BIGENDIAN
>>    #define HOST_FILLORDER FILLORDER_LSB2MSB
>> #endif
>
> Is there some way we could automate this so that we could have a -- 
> with-osx-universal flag to configure?
>
> I can just put that in my "run configure" script, but it'd be nice  
> to have it standard.
>
Remember that you must do this patch after configure - configure  
magically replaces #define and #undef lines, so they would both end  
up being the same if cpl_config.h.in was patched.

> A new thought - could you send me whatever scripts you're using to  
> build? It makes more sense for me to just follow what you're doing  
> than re-invent it. (plus it would save me some work ;-)  )

I've been lazy, and do a manual copy-n-paste for GDAL.  On my other  
frameworks I use an Xcode project that takes care of patches.  I was  
using an Xcode project for GDAL, but it's hard to maintain it so I've  
been working on bug reports to get the framework build option in the  
source working good (note that it still has problems with the python  
build - it links wrong and there is no simple way to fix it).


PS: I have a GDAL 1.5 build online - it's not in the "All Frameworks"  
yet, so scroll down on my frameworks page to find it.  I'm working on  
a fresh build, with the python stuff bundled in the framework instead  
of loose on the download dmg, and with the GRASS plugins.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Mon Dieu! but they are all alike.  Cheating, murdering, lying,  
fighting, and all for things that the beasts of the jungle would not  
deign to possess - money to purchase the effeminate pleasures of  
weaklings.  And yet withal bound down by silly customs that make them  
slaves to their unhappy lot while firm in the belief that they be the  
lords of creation enjoying the only real pleasures of existence....

- the wisdom of Tarzan





More information about the Gdal-dev mailing list