[pylucene-dev] pylucene/jcc compilation issues

Andi Vajda vajda at osafoundation.org
Wed Oct 24 18:39:06 PDT 2007


On Wed, 24 Oct 2007, Phil Christensen wrote:

> I've been trying to get PyLucene to compile on my Debian box using the 
> recently released JCC source, but I'm having the missing libjava.so issue.
>
> phil at babbitt:~/PyLucene-2.2.0-1$ export 
> LD_LIBRARY_PATH=/usr/lib/jvm/java-1.5.0-sun-1.5.0.10/jre/lib/i386/:/usr/lib/jvm/java-1.5.0-sun-1.5.0.10/jre/lib/i386/client/:/usr/lib/jvm/java-1.5.0-sun-1.5.0.10/jre/lib/i386/server

Why put both client and server VMs on your LD_LIBRARY_PATH ?
Pick one of client or server and put that one only on your LD_LIBRARY_PATH.

> phil at babbitt:~/PyLucene-2.2.0-1$ sudo make install
> [long command line snip]
> Traceback (most recent call last):
> File "/usr/lib/python2.4/site-packages/jcc/__init__.py", line 27, in ?
>   from jcc import cpp
> File "/usr/lib/python2.4/site-packages/jcc/__init__.py", line 30, in ?
>   from _jcc import initVM
> ImportError: libjava.so: cannot open shared object file: No such file or 
> directory
> make: *** [install] Error 1
>
> This is happening at the last step of the installation process, when I'm 
> doing `make install` for the main PyLucene stuff. The previous compile 
> appears to run properly, and there are no issues during the 
> compile/installation of JCC.

Could it be that sudoing changes the environment you're in for some reason, 
causing LD_LIBRARY_PATH to no longer be correct ? (unsure myself).

Could it be that you installed Sun's java on your Debian box but didn't 'sudo 
update-java-alternatives' (an Ubuntu thing, maybe this doesn't exist on 
Debian) and you're picking up the 'wrong' default java (usually gcj-based).
(again unsure myself).

> This is on a freshly installed Debian etch machine, Python 2.4, and JDK 1.5.0 
> (I originally tried 1.6, but switched after experiencing the same issue).

I've used Sun Java 1.5 and 1.6, and OpenJDK 1.7 (built myself) without any 
problem (on various Ubuntu installs and Win2k). On Mac OS X, I just use the 
installed Apple Java.

Andi..


More information about the pylucene-dev mailing list