python-config --cflags emits unsupported compiler option
| Originator: | mjr | ||
| Number: | rdar://16629578 | Date Originated: | 2014-04-14 |
| Status: | dup of 16214764 | Resolved: | 2014-05-15 |
| Product: | OS X | Product Version: | 10.9.2 |
| Classification: | Bug | Reproducible: | Always |
Summary: python-config --cflags emits -mno-fused-madd, but that option hasn't been supported by XCode compilers for quite some time. However, a recent XCode (5.1?) seems to have made unsupported commandline options a hard failure by default, causing python modules with C code to fail to build. As far as I can tell, this option was removed from the baseline Python source in 2.6: http://bugs.python.org/issue1779871. The option should be removed from OSX Python as well (all three versions). One can workaround this in some cases by setting: export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future" Also of note is that the error message clang gives indicates that the unknown commandline option is NOT currently an error, but will be in the future, which is incorrect: 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 Steps to Reproduce: Environment: OSX 10.9.2, XCode 5.1.1 $ curl -O https://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-0.7.9.tar.gz $ tar xf SQLAlchemy-0.7.9.tar.gz $ cd SQLAlchemy-0.7.9 $ python setup.py build Expected Results: The python module above contains a C module that SHOULD compile, but doesn't; this particular module falls back to pure-python, but not all modules have that option. Actual Results: The C portion of the python module fails to compile, with the following errors output: 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/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c lib/sqlalchemy/cextension/processors.c -o build/temp.macosx-10.9-intel-2.7/lib/sqlalchemy/cextension/processors.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 *************************************************************************** command 'cc' failed with exit status 1 WARNING: The C extension could not be compiled, speedups are not enabled. Failure information, if any, is above. Retrying the build without the C extension now. ***************************************************************************
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Fixed in 10.9.3.