在Mac OS X 10.9上安装PyLucene时,在符号索引中找不到Atom

时间:2014-11-15 18:52:08

标签: python c++ macos python-2.7 lucene

我正在尝试安装PyLucene,当我执行“pushd jcc”和“python setup.py build”时,我收到此错误:

ld:内部错误:在架构x86_64的symbolIndex(__ ZN7JNIEnv_13CallIntMethodEP8_jobjectP10_jmethodIDz)中找不到原子

可能是什么问题?我安装了Java 1.7 SDK。我使用“brew install Python”安装了Python,我在PATH中的/ urs / bin之前添加了/ usr / local / bin,因此使用了这个版本的Python 2.7.8,而不是Apple(2.7)提供的版本。

以下是在“python setup.py build”命令中输出的一些行:

found JAVAHOME = /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home
found JAVAFRAMEWORKS = /System/Library/Frameworks/JavaVM.framework

writing /Users/administrator/Downloads/pylucene-4.9.0-0/jcc/jcc/config.py
copying jcc/config.py -> build/lib.macosx-10.9-x86_64-2.7/jcc
copying jcc/classes/org/apache/jcc/PythonVM.class -> build/lib.macosx-10.9-x86_64-2.7/jcc/classes/org/apache/jcc
copying jcc/classes/org/apache/jcc/PythonException.class -> build/lib.macosx-10.9-x86_64-2.7/jcc/classes/org/apache/jcc
running build_ext
building 'jcc' extension
clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -dynamiclib -D_jcc_lib -DJCC_VER="2.20" -I/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/include/darwin -I_jcc -Ijcc/sources -I/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c jcc/sources/jcc.cpp -o build/temp.macosx-10.9-x86_64-2.7/jcc/sources/jcc.o -DPYTHON -fno-strict-aliasing -Wno-write-strings
clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -dynamiclib -D_jcc_lib -DJCC_VER="2.20" -I/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/include/darwin -I_jcc -Ijcc/sources -I/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c jcc/sources/JCCEnv.cpp -o build/temp.macosx-10.9-x86_64-2.7/jcc/sources/JCCEnv.o -DPYTHON -fno-strict-aliasing -Wno-write-strings
clang++ -Wl,-x -dynamiclib -undefined dynamic_lookup -Qunused-arguments -Qunused-arguments build/temp.macosx-10.9-x86_64-2.7/jcc/sources/jcc.o build/temp.macosx-10.9-x86_64-2.7/jcc/sources/JCCEnv.o -o build/lib.macosx-10.9-x86_64-2.7/libjcc.dylib -L/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre/lib -ljava -L/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre/lib/server -ljvm -Wl,-rpath -Wl,/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre/lib -Wl,-rpath -Wl,/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre/lib/server -Wl,-S -install_name @rpath/libjcc.dylib -current_version 2.20 -compatibility_version 2.20
ld: internal error: atom not found in symbolIndex(__ZN7JNIEnv_13CallIntMethodEP8_jobjectP10_jmethodIDz) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang++' failed with exit status 1

1 个答案:

答案 0 :(得分:0)

您需要使用相同的编译器as described here从源代码构建Python,或者以NO_SHARED模式构建它。后者是pylucene自制软件公式的默认值。