移动性能测试 xcode5.1 下面安装 reportlab 的问题

55hhy · 2014年04月03日 · 最后由 Monkey 回复于 2014年04月03日 · 2224 次阅读
  1. pip install reportlab 一直报错: 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 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c /private/tmp/pip_build_root/reportlab/src/rl_addons/rl_accel/_rl_accel.c -o build/temp.macosx-10.9-intel-2.7/private/tmp/pip_build_root/reportlab/src/rl_addons/rl_accel/_rl_accel.o

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


Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;file='/private/tmp/pip_build_root/reportlab/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-e7bQve-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/reportlab
Storing debug log for failure in /Users/haohuiyan/Library/Logs/pip.log

  1. 咨询了一下说是换 32 位的 python,换了之后还是这个问题
  2. 找到这个http://stackoverflow.com/questions/22313407/clang-error-unknown-argument-mno-fused-madd-python-package-installation-fa/22315129#22315129
  3. 我的解决方案是: export CFLAGS=-Qunused-arguments export CPPFLAGS=-Qunused-arguments sudo -E pip install reportlab
共收到 1 条回复 时间 点赞

赞解决了问题~~

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册