It looks like a bit of a coordination and packaging snafu with Apple.  Apple 
builds Python with some old flags that clang doesn't support, but clang 
defaulted to NOT reporting the unknown flag as error.  The recent clang 5.1 
changed this default to error.

I found a discussion about it on stackoverflow:

http://stackoverflow.com/questions/22313407/clang-error-unknown-argument-mno-fused-madd-python-package-installation-fa

The -Qunused-arguments trick seems to work for some and not others.  There is 
another method to try (the error actually mentions it): add this to ARCHFLAGS:

-Wno-error=unused-command-line-argument-hard-error-in-future

On Apr 19, 2014, at 11:22 AM, Even Rouault <even.roua...@mines-paris.org> wrote:

> Hi,
> 
> I've noticed that since a few days our Travis-CI MacOS X job has started to 
> fail building the Python bindings.
> 
> The last successfull build was 
> https://travis-ci.org/rouault/gdal_coverage/builds/22998284 with
> i386-apple-darwin12.5.0 (MacOSX 10.8)
> 
> The current build ( 
> https://travis-ci.org/rouault/gdal_coverage/builds/23333274 ) fails with 
> i386-apple-darwin13.1.0 (MacOSX 10.9)
> 
> The error is 
> https://travis-ci.org/rouault/gdal_coverage/builds/23333274#L5311 :
> 
> creating build/temp.macosx-10.9-intel-2.7
> creating build/temp.macosx-10.9-intel-2.7/extensions
> cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -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 x86_64 -arch i386 -pipe 
> -I../../port -I../../gcore -I../../alg -I../../ogr/ -
> I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 
> -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include
>  -
> I/Users/travis/build/rouault/gdal_coverage/gdal/include -c 
> extensions/gdal_wrap.cpp -o 
> build/temp.macosx-10.9-intel-2.7/extensions/gdal_wrap.o
> clang: error: unknown argument: '-mno-fused-madd' 
> [-Wunused-command-line-argument-hard-error-in-future]
> clang: note: this will be a hard error (cannot be downgraded to a warning) in 
> the future
> error: command 'cc' failed with exit status 1
> 
> The last successfull build had this trace :
> 
> creating build/temp.macosx-10.8-intel-2.7
> creating build/temp.macosx-10.8-intel-2.7/extensions
> clang -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 -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/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include
>  -
> I/Users/travis/build/rouault/gdal_coverage/gdal/include -c 
> extensions/gdal_wrap.cpp -o 
> build/temp.macosx-10.8-intel-2.7/extensions/gdal_wrap.o
> clang: warning: argument unused during compilation: '-mno-fused-madd'
> 
> So it seems that distutils add this -mno-fused-madd option that makes newer 
> version of clang to fail.
> 
> I've found a potential fix in https://bitbucket.org/cffi/cffi/commits/a88e541 
> that suggest
> adding "-Qunused-arguments" and tested it with 
> http://trac.osgeo.org/gdal/changeset/27220, but it still fails ( 
> https://travis-ci.org/rouault/gdal_coverage/builds/23341848 )
> 
> cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -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 x86_64 -arch i386 -pipe 
> -I../../port -I../../gcore -I../../alg -I../../ogr/ -
> I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 
> -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include
>  -
> I/Users/travis/build/rouault/gdal_coverage/gdal/include -c 
> extensions/gdal_wrap.cpp -o 
> build/temp.macosx-10.9-intel-2.7/extensions/gdal_wrap.o -Qunused-arguments
> clang: error: unknown argument: '-mno-fused-madd' 
> [-Wunused-command-line-argument-hard-error-in-future]
> clang: note: this will be a hard error (cannot be downgraded to a warning) in 
> the future
> error: command 'cc' failed with exit status 1
> 
> Any Pythonist with a Mac that might help with that ? The file to hack into is 
> swig/python/setup.py
> 
> 
> Even
> 
> -- 
> Geospatial professional services
> http://even.rouault.free.fr/services.html
> _______________________________________________
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"This is a question about the past, is it? ... How can I tell that the past 
isn't a fiction designed to account for the discrepancy between my immediate 
physical sensations and my state of mind?"

- The Ruler of the Universe


_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to