简体   繁体   中英

Install blist in mac os x Mavericks

When I installed the blist on my mac (OS X Mavericks 10.9.2) I confronted error

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

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 -DBLIST_FLOAT_RADIX_SORT=1 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _blist.c -o build/temp.macosx-10.9-intel-2.7/_blist.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

Clang version:

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix

I found workaround for this problem.

Install apple-gcc42 (for Homebrew use next command):

$brew install apple-gcc42

Than change symlink for /usr/bin/cc

$ls -al /usr/bin/cc
lrwxr-xr-x  1 root  wheel  5 Feb 25 11:11 cc -> clang 

with command

$cd /usr/bin
$sudo ln -sf /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 cc

$ls -al /usr/bin/cc
lrwxr-xr-x  1 root  wheel  54 Mar 18 12:50 cc -> /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2

where "/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2" path where Homebrew install package with apple-gcc42 compiler.

Then install blist.

If you find better solution please post it.

Based on github ticket and this SO answer , following worked for me.

sudo su
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
pip install blist

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM