<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>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.</div><div><br></div><div>I re-extracted the GDAL source from the archive, re-ran configure, and was able to "make" and "make install" without problem.</div><div><br></div><div>Brian</div><br><div><div>On Dec 28, 2012, at 10:43 AM, <a href="mailto:gdal-dev-request@lists.osgeo.org">gdal-dev-request@lists.osgeo.org</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Date: Fri, 28 Dec 2012 10:43:07 -0500<br>From: Brian Miles <<a href="mailto:selimnairb@gmail.com">selimnairb@gmail.com</a>><br>To:<span class="Apple-converted-space"> </span><a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>Subject: [gdal-dev] GDAL 1.9.2 python swig-modules build fails on OS X<br><span class="Apple-tab-span" style="white-space: pre; "> </span>Lion<br>Message-ID: <<a href="mailto:24F9B901-AA0B-48FF-84DF-7E0A5E5B8638@gmail.com">24F9B901-AA0B-48FF-84DF-7E0A5E5B8638@gmail.com</a>><br>Content-Type: text/plain; charset="us-ascii"<br><br><br>Hello,<br><br>I'm getting the following error when building python modules for GDAL 1.9.2 on OS X Lion:<br><br><blockquote type="cite">for dir in python ; do (cd $dir; make build) || exit; done<br></blockquote><blockquote type="cite">python setup.py build<br></blockquote><blockquote type="cite">running build<br></blockquote><blockquote type="cite">running build_py<br></blockquote><blockquote type="cite">creating build<br></blockquote><blockquote type="cite">creating build/lib.macosx-10.7-intel-2.7<br></blockquote><blockquote type="cite">copying gdal.py -> build/lib.macosx-10.7-intel-2.7<br></blockquote><blockquote type="cite">copying ogr.py -> build/lib.macosx-10.7-intel-2.7<br></blockquote><blockquote type="cite">copying osr.py -> build/lib.macosx-10.7-intel-2.7<br></blockquote><blockquote type="cite">copying gdalconst.py -> build/lib.macosx-10.7-intel-2.7<br></blockquote><blockquote type="cite">copying gdalnumeric.py -> build/lib.macosx-10.7-intel-2.7<br></blockquote><blockquote type="cite">creating build/lib.macosx-10.7-intel-2.7/osgeo<br></blockquote><blockquote type="cite">copying osgeo/__init__.py -> build/lib.macosx-10.7-intel-2.7/osgeo<br></blockquote><blockquote type="cite">copying osgeo/gdal.py -> build/lib.macosx-10.7-intel-2.7/osgeo<br></blockquote><blockquote type="cite">copying osgeo/gdal_array.py -> build/lib.macosx-10.7-intel-2.7/osgeo<br></blockquote><blockquote type="cite">copying osgeo/gdalconst.py -> build/lib.macosx-10.7-intel-2.7/osgeo<br></blockquote><blockquote type="cite">copying osgeo/gdalnumeric.py -> build/lib.macosx-10.7-intel-2.7/osgeo<br></blockquote><blockquote type="cite">copying osgeo/ogr.py -> build/lib.macosx-10.7-intel-2.7/osgeo<br></blockquote><blockquote type="cite">copying osgeo/osr.py -> build/lib.macosx-10.7-intel-2.7/osgeo<br></blockquote><blockquote type="cite">running build_ext<br></blockquote><blockquote type="cite">building 'osgeo._gdal' extension<br></blockquote><blockquote type="cite">creating build/temp.macosx-10.7-intel-2.7<br></blockquote><blockquote type="cite">creating build/temp.macosx-10.7-intel-2.7/extensions<br></blockquote><blockquote type="cite">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<br></blockquote><blockquote type="cite">cc1plus: error: unrecognized command line option "-arch"<br></blockquote><blockquote type="cite">cc1plus: error: unrecognized command line option "-arch"<br></blockquote><blockquote type="cite">cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++<br></blockquote><blockquote type="cite">error: command 'llvm-gcc-4.2' failed with exit status 1<br></blockquote><blockquote type="cite">make[2]: *** [build] Error 1<br></blockquote><blockquote type="cite">make[1]: *** [build] Error 2<br></blockquote><blockquote type="cite">make: *** [swig-modules] Error 2<br></blockquote><br>I'm using the following configure:<br><br><blockquote type="cite">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"<br></blockquote><br><br><br>Any help would be appreciated.<br><br>Sincerely,<br><br>Brian<br></span></blockquote></div><br></body></html>