This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
JNI debugging, "error while loading shared libraries"
- To: insight at sources dot redhat dot com
- Subject: JNI debugging, "error while loading shared libraries"
- From: William Croft <croft at mitem dot com>
- Date: Fri, 24 Aug 2001 19:51:10 -0700
- Organization: MITEM Corporation
I'd like to use insight to debug our Java JNI native functions, written in C.
A very tiny test program (below), runs fine without insight ("java hi" from
the shell).
public class hi {
public static void main(String[] args) {
System.out.println("hello world");
}
}
But firing up java with insight (the java wrapper looks at export
DEBUG_PROG=gdb), gets the following error as soon as I "run hi" from the gdb
console:
/usr/share/jbuilder5/jdk1.3/bin/i386/native_threads/java: error while loading
shared libraries: libhpi.so: cannot load shared object file: No such file or
directory
----
Do you have any ideas or workarounds? I put a "sh -x" on the java wrapper and
it IS setting up LD_LIBRARY_PATH correctly. Otherwise it wouldnt work in the
case without insight. I even tried manually adding the java libdirs to
/etc/ld.so.conf, that didnt work either.
I'm running insight+dejagnu-20010703
BTW, I get the same failure from insight in "-nw" no windows mode. And from
gdb 5.0rh-5. The OS here is RH7.1.
Thanks for your ideas.
--William