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

Brian Miles selimnairb at gmail.com
Sat Dec 29 14:01:47 PST 2012


It looks like GDAL was being built with clang/clang++, but the Python module was being build with llvm-gcc-4.2 and CFLAGS configured via a previous configure run.

I re-extracted the GDAL source from the archive, re-ran configure, and was able to "make" and "make install" without problem.

Brian

On Dec 28, 2012, at 10:43 AM, gdal-dev-request at lists.osgeo.org wrote:

> Date: Fri, 28 Dec 2012 10:43:07 -0500
> From: Brian Miles <selimnairb at gmail.com>
> To: gdal-dev at lists.osgeo.org
> Subject: [gdal-dev] GDAL 1.9.2 python swig-modules build fails on OS X
> 	Lion
> Message-ID: <24F9B901-AA0B-48FF-84DF-7E0A5E5B8638 at gmail.com>
> Content-Type: text/plain; charset="us-ascii"
> 
> 
> 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/20121229/4b03257d/attachment.html>


More information about the gdal-dev mailing list