Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The C extension compilation fails on Mac OS X Mavericks #25

Closed
christophercrouzet opened this issue Jun 2, 2014 · 3 comments
Closed

Comments

@christophercrouzet
Copy link

When I try to install the library through setup.py on Mac OS X Mavericks (10.9.2), the C extension won't compile as per the log below.

< christopher ~/src/3rdparty/wrapt > sudo python setup.py install
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-intel-2.7
creating build/lib.macosx-10.9-intel-2.7/wrapt
copying src/__init__.py -> build/lib.macosx-10.9-intel-2.7/wrapt
copying src/arguments.py -> build/lib.macosx-10.9-intel-2.7/wrapt
copying src/decorators.py -> build/lib.macosx-10.9-intel-2.7/wrapt
copying src/importer.py -> build/lib.macosx-10.9-intel-2.7/wrapt
copying src/six.py -> build/lib.macosx-10.9-intel-2.7/wrapt
copying src/wrappers.py -> build/lib.macosx-10.9-intel-2.7/wrapt
running build_ext
building 'wrapt._wrappers' extension
creating build/temp.macosx-10.9-intel-2.7
creating build/temp.macosx-10.9-intel-2.7/src
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 src/_wrappers.c -o build/temp.macosx-10.9-intel-2.7/src/_wrappers.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
***************************************************************************

WARNING: The C extension component for wrapt could not be compiled.

INFO: Trying to build without extensions.

***************************************************************************
running install
running build
running build_py
creating build/lib
creating build/lib/wrapt
copying src/__init__.py -> build/lib/wrapt
copying src/arguments.py -> build/lib/wrapt
copying src/decorators.py -> build/lib/wrapt
copying src/importer.py -> build/lib/wrapt
copying src/six.py -> build/lib/wrapt
copying src/wrappers.py -> build/lib/wrapt
running install_lib
creating /Library/Python/2.7/site-packages/wrapt
copying build/lib/wrapt/__init__.py -> /Library/Python/2.7/site-packages/wrapt
copying build/lib/wrapt/arguments.py -> /Library/Python/2.7/site-packages/wrapt
copying build/lib/wrapt/decorators.py -> /Library/Python/2.7/site-packages/wrapt
copying build/lib/wrapt/importer.py -> /Library/Python/2.7/site-packages/wrapt
copying build/lib/wrapt/six.py -> /Library/Python/2.7/site-packages/wrapt
copying build/lib/wrapt/wrappers.py -> /Library/Python/2.7/site-packages/wrapt
byte-compiling /Library/Python/2.7/site-packages/wrapt/__init__.py to __init__.pyc
byte-compiling /Library/Python/2.7/site-packages/wrapt/arguments.py to arguments.pyc
byte-compiling /Library/Python/2.7/site-packages/wrapt/decorators.py to decorators.pyc
byte-compiling /Library/Python/2.7/site-packages/wrapt/importer.py to importer.pyc
byte-compiling /Library/Python/2.7/site-packages/wrapt/six.py to six.pyc
byte-compiling /Library/Python/2.7/site-packages/wrapt/wrappers.py to wrappers.pyc
running install_egg_info
Writing /Library/Python/2.7/site-packages/wrapt-1.8.0-py2.7.egg-info
***************************************************************************

WARNING: The C extension component for wrapt could not be compiled.

INFO: Only pure Python version of package installed.

***************************************************************************
@GrahamDumpleton
Copy link
Owner

If using MacOS X OS supplied Python version, it is the fault of Apple. Upgrading to MacOS X 10.9.3 will resolve the issue.

If you are using a third party Python installation, the issue is with that Python installation and that would need to be fixed. You would likely have this issue when building any Python package with a C extension component.

A workaround you can try is documented in:

In short, try installing 'wrapt' using the command:

ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install wrapt

There is an Apple knowledge base article about it somewhere, but I can't find it right now.

@GrahamDumpleton
Copy link
Owner

@christophercrouzet
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants