Bug#357781: cacao: linker error is pointing to the wrong library
Petter Reinholdtsen
pere at hungry.com
Sun Mar 19 14:32:39 UTC 2006
Package: cacao
Version: 0.95-1
Severity: normal
I discovered this problem while trying to get worldwind2d running. It
is related to bug #348504. When running the program using cacao, I
got a UnsatisfiedLinkError claiming that the jogl library isn't found,
despite the fact that strace show that it opened libjogl.so
successfully:
% LD_LIBRARY_PATH=.:/home/pere/src/openstreetmapsvn/ww2d-0.99.87 cacao -jar WW2D.jar
WW2D 0.99.87 by Vitaliy Pronkin <pronvit at gmail.com> starting...
Exception in thread "main" java.lang.UnsatisfiedLinkError: Native library `jogl' not found (as file `libjogl.so') in gnu.classpath.boot.library.path and java.library.path
at java.lang.Runtime.loadLibrary (Runtime.java:763)
at java.lang.System.loadLibrary (System.java:529)
at net.java.games.jogl.impl.NativeLibLoader$1.run (NativeLibLoader.java:72)
at java.security.AccessController.doPrivileged (AccessController.java:96)
at net.java.games.jogl.impl.NativeLibLoader.load (NativeLibLoader.java:58)
at net.java.games.jogl.impl.x11.X11GLContextFactory.<clinit> (X11GLContextFactory.java:50)
at java.lang.VMClass.forName (Native Method)
at java.lang.Class.forName (Class.java:161)
at net.java.games.jogl.impl.GLContextFactory.getFactory (GLContextFactory.java:69)
at net.java.games.jogl.GLDrawableFactory.createGLCanvas (GLDrawableFactory.java:150)
at net.java.games.jogl.GLDrawableFactory.createGLCanvas (GLDrawableFactory.java:118)
at net.java.games.jogl.GLDrawableFactory.createGLCanvas (GLDrawableFactory.java:85)
at org.ww2d.core.Program.main (Program.java:56)
^C
%
After a long time debugging the issue, I discovered that the problem
is a dependency of libjogl.so itself. The libjawt.so library isn't
found, and this is reported as a problem with finding libjogl.so.
% ldd libjogl.so
linux-gate.so.1 => (0xffffe000)
libGL.so.1 => /usr/X11R6/lib/libGL.so.1 (0x4014a000)
libGLU.so.1 => /usr/X11R6/lib/libGLU.so.1 (0x401ad000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4022c000)
libjawt.so => not found
libc.so.6 => /lib/tls/libc.so.6 (0x402f8000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x40430000)
libXxf86vm.so.1 => /usr/X11R6/lib/libXxf86vm.so.1 (0x40442000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40447000)
libdl.so.2 => /lib/tls/libdl.so.2 (0x40455000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x40459000)
libm.so.6 => /lib/tls/libm.so.6 (0x40537000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4055d000)
/lib/ld-linux.so.2 (0x80000000)
%
I managed to get cacao to "find" jogl by adding /usr/lib/classpath/ to
LD_LIBRARY_PATH, and thus make sure the dynamic linker is able to
locate libjawt.so. Now it hangs after displaying a gray screen. One
step further, in other words. :)
Can someone please change cacao to report more accurately that the
loading of libjogl.so fail because libjawt.so (or just some
dependency) is missing, instead of saying that libjogl.so isn't found.
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-2-386
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages cacao depends on:
ii binutils 2.16.1cvs20060117-1 The GNU assembler, linker and bina
ii classpath 2:0.90-1 clean room standard Java libraries
ii classpath-common 2:0.90-1 architecture independent files
ii libc6 2.3.6-3 GNU C Library: Shared libraries an
ii libltdl3 1.5.22-4 A system independent dlopen wrappe
ii zlib1g 1:1.2.3-11 compression library - runtime
cacao recommends no packages.
-- no debconf information
More information about the pkg-java-maintainers
mailing list