0

我想使用 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,但我不知道要更改什么。我想我应该在 and 下进行更改,'darwin/home'但是应该放什么?来自 Internet 的搜索结果没有帮助。像这样这样INCLUDESLFLAGES

4

1 回答 1

1

我终于找到了这个

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

试试这些:

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

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

于 2014-04-22T20:29:04.983 回答