This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: dynamically loading libgcj (still) SEGFAULTS
- To: Johannes Zellner <johannes at zellner dot org>
- Subject: Re: dynamically loading libgcj (still) SEGFAULTS
- From: Jeff Sturm <jsturm at one-point dot com>
- Date: Mon, 24 Sep 2001 00:31:19 -0400 (EDT)
- cc: java gcc <java at gcc dot gnu dot org>
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