[Sablevm-developer] lt_dlopen() failing mysteriously
Brought to you by:
egagnon
From: Archie C. <ar...@de...> - 2002-11-14 02:00:06
|
Hi, I'm trying to run a Java program that uses AWT stuff, which of course requires loading the libgnu-java-awt-peer-gtk-1.0.5 native library. Although other native libraries load fine, this one does not, and the error seems to happen within libtool itself. Any ideas why lt_dlopen() would fail when given a valid filename that points to a valid shared object file? Running 'ktrace' shows sablevm successfully opening the shared object and reading the first page of it, but lt_dlopen() still returns NULL. A GDB trace is below. Thanks, -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com (gdb) break Java_java_lang_Runtime_nativeLoad Breakpoint 2 at 0x280d0404: file java_lang_Runtime.c, line 176. (gdb) c Continuing. ... [verbose class: loading "java/awt/EventQueue"] [verbose class: loading "java/awt/AWTEvent"] [verbose class: loading "java/util/EventObject"] [verbose class: creating "[Ljava/awt/AWTEvent;"] [verbose class: loading "java/awt/EventDispatchThread"] [verbose class: loading "java/lang/Thread"] [verbose class: loading "java/lang/Runnable"] [verbose class: loading "java/lang/ThreadGroup"] [verbose class: loading "java/lang/InheritableThreadLocal"] [verbose class: loading "java/lang/ThreadLocal"] [verbose class: loading "java/util/ArrayList"] loading gtkpeer Breakpoint 2, Java_java_lang_Runtime_nativeLoad (_env=0x8061200, this=0x919a0f0, _filename=0x919a0d0) at java_lang_Runtime.c:176 176 _svmt_JNIEnv *env = _svmf_cast_svmt_JNIEnv (_env); (gdb) n 177 _svmt_JavaVM *vm = env->vm; (gdb) 178 jint result = 0; (gdb) 180 _svmf_resuming_java (env); (gdb) 184 _svmt_class_loader_info *class_loader_info = (gdb) 186 _svmt_native_library *native_library = (gdb) 189 jboolean monitor_acquired = JNI_FALSE; (gdb) 191 if (_svmf_enter_object_monitor (gdb) 199 monitor_acquired = JNI_TRUE; (gdb) 201 if (_svmm_galloc_utf_chars (env, _filename, filename) != JNI_OK) (gdb) 206 handle = lt_dlopen (filename); (gdb) p filename $1 = 0x8062500 "/usr/local/lib/sablevm/libgnu-java-awt-peer-gtk-1.0.5.so" (gdb) n 0x2806ac54 in _init () from /usr/local/lib/libsablevm.so.1 (gdb) Single stepping until exit from function _init, which has no line number information. Java_java_lang_Runtime_nativeLoad (_env=0x8061200, this=0x919a0f0, _filename=0x919a0d0) at java_lang_Runtime.c:208 208 if (handle == NULL) (gdb) 210 _svmm_gfree_utf_chars (filename); (gdb) p handle $2 = 0x0 (gdb) quit The program is running. Exit anyway? (y or n) y $ file /usr/local/lib/sablevm/libgnu-java-awt-peer-gtk-1.0.5.so /usr/local/lib/sablevm/libgnu-java-awt-peer-gtk-1.0.5.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD), not stripped $ ls -l /usr/local/lib/sablevm/libgnu-java-awt-peer-gtk-1.0.5.so -rwxr-xr-x 1 root wheel 418905 Nov 13 15:45 /usr/local/lib/sablevm/libgnu-java-awt-peer-gtk-1.0.5.so* |