This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/204: JNI debugging, "error while loading shared libraries"
- To: gdb-gnats at sources dot redhat dot com
- Subject: gdb/204: JNI debugging, "error while loading shared libraries"
- From: croft at mitem dot com
- Date: 27 Aug 2001 17:38:50 -0000
- Reply-To: croft at mitem dot com
>Number: 204
>Category: gdb
>Synopsis: JNI debugging, "error while loading shared libraries"
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 27 10:48:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: croft@mitem.com
>Release: insight+dejagnu-20010703
>Organization:
>Environment:
RH 7.1
>Description:
I'd like to use gdb/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
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: