[gdal-dev] GDAL 1.9.2 python swig-modules build fails on OS X Lion

Brian Miles selimnairb at gmail.com
Fri Dec 28 07:43:07 PST 2012


Hello,

I'm getting the following error when building python modules for GDAL 1.9.2 on OS X Lion:

> for dir in python ; do (cd $dir; make build) || exit; done
> python setup.py build
> running build
> running build_py
> creating build
> creating build/lib.macosx-10.7-intel-2.7
> copying gdal.py -> build/lib.macosx-10.7-intel-2.7
> copying ogr.py -> build/lib.macosx-10.7-intel-2.7
> copying osr.py -> build/lib.macosx-10.7-intel-2.7
> copying gdalconst.py -> build/lib.macosx-10.7-intel-2.7
> copying gdalnumeric.py -> build/lib.macosx-10.7-intel-2.7
> creating build/lib.macosx-10.7-intel-2.7/osgeo
> copying osgeo/__init__.py -> build/lib.macosx-10.7-intel-2.7/osgeo
> copying osgeo/gdal.py -> build/lib.macosx-10.7-intel-2.7/osgeo
> copying osgeo/gdal_array.py -> build/lib.macosx-10.7-intel-2.7/osgeo
> copying osgeo/gdalconst.py -> build/lib.macosx-10.7-intel-2.7/osgeo
> copying osgeo/gdalnumeric.py -> build/lib.macosx-10.7-intel-2.7/osgeo
> copying osgeo/ogr.py -> build/lib.macosx-10.7-intel-2.7/osgeo
> copying osgeo/osr.py -> build/lib.macosx-10.7-intel-2.7/osgeo
> running build_ext
> building 'osgeo._gdal' extension
> creating build/temp.macosx-10.7-intel-2.7
> creating build/temp.macosx-10.7-intel-2.7/extensions
> llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I../../port -I../../gcore -I../../alg -I../../ogr/ -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/Library/Python/2.7/site-packages/numpy-override/numpy/core/include -I/usr/local/src/gdal-1.9.2/include -c extensions/gdal_wrap.cpp -o build/temp.macosx-10.7-intel-2.7/extensions/gdal_wrap.o
> cc1plus: error: unrecognized command line option "-arch"
> cc1plus: error: unrecognized command line option "-arch"
> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
> error: command 'llvm-gcc-4.2' failed with exit status 1
> make[2]: *** [build] Error 1
> make[1]: *** [build] Error 2
> make: *** [swig-modules] Error 2

I'm using the following configure:

> CC=clang CXX=clang++ ./configure --prefix=/opt/local --with-threads --disable-static --with-grass=/Applications/GRASS-6.4.app/Contents/MacOS --without-pg --with-jasper=/opt/local --with-libtiff=/opt/local --with-jpeg=/opt/local --with-gif=/opt/local --with-png=/opt/local --with-geotiff=internal --with-sqlite3=/Library/Frameworks/SQLite3.framework/unix --with-odbc --with-pcraster=internal --with-geos=/Library/Frameworks/GEOS.framework/unix/bin/geos-config --with-static-proj4=/Library/Frameworks/PROJ.framework/unix --with-expat=/usr/local --with-curl --with-python --with-macosx-framework=yes CFLAGS="-Os -arch x86_64" CXXFLAGS="-Os -arch x86_64" LDFLAGS="-arch x86_64"



Any help would be appreciated.

Sincerely,

Brian








-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20121228/1647a99f/attachment-0001.html>


More information about the gdal-dev mailing list