1 May 2014 • Comments Off
OS X, Python: clang: error: unknown argument: ‘-mno-fused-madd’
While attempting to install Fabric for a project, I ran into the following error message (straight from my pip.log
).
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
Some Googling revealed that this is an issue with the XCode 5.1 update. This update treats unrecognized command-line options as errors
. And has been causing a lot of facepalming for users of Ruby gems and Python libraries. The fix is a simple one. Just open up Terminal and type:
export CFLAGS=-Qunused-arguments export CPPFLAGS=-Qunused-arguments
Then run pip install [package name]
as usual. If you need to use sudo
to install packages with pip, use sudo -E
instead:
sudo -E pip install fabric