Posted by: terryhowe | March 21, 2014

Python on OSx with Funky XCode

There are several python packages that fail to install on OSx because of C compile problems.  When I trying to install virtualenv, I ran into this problem:

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

I found http://stackoverflow.com/questions/22313407/clang-error-unknown-argument-mno-fused-madd-python-package-installation-fa helped me get around that issue by add the flags to the compile.  

The next issue I had was arround a the ffi library and ffi.h not found.  I added to the flags my path to the ffi include directory.  Your directory may vary.  I ran this to discover the location of the include file: 

find / -name ffi.h

The final results for the flags in my ~/.bashrc :

export CFLAGS="-Qunused-arguments -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/ffi"
export CPPFLAGS="-Qunused-arguments -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: