python - clang: error: unknown argument: '-mno-fused-madd' -
when installing reportlab 3.1.8, ran problem kept getting error , not find compiler option being set.
the point in setup was:
building 'reportlab.lib._rl_accel' extension
clang: error: unknown argument: '-mno-fused-madd' [-wunused-command-line-argument-hard-error-in-future] clang: note: hard error (cannot downgraded warning) in future error: command 'cc' failed exit status 1
here solution.
cause: keep mac date , result seems have newer (different) version of c compiler (clang) 1 allowed "-mno-fused-madd" command line switch.
solution: did not find above switch in file in reportlab source. had on computer itself. culprit seemed in distutils, because setup.py uses module distutils.
the problem in file /system/library/frameworks/python.framework/versions/2.7/lib/python2.7/_sysconfigdata.py. file contains definitions dictionary named build_time_vars. in right place have build time problem.
- first make copy safeguard.
- sudo <editor> <file path> edit file.
- then editing file, search , remove switch -mno-fused-madd file. found in line beginning 'cflags' since compile flag. change line:
... -fwrapv -mno-fused-madd -denable_dtrace ... ... -fwrapv -denable_dtrace ...
save file , continue build. stay fixed. no need environment variables or such thing.
edit: while @ it, remove both _sysconfigdata.pyc , _sysconfigdata.pyo files.
Comments
Post a Comment