brentp / fishers_exact_test

Fishers Exact Test for Python (Cython)
BSD 3-Clause "New" or "Revised" License
62 stars 21 forks source link

error when installing (CC unknown argument: '-mno-fused-madd') #4

Open dalloliogm opened 10 years ago

dalloliogm commented 10 years ago

I've got an error when trying to compile fisher with pip.

System info:

-[~]$: uname -a
Darwin fc-6s-iMac.local 13.1.0 Darwin Kernel Version 13.1.0: Thu Jan 16 19:40:37 PST 2014; root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64
gioby@fc-6s-iMac [Thu Mar 27 11:04:45] [ttys014]
-[~]$: cc --version
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix

Error message:


$: sudo pip install fisher

Downloading/unpacking fisher
  Downloading fisher-0.1.4.tar.gz (45kB): 45kB downloaded
  Running setup.py (path:/private/tmp/pip_build_root/fisher/setup.py) egg_info for package fisher

Installing collected packages: fisher
  Running setup.py install for fisher
    building 'fisher/cfisher' extension
    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/Extras/lib/python/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/cfisher.c -o build/temp.macosx-10.9-intel-2.7/src/cfisher.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
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/fisher/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-oRqtQG-record/install-record.txt --single-version-externally-managed --compile:
    running install

running build

running build_py

creating build

creating build/lib.macosx-10.9-intel-2.7

creating build/lib.macosx-10.9-intel-2.7/fisher

copying fisher/__init__.py -> build/lib.macosx-10.9-intel-2.7/fisher

running build_ext

building 'fisher/cfisher' extension

creating build/temp.macosx-10.9-intel-2.7

creating build/temp.macosx-10.9-intel-2.7/src

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/Extras/lib/python/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/cfisher.c -o build/temp.macosx-10.9-intel-2.7/src/cfisher.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/fisher/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-oRqtQG-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/fisher
Storing debug log for failure in /Users/gioby/Library/Logs/pip.log
brentp commented 10 years ago

Hmm, I haven't tried clang. Maybe we can upgrade Cython and get this fixed. For now, can you try:

ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future sudo pip install fisher

That's from here: http://stackoverflow.com/questions/22312583/cant-install-mysql-gem-on-os-x

There's some python specific stuff here: http://stackoverflow.com/questions/22313407/clang-error-unknown-argument-mno-fused-madd-python-package-installation-fa that says you should be able to do:

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments

And get it to install.