[Solved-5 Solutions] clang error unknown argument mno fused madd python package installation failure
Error Description:
We get the following error when attempting to install psycopg2 via pip on Mavericks 10.9:
Solution 1:
You can tell clang to not raise this as an error by setting the following environment variables prior compilation:
Then pip install psycopg2 should work.
Solution 2:
- Add ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future to your compile flags.
- Pass CFLAGS=""
- Strip the unsupported flags from the sysconfigdata.py (as is noted in another answer).
- Compile a new python using homebrew.
- Wait for the next OS X update, which is rumored to include recompiled Python/Ruby to remove this issue for system runtimes.
Solution 3:
Solution 4:
That involves removing the flag from the python installation.
- In /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_sysconfigdata.pyare several places where the -mfused-madd / -mno-fused-madd flag is set.
- Edit this file and remove all of the references to that flag your compilation should work:
You need to delete the corresponding _sysconfigdata.pyc and _sysconfigdata.pyo files as well - at least on my system these files did not automatically get rebuilt:
Note that you have to use root access to make those changes.
Solution 5:
- Switch the python binaries.
You can do this via sudo:
- cp /usr/bin/python /usr/bin/python_orig
- ln -s /usr/local/Cellar/python/2.7.6/bin/python /usr/bin/python
Then, 'brew install rdiff-backup' succeeds without any errors.
Finally, do "mv /usr/bin/python_orig /usr/bin/python" to revert everything back.