This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: dynamically loading libgcj (still) SEGFAULTS




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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]