dynamically loading libgcj (still) SEGFAULTS

Jeff Sturm jsturm@one-point.com
Sun Sep 23 20:47:00 GMT 2001


On Mon, 24 Sep 2001, Johannes Zellner wrote:
> (gdb) run
> Starting program: /home/joze/fred
> dlopen: loaded "libgcjgc.so"
> dlopen: loaded "libz.so"
> (no debugging symbols found)...(no debugging symbols found)...(no
> debugging symbols found)...(no debugging symbols found)...
> Program received signal SIGSEGV, Segmentation fault.
> 0x40158182 in GC_mark_from () from /home/joze/local/lib/libgcjgc.so

You really need to link with the shared libgcc, e.g.

gcc -shared-libgcc fred.c -o fred -ldl

Else you end up with two copies of the EH runtime in your process.
FWIW your test program works fine on my RH 6.2 box.

(The problems of static initializers are well known.  I just finished
investigating a build problem on my box, in which the libjava testsuite
fails entirely although the installed runtime works.  The difference is in
library order.)

Jeff



More information about the Java mailing list