libgcj-4 puts /usr/lib before LD_LIBRARY_PATH in any case

Yuval Kfir yuvalk@mainsoft.com
Tue Nov 21 15:01:00 GMT 2006


We have a native shared library that depends on a library called
libuuid.so.  This is not the default /usr/lib/libuuid.so but a
completely different library, and the directory containing it is the
first directory in LD_LIBRARY_PATH.

However, running 'java' still opens libuuid.so from /usr/lib.  Looking
at strace output, I can see it _always_ checks /usr/lib before the
directories listed in LD_LIBRARY_PATH, for any library it loads.  Hence,
it finds the system's libuuid.so before the correct one.

This is libgcj-4.0.0-8 on Fedora Core 4.

Is there anything I can do to make libgcj look in LD_LIBRARY_PATH before
it checks /usr/lib?



More information about the Java mailing list