lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andi Vajda <va...@apache.org>
Subject Re: using org.apache.jcc.PythonVM
Date Fri, 04 Mar 2011 18:29:25 GMT

On Fri, 4 Mar 2011, Bill Janssen wrote:

> Hmmm, having this difficulty:
>
> % find /usr/local/lib/python2.6 -name \*jcc\*
> /usr/local/lib/python2.6/dist-packages/JCC-2.7-py2.6-linux-x86_64.egg/libjcc.a
> /usr/local/lib/python2.6/dist-packages/JCC-2.7-py2.6-linux-x86_64.egg/jcc
> /usr/local/lib/python2.6/dist-packages/JCC-2.7-py2.6-linux-x86_64.egg/jcc/_jcc.pyc
> /usr/local/lib/python2.6/dist-packages/JCC-2.7-py2.6-linux-x86_64.egg/jcc/_jcc.py
> /usr/local/lib/python2.6/dist-packages/JCC-2.7-py2.6-linux-x86_64.egg/jcc/_jcc.so
> /usr/local/lib/python2.6/dist-packages/JCC-2.7-py2.6-linux-x86_64.egg/jcc/sources/jccfuncs.h
> /usr/local/lib/python2.6/dist-packages/JCC-2.7-py2.6-linux-x86_64.egg/jcc/sources/jcc.cpp
> /usr/local/lib/python2.6/dist-packages/JCC-2.7-py2.6-linux-x86_64.egg/jcc/classes/org/apache/jcc
> /usr/local/lib/python2.6/dist-packages/JCC-2.6-py2.6-linux-x86_64.egg/libjcc.a
> /usr/local/lib/python2.6/dist-packages/JCC-2.6-py2.6-linux-x86_64.egg/jcc
> /usr/local/lib/python2.6/dist-packages/JCC-2.6-py2.6-linux-x86_64.egg/jcc/_jcc.pyc
> /usr/local/lib/python2.6/dist-packages/JCC-2.6-py2.6-linux-x86_64.egg/jcc/_jcc.py
> /usr/local/lib/python2.6/dist-packages/JCC-2.6-py2.6-linux-x86_64.egg/jcc/_jcc.so
> /usr/local/lib/python2.6/dist-packages/JCC-2.6-py2.6-linux-x86_64.egg/jcc/sources/jccfuncs.h
> /usr/local/lib/python2.6/dist-packages/JCC-2.6-py2.6-linux-x86_64.egg/jcc/sources/jcc.cpp
> /usr/local/lib/python2.6/dist-packages/JCC-2.6-py2.6-linux-x86_64.egg/jcc/classes/org/apache/jcc
> % java -classpath .:/tmp/pylucene/branches/branch_3x/jcc/build/lib.linux-x86_64-2.6/jcc/classes
-Djava.library.path=/usr/local/lib/python2.6/dist-packages/JCC-2.6-py2.6-linux-x86_64.egg/jcc
test /u/tests/docs/testpage.txt /u/tests/docs/testpage.txt
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no jcc in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)
> 	at java.lang.Runtime.loadLibrary0(Runtime.java:840)
> 	at java.lang.System.loadLibrary(System.java:1047)
> 	at org.apache.jcc.PythonVM.<clinit>(PythonVM.java:23)
> 	at test.main(test.java:11)
> %
>
> The shared library is "_jcc.so", but the Java code loads "jcc".  Is that
> a problem?

There are two shared libraries for jcc: _jcc.so, the python extension, and 
libjcc.so, the shared mode runtime shared library. That's the one that 
gets loaded by PythonVM.java. Its directory must be on java's java.library.path.

  $ find _install/lib/python2.6/site-packages/JCC-2.7-py2.6-linux-x86_64.egg | grep "\.so"
_install/lib/python2.6/site-packages/JCC-2.7-py2.6-linux-x86_64.egg/libjcc.so
_install/lib/python2.6/site-packages/JCC-2.7-py2.6-linux-x86_64.egg/jcc/_jcc.so

Andi..

Mime
View raw message