{"id":240,"hash":"bddd3d49d03c37f8a69ee3bc371002668f04f401d9ab695870a0485c8c027657","pattern":"clang error: unknown argument: &#39;-mno-fused-madd&#39; (python package installation failure)","full_message":"I get the following error when attempting to install psycopg2 via pip on Mavericks 10.9:\n\nclang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]\n\nNot sure how to proceed and have searched here and elsewhere for this particular error.  Any help is much appreciated!\n\nHere is the complete output from pip:\n\n$ pip install psycopg2\nDownloading/unpacking psycopg2\n  Downloading psycopg2-2.5.2.tar.gz (685kB): 685kB downloaded\n  Running setup.py (path:/private/var/folders/0z/ljjwsjmn4v9_zwm81vhxj69m0000gn/T/pip_build_tino/psycopg2/setup.py) egg_info for package psycopg2\n\nInstalling collected packages: psycopg2\n  Running setup.py install for psycopg2\n    building 'psycopg2._psycopg' extension\n    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 -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=\"2.5.2 (dt dec pq3 ext)\" -DPG_VERSION_HEX=0x090303 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.3.3/include -I/usr/local/Cellar/postgresql/9.3.3/include/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.9-intel-2.7/psycopg/psycopgmodule.o\n    clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]\n    clang: note: this will be a hard error (cannot be downgraded to a warning) in the future\n    error: command 'cc' failed with exit status 1\n    Complete output from command /usr/bin/python -c \"import setuptools, tokenize;__file__='/private/var/folders/0z/ljjwsjmn4v9_zwm81vhxj69m0000gn/T/pip_build_tino/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))\" install --record /var/folders/0z/ljjwsjmn4v9_zwm81vhxj69m0000gn/T/pip-bnWiwB-record/install-record.txt --single-version-externally-managed --compile:\n    running install\n\nrunning build\n\nrunning build_py\n\ncreating build\n\ncreating build/lib.macosx-10.9-intel-2.7\n\ncreating build/lib.macosx-10.9-intel-2.7/psycopg2\n\ncopying lib/__init__.py -> build/lib.macosx-10.9-intel-2.7/psycopg2\n\ncopying lib/_json.py -> build/lib.macosx-10.9-intel-2.7/psycopg2\n\ncopying lib/_range.py -> build/lib.macosx-10.9-intel-2.7/psycopg2\n\ncopying lib/errorcodes.py -> build/lib.macosx-10.9-intel-2.7/psycopg2\n\ncopying lib/extensions.py -> build/lib.macosx-10.9-intel-2.7/psycopg2\n\ncopying lib/extras.py -> build/lib.macosx-10.9-intel-2.7/psycopg2\n\ncopying lib/pool.py -> build/lib.macosx-10.9-intel-2.7/psycopg2\n\ncopying lib/psycopg1.py -> build/lib.macosx-10.9-intel-2.7/psycopg2\n\ncopying lib/tz.py -> build/lib.macosx-10.9-intel-2.7/psycopg2\n\ncreating build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/__init__.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/dbapi20.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/dbapi20_tpc.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/test_async.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/test_bug_gc.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/test_bugX000.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/test_cancel.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/test_connection.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/test_copy.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/test_cursor.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/test_dates.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/test_extras_dictcursor.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/test_green.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/test_lobject.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/test_module.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/test_notify.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/test_psycopg2_dbapi20.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/test_quote.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/test_transaction.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/test_types_basic.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/test_types_extras.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/test_with.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/testconfig.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\ncopying tests/testutils.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests\n\nrunning build_ext\n\nbuilding 'psycopg2._psycopg' extension\n\ncreating build/temp.macosx-10.9-intel-2.7\n\ncreating build/temp.macosx-10.9-intel-2.7/psycopg\n\ncc -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 -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=\"2.5.2 (dt dec pq3 ext)\" -DPG_VERSION_HEX=0x090303 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.3.3/include -I/usr/local/Cellar/postgresql/9.3.3/include/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.9-intel-2.7/psycopg/psycopgmodule.o\n\nclang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]\n\nclang: note: this will be a hard error (cannot","ecosystem":"pypi","package_name":"clang","package_version":null,"solution":"You can tell clang to not raise this as an error by setting the following environment variables prior compilation:\n\nexport CFLAGS=-Qunused-arguments\nexport CPPFLAGS=-Qunused-arguments\n\nThen pip install psycopg2should work.\n\nI had the same when trying to pip install lxml.\n\nEdit: if you are installing as superuser (which will likely be the case if you are trying to append to /Library/Python/2.7/site-packages, the native Apple factory-installed Python distribution which ships with OS X, rather than to some other Python distribution which you have subsequently installed yourself), then you will need to do, as described by @Thijs Kuipers in comments below:\n\nsudo -E pip install psycopg2\n\nor the equivalent, for whatever other package name you may be substituting in place of psycopg2.\n\nUPDATE [2014-05-16]: Apple has fixed this problem with updated system Pythons (2.7, 2.6, and 2.5) in OS X 10.9.3 so the workaround is no longer necessary when using the latest Mavericks and Xcode 5.1+.  However, as of now, the workaround is still required for OS X 10.8.x (Mountain Lion, currently 10.8.5) if you are using Xcode 5.1+ there.","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/22313407/clang-error-unknown-argument-mno-fused-madd-python-package-installation-fa","votes":278,"created_at":"2026-04-19T04:41:35.781669+00:00","updated_at":"2026-04-19T04:51:47.830657+00:00"}