2014-04-01 169 views
0

我想要使用Pylucene,它需要首先安装JCC。
当我运行python setup.py build, 它停止由错误如下:在Mac OS上安装JCC的问题

found JAVAFRAMEWORKS = /System/Library/Frameworks/JavaVM.framework 
Loading source files for package org.apache.jcc... 
Constructing Javadoc information... 
Standard Doclet version 1.6.0_65 
Building tree for all the packages and classes... 
Generating javadoc/org/apache/jcc//PythonException.html... 
Generating javadoc/org/apache/jcc//PythonVM.html... 
Generating javadoc/org/apache/jcc//package-frame.html... 
Generating javadoc/org/apache/jcc//package-summary.html... 
Generating javadoc/org/apache/jcc//package-tree.html... 
Generating javadoc/constant-values.html... 
Generating javadoc/serialized-form.html... 
Building index for all the packages and classes... 
Generating javadoc/overview-tree.html... 
Generating javadoc/index-all.html... 
Generating javadoc/deprecated-list.html... 
Building index for all classes... 
Generating javadoc/allclasses-frame.html... 
Generating javadoc/allclasses-noframe.html... 
Generating javadoc/index.html... 
Generating javadoc/help-doc.html... 
Generating javadoc/stylesheet.css... 
running build 
running build_py 
writing /Users/vancexu/Projects/SI650/pylucene-4.6.1-1/jcc/jcc/config.py 
copying jcc/config.py -> build/lib.macosx-10.9-intel-2.7/jcc 
copying jcc/classes/org/apache/jcc/PythonVM.class -> build/lib.macosx-10.9-intel-2.7/jcc/classes/org/apache/jcc 
copying jcc/classes/org/apache/jcc/PythonException.class -> build/lib.macosx-10.9-intel-2.7/jcc/classes/org/apache/jcc 
running build_ext 
building 'jcc' 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 -dynamiclib -D_jcc_lib -DJCC_VER="2.19" -I/System/Library/Frameworks/JavaVM.framework/Headers -I_jcc -Ijcc/sources -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c jcc/sources/jcc.cpp -o build/temp.macosx-10.9-intel-2.7/jcc/sources/jcc.o -DPYTHON -fno-strict-aliasing -Wno-write-strings 
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 

我应该怎么做来解决这个问题,并成功打造了吗? 任何提示表示赞赏。

我尝试编辑setup.py,但我不知道要改变什么。 我想我应该改变'darwin/home'根据INCLUDESLFLAGES,但应该放在那里? 来自互联网的搜索结果没有帮助。像thisthis

回答

1

我终于找到this

clang: error: unknown argument: '-mno-fused-madd'似乎是常见的事,看看。

尝试这些:

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

然后运行python setup.py build应该作品。