[Gdal-dev] Building on OS-X

William Kyngesburye woklist at kyngchaos.com
Thu Oct 25 15:16:08 EDT 2007


On Oct 25, 2007, at 1:46 PM, Christopher Barker wrote:

> Hi all,
>
> I'm trying to build on OS-X, and having a bit of trouble getting  
> all the libs it need found. So far, my issues have been libpng and  
> libtiff, but who knows what's next?
>
For a minimalist approach, you could use the internal libtiff and  
libpng (and libungif and libjpeg).  You would still need libjasper  
(or ignore jasper and use ECW or Kakadu for jp2).


> Which libs are others using? I had libpng already installed (from  
> source), but only the static lib, and Make was looking for  
> *.dynlib, so that didn't work.
>
> So I've decided that I should just use the nifty Kyng Chaos-supplied
> UnixImageIO framework. However, ./configure doesn't find it, so I  
> started doing things like:
>
> --with-png=/Library/Frameworks/UnixImageIO.framework/Versions/A/ 
> unix/lib/
>
> but that got ugly fast!

Well, that's exactly what I do, so the graphics libraries all have  
the same setting.  Though you can shorten them to (and drop the /lib/  
bit):

--with-png=/Library/Frameworks/UnixImageIO.framework/unix/lib

The symlinks at the top level point to the current version.  I'm not  
bothered by long configure lines, though others may be.  Just make a  
script that does all that, or keep a text file that you can copy-n- 
paste a ready-made configure command from.


> So, it appears that what I should do is add a --framework- 
> UnixImageIO somewhere, but I'm not sure where, as it's needed for  
> both pre-processing and linking.
>
> Any thoughts?
>
> -Chris
>
> By the way, does autoconf have any facilities for looking for  
> Frameworks? It seems the ideal solution would be for ./configure to  
> just find it.

There are only two standard framework dependencies used by GDAL:  
Python and Xerces.  Python is taken care of.  And Xerces doesn't have  
official binary for the Mac framework, just a unix build, so there's  
not much need to worry about it.  I'm building the Xerces framework  
pretty much as is from the source.

My other frameworks are something I do, though the idea is for them  
to become some defacto standard (it's getting there at least in the  
GIS software world).  The UnixImageIO framework is an oddball, and I  
wouldn't be surprised if it doesn't catch on.  But, they are designed  
to be unix friendly - the "Unix Compatibility" idea - so unix  
software doesn't have to deal with frameworks if it doesn't want to.

There may be an autotools framework detection macro, but I don't know  
much about autotools.  The other side of the problem is libtool.   
Somewhere in the middle of libtool 1.5.x framework handling was  
added, and before that extra flags had to be added (and are still  
added in GDAL's Python framework handling).  I think libtool 2.x  
(used in GDAL 1.5) handles frameworks without extra flags now, but  
there could still be issues to deal with.


-----
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 Gdal-dev mailing list