[Gdal-dev] gdal and mac

Eric Dönges eric.doenges at gmx.net
Mon May 9 10:11:55 EDT 2005


Am 09.05.2005 um 15:32 schrieb Frank Warmerdam:

> My concern with Frameworks is that it isn't an "out of the box"
> style install and it may be difficult for me to support if it puts
> stuff in odd places, and requires different rules to link against.
> Will you be fixing up gdal-config to return correct information?

Actually, frameworks are IMO more "out of the box" on MacOS X than 
installing
to /usr/local/ ever could be. The only thing wrong with frameworks is 
that you
need to know at compile time where you are going to be installing the 
framework
if it's not going to be one of the "standard" locations, i.e. if you 
want an
embedded framework.

I did some work on this a long time ago (gdal 1.1.9 on MacOS 10.2) that 
I could
resurrect (the application I'm working on switched to statically 
linking gdal to
reduce the required download size, since providing gdal as a separate 
download is not
an option in my case). I did the following to get a working framework:

a) patched GDALconfig.opt to create a framework. (I lack the courage 
required to
    mess with the configure mechanism 8^)
b) patched cpl_findfile.cpp to look for gdal-specific resources in the 
application's
    main bundle. Unfortunately, the code that looked in the framework's 
bundle
    seems to have been lost in a CVS restructure; but it shouldn't be 
that different
    from looking in the application's main bundle.

I used the built-in libraries for tiff, png and jpg to avoid creating 
dependencies
on libraries not included with MacOS X by default. For MacOS X, this 
leads to a further problem because Apple has a bug in their libraries 
that exports a symbol from
their PNG implementation which clashes with libpng 1.2.6. I submitted a 
bug report
to Apple, but have no idea if they fixed it for 10.4 (haven't received 
my DVD yet).
Come to think of it, I guess Frank is right that this is not really
"out of the box" 8^).

Nevertheless, if anyone is interested in getting this to work, I'll 
send you my notes
on what I did (and my modified cpl_findfile.cpp). The hard work will be 
modifying
the autoconf/automake stuff though.

With kind regards,
Eric




More information about the Gdal-dev mailing list