{"id":1146,"hash":"64ccc23be866dc019dfe684532e4902b3a9018a4110e05def6ad8ce439824348","pattern":"Problems with pip install numpy - RuntimeError: Broken toolchain: cannot link a simple C program","full_message":"I'm trying to install numpy (and scipy and matplotlib) into a virturalenv.\n\nI keep getting these errors though:\n\nRuntimeError: Broken toolchain: cannot link a simple C program\n\n----------------------------------------\nCleaning up...\nCommand python setup.py egg_info failed with error code 1\n\nI have the command line tools for xcode installed\n\n$ which gcc\n/usr/bin/gcc\n$ which cc\n/usr/bin/cc\n\nI'm on Mac OSX 10.9\nUsing a brew installed python\n\nEdit\n\nYes, trying to install with pip.\n\nThe whole traceback is huge (>400 lines)\n\nHere is a section of it: \n\nC compiler: 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\n\ncompile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c'\n\ncc: _configtest.c\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 be downgraded to a warning) in the future\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 be downgraded to a warning) in the future\n\nfailure.\n\nremoving: _configtest.c _configtest.o\n\nTraceback (most recent call last):\n\n  File \"<string>\", line 17, in <module>\n\n  File \"/Users/bdhammel/Documents/research_programming/julia_env/build/numpy/setup.py\", line 192, in <module>\n\n    setup_package()\n\n  File \"/Users/bdhammel/Documents/research_programming/julia_env/build/numpy/setup.py\", line 185, in setup_package\n\n    configuration=configuration )\n\n  File \"/Users/bdhammel/Documents/research_programming/julia_env/build/numpy/numpy/distutils/core.py\", line 169, in setup\n\n    return old_setup(**new_attr)\n\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py\", line 152, in setup\n\n    dist.run_commands()\n\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py\", line 953, in run_commands\n\n    self.run_command(cmd)\n\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py\", line 972, in run_command\n\n    cmd_obj.run()\n\n  File \"/Users/bdhammel/Documents/research_programming/julia_env/build/numpy/numpy/distutils/command/egg_info.py\", line 10, in run\n\n    self.run_command(\"build_src\")\n\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py\", line 326, in run_command\n\n    self.distribution.run_command(command)\n\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py\", line 972, in run_command\n\n    cmd_obj.run()\n\n  File \"/Users/bdhammel/Documents/research_programming/julia_env/build/numpy/numpy/distutils/command/build_src.py\", line 153, in run\n\n    self.build_sources()\n\n  File \"/Users/bdhammel/Documents/research_programming/julia_env/build/numpy/numpy/distutils/command/build_src.py\", line 164, in build_sources\n\n    self.build_library_sources(*libname_info)\n\n  File \"/Users/bdhammel/Documents/research_programming/julia_env/build/numpy/numpy/distutils/command/build_src.py\", line 299, in build_library_sources\n\n    sources = self.generate_sources(sources, (lib_name, build_info))\n\n  File \"/Users/bdhammel/Documents/research_programming/julia_env/build/numpy/numpy/distutils/command/build_src.py\", line 386, in generate_sources\n\n    source = func(extension, build_dir)\n\n  File \"numpy/core/setup.py\", line 674, in get_mathlib_info\n\n    raise RuntimeError(\"Broken toolchain: cannot link a simple C program\")\n\nRuntimeError: Broken toolchain: cannot link a simple C program","ecosystem":"pypi","package_name":"numpy","package_version":null,"solution":"While it's ugly, it appears to work\n\nsudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install --upgrade numpy\n\nNote that if you are getting this error for a package other than numpy, (such as lxml) specify that package name instead of numpy at the end of the commnd.\n\nI saw a similar issue someone was having with installing a gem\n\nRuby Gem install Json fails on Mavericks and Xcode 5.1 - unknown argument: '-multiply_definedsuppress'\n\nThis is only a temporary fix, at some point the compiler options will have to be fixed","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/22388519/problems-with-pip-install-numpy-runtimeerror-broken-toolchain-cannot-link-a","votes":144,"created_at":"2026-04-19T04:52:25.790893+00:00","updated_at":"2026-04-19T04:52:25.790893+00:00"}