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

Christopher Barker Chris.Barker at noaa.gov
Mon Oct 29 19:41:11 EDT 2007


William et al,

NOTE: This is all SVN trunk, on OS-X 10.4.10

I've got close!

It looks like I have GDAL building Universally, and the python bindings 
building, but something went wrong in the install stage. It looks like 
I've got the Framework mostly OK, but when I try to import geos.gdal, I get:

ImportError: 
dlopen(/Users/cbarker/.python-eggs/GDAL_OGR-1.5.0-py2.5-macosx-10.3-fat.egg-tmp/osgeo/_gdal.so, 
2): Library not loaded: 
/Library/Frameworks/GDAL.framework/Versions/1.5/libgdal.1.dylib
   Referenced from: 
/Users/cbarker/.python-eggs/GDAL_OGR-1.5.0-py2.5-macosx-10.3-fat.egg-tmp/osgeo/_gdal.so
   Reason: image not found

indeed, there is no:
/Library/Frameworks/GDAL.framework/Versions/1.5/libgdal.1.dylib

but there is a:

/Library/Frameworks/GDAL.framework/Versions/1.5/GDAL

and a:

/Library/Frameworks/GDAL.framework/Versions/1.5/unix/lib/libgdal.dylib

which is a link to the "GDAL" file above.

I made another link to it:

$ ln -s GDAL libgdal.1.dylib

and now osgeo.gdal imports OK -- I've yet to test.


A few other questions:

The utilities are getting put in:

/Library/Frameworks/GDAL.framework/Versions/1.5/Programs

Is that the Apple standard? Should/could there be symlinks in 
/usr/local/bin also? I hate adding all that stuff to my $PATH.

Here is how I configured it:

#!/bin/sh

## simple script to run configure for GDAL on OS-X

# ccub and c++ub are little utilities that sets up gcc to build Universal.
# From: http://www.macosxhints.com/article.php?story=20061025213851279
export CC=ccub
export CXX=c++ub

./configure --with-python --with-macosx-framework \
--with-png=/Library/Frameworks/UnixImageIO.framework/unix \
--with-tiff=/Library/Frameworks/UnixImageIO.framework/unix \
--with-gif=/Library/Frameworks/UnixImageIO.framework/unix \
--with-jasper=/Library/Frameworks/UnixImageIO.framework/unix \
--with-xerces=/Library/Frameworks/Xerces.framework/unix  \

# python SwitchEndianDefines.py # still a bit of a bug there!

Enclosed is SwitchEndianDefnines.py -- though it's not quite right -- C 
comments sure are a pain! -- it's be really nice to get ./configure to 
do that right instead. It seems we should be able to come up with 
something that would work most everywhere.

-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SwitchEndianDefines.py
Type: text/x-python
Size: 1110 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20071029/ee663d99/SwitchEndianDefines.py


More information about the Gdal-dev mailing list