<small id='EDuMv'></small><noframes id='EDuMv'>

      • <bdo id='EDuMv'></bdo><ul id='EDuMv'></ul>
      <i id='EDuMv'><tr id='EDuMv'><dt id='EDuMv'><q id='EDuMv'><span id='EDuMv'><b id='EDuMv'><form id='EDuMv'><ins id='EDuMv'></ins><ul id='EDuMv'></ul><sub id='EDuMv'></sub></form><legend id='EDuMv'></legend><bdo id='EDuMv'><pre id='EDuMv'><center id='EDuMv'></center></pre></bdo></b><th id='EDuMv'></th></span></q></dt></tr></i><div id='EDuMv'><tfoot id='EDuMv'></tfoot><dl id='EDuMv'><fieldset id='EDuMv'></fieldset></dl></div>

    1. <legend id='EDuMv'><style id='EDuMv'><dir id='EDuMv'><q id='EDuMv'></q></dir></style></legend>
      <tfoot id='EDuMv'></tfoot>
    2. 在 OSX 上安装 PyLucene JCC 时出错

      时间:2023-10-09

          • <small id='xHxg9'></small><noframes id='xHxg9'>

              <tbody id='xHxg9'></tbody>

              <bdo id='xHxg9'></bdo><ul id='xHxg9'></ul>
                <i id='xHxg9'><tr id='xHxg9'><dt id='xHxg9'><q id='xHxg9'><span id='xHxg9'><b id='xHxg9'><form id='xHxg9'><ins id='xHxg9'></ins><ul id='xHxg9'></ul><sub id='xHxg9'></sub></form><legend id='xHxg9'></legend><bdo id='xHxg9'><pre id='xHxg9'><center id='xHxg9'></center></pre></bdo></b><th id='xHxg9'></th></span></q></dt></tr></i><div id='xHxg9'><tfoot id='xHxg9'></tfoot><dl id='xHxg9'><fieldset id='xHxg9'></fieldset></dl></div>
                <legend id='xHxg9'><style id='xHxg9'><dir id='xHxg9'><q id='xHxg9'></q></dir></style></legend>
              • <tfoot id='xHxg9'></tfoot>

              • 本文介绍了在 OSX 上安装 PyLucene JCC 时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我在 Mac OSX 上安装 PyLucene JCC 时遇到问题.

                I am having trouble installing PyLucene JCC on Mac OSX.

                我从 apache lucene 站点下载了最新版本的 JCC,并按照说明使用命令安装它

                I dowloaded the latest version of JCC from apache lucene site and fallowed the instruction to install it using the command

                python setup.py build
                

                但我在安装时遇到以下错误

                But I am getting the following error while installing

                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 'c++' failed with exit status 1
                

                在 mac OSX 上安装或使用 export CFLAGS 时,我已尝试按照官方网站上的说明将标志 "-framework", "Python" 添加到 LFLAGS 值=-Qunused-argumentsexport CPPFLAGS=-Qunused-arguments 在运行安装命令之前忽略构建时的警告.但它们都不起作用.

                I have tried following the instruction given on the official site of adding the flag "-framework", "Python" to the LFLAGS value when installing on mac OSX or using the export CFLAGS=-Qunused-arguments and export CPPFLAGS=-Qunused-arguments before runnig the install command to ignore the warnings while build. But none of them are working.

                错误的完整轨迹是

                found JAVAHOME = /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home
                found JAVAFRAMEWORKS = /System/Library/Frameworks/JavaVM.framework
                Loading source files for package org.apache.jcc...
                doc/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...
                running build
                running build_py
                writing /Users/harshsingh/Documents/Codes/IR/jcc/jcc/config.py
                copying jcc/config.py -> build/lib.macosx-10.10-intel-2.7/jcc
                copying jcc/classes/org/apache/jcc/PythonVM.class -> build/lib.macosx-10.10-intel-2.7/jcc/classes/org/apache/jcc
                copying jcc/classes/org/apache/jcc/PythonException.class -> build/lib.macosx-10.10-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 -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.    21" -I/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.7.0_45.    jdk/Contents/Home/include/darwin -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.10-intel-2.7/jcc/sources/jcc.o -DPYTHON -fno-strict-aliasing -Wno-write-strings
                clang: warning: argument unused during compilation: '-dynamiclib'
                jcc/sources/jcc.cpp:197:16: warning: implicit conversion loses integer precision: 'long' to 'int'
                      [-Wshorten-64-to-32]
                    int hash = PyObject_Hash(arg);
                        ~~~~   ^~~~~~~~~~~~~~~~~~
                1 warning generated.
                cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -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.    21" -I/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.7.0_45.    jdk/Contents/Home/include/darwin -I_jcc -Ijcc/sources -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c jcc/sources/JCCEnv.    cpp -o build/temp.macosx-10.10-intel-2.7/jcc/sources/JCCEnv.o -DPYTHON -fno-strict-aliasing -Wno-write-strings
                clang: warning: argument unused during compilation: '-dynamiclib'
                c++ -Wl,-x -dynamiclib -undefined dynamic_lookup build/temp.macosx-10.10-intel-2.7/jcc/sources/jcc.o build/temp.macosx-10.10-intel-2.7/jcc/sources/JCCEnv.    o -o build/lib.macosx-10.10-intel-2.7/libjcc.dylib -L/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib -ljava -    L/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/server -ljvm -Wl,-rpath -Wl,/Library/Java/JavaVirtualMachines/jdk1.7.0_45.    jdk/Contents/Home/jre/lib -Wl,-rpath -Wl,/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/server -Wl,-S -install_name @rpath/libjcc.    dylib -current_version 2.21 -compatibility_version 2.21
                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 'c++' failed with exit status 1    
                

                我现在真的很迷茫,任何帮助都会非常棒.

                I am really lost now and any help will be really great.

                推荐答案

                如果从源代码重建仍然会出现相同的错误,您可能可以尝试以下方法.

                If rebuilding from source still ends up giving the same errors, you could probably try the following approach.

                似乎在 OSX 10.9+ 上运行带有 -x 标志的 clang++ 命令(如下)存在错误(参考 这里)

                Seems like there is a bug with running the clang++ command (below) with the -x flag, on OSX 10.9+ (referenced here)

                cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -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.    21" -I/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.7.0_45.    jdk/Contents/Home/include/darwin -I_jcc -Ijcc/sources -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c jcc/sources/JCCEnv.    cpp -o build/temp.macosx-10.10-intel-2.7/jcc/sources/JCCEnv.o -DPYTHON -fno-strict-aliasing -Wno-write-strings
                clang: warning: argument unused during compilation: '-dynamiclib'
                c++ -Wl,-x -dynamiclib -undefined dynamic_lookup build/temp.macosx-10.10-intel-2.7/jcc/sources/jcc.o build/temp.macosx-10.10-intel-2.7/jcc/sources/JCCEnv.    o -o build/lib.macosx-10.10-intel-2.7/libjcc.dylib -L/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib -ljava -    L/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/server -ljvm -Wl,-rpath -Wl,/Library/Java/JavaVirtualMachines/jdk1.7.0_45.    jdk/Contents/Home/jre/lib -Wl,-rpath -Wl,/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/server -Wl,-S -install_name @rpath/libjcc.    dylib -current_version 2.21 -compatibility_version 2.21
                

                再次运行不带 -x 标志的 clang++ 命令,然后运行:

                Run the clang++ command again without the -x flag and then run:

                python setup.py build
                

                这篇关于在 OSX 上安装 PyLucene JCC 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:在 ubuntu 14.04(trusty tahr) 上构建 Pylucene 下一篇:pyparsing 一种查询格式到另一种

                相关文章

                最新文章

                • <bdo id='XbTmt'></bdo><ul id='XbTmt'></ul>

                <legend id='XbTmt'><style id='XbTmt'><dir id='XbTmt'><q id='XbTmt'></q></dir></style></legend>

                  <small id='XbTmt'></small><noframes id='XbTmt'>

                    <i id='XbTmt'><tr id='XbTmt'><dt id='XbTmt'><q id='XbTmt'><span id='XbTmt'><b id='XbTmt'><form id='XbTmt'><ins id='XbTmt'></ins><ul id='XbTmt'></ul><sub id='XbTmt'></sub></form><legend id='XbTmt'></legend><bdo id='XbTmt'><pre id='XbTmt'><center id='XbTmt'></center></pre></bdo></b><th id='XbTmt'></th></span></q></dt></tr></i><div id='XbTmt'><tfoot id='XbTmt'></tfoot><dl id='XbTmt'><fieldset id='XbTmt'></fieldset></dl></div>
                  1. <tfoot id='XbTmt'></tfoot>