我想使用Pylucene,这需要首先安装JCC
当我运行python setup.py build
时,
它被错误停止如下:
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'
和INCLUDES
下更改LFLAGES
,但应该放在哪里?
来自互联网的搜索结果没有帮助。例如this或this
答案 0 :(得分:1)
我终于找到了this:
clang: error: unknown argument: '-mno-fused-madd'
似乎是常见的事情。
试试这些:
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
然后运行python setup.py build
应该有效。