clang error: unknown argument: '-mno-fused-madd' while installing psycopg2
This error occurs when attempting to install psycopg2 via pip on Mavericks 10.9. It results from an unknown argument, '-mno-fused-madd', passed to the clang compiler.
Resolution:
To resolve this issue, modify the environment variables before compilation by setting the following:
export CFLAGS=-Qunused-arguments export CPPFLAGS=-Qunused-arguments
Additional Considerations for Superuser Installation:
If the installation is performed as a superuser, add the following prefix to the pip command:
sudo -E pip install psycopg2
OSX Updates and Workaround Validity:
This workaround was necessary for OS X 10.8.x and Xcode 5.1 . However, as of OS X 10.9.3, Apple has fixed this issue for system Pythons (2.7, 2.6, and 2.5). Therefore, the workaround is no longer required for the latest Mavericks and Xcode 5.1 versions.
The above is the detailed content of Why Does `pip install psycopg2` Fail with \'unknown argument: \'-mno-fused-madd\'\' on OS X?. For more information, please follow other related articles on the PHP Chinese website!