This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcj segmentation fault
- From: "Giovanni Visciano" <giovannivisciano at virgilio dot it>
- To: "Jeff Sturm" <jsturm at one-point dot com>
- Cc: gcc at sources dot redhat dot com
- Date: Wed, 22 Oct 2003 18:28:51 +0200
- Subject: Re: gcj segmentation fault
>On Tue, 21 Oct 2003, Giovanni Visciano wrote:
>> ./configure --prefix=/home/gio/Gcc3.3.2 --program-suffix=-3.3.2
>> make
>> make install
>>
>> added to my PATH /home/gio/Gcc3.3.2/bin,
>> and to LD_LIBRARY_PATH /home/gio/Gcc-3.3.2/lib
>>
>> gcc-3.3.2 woks without problems.
>> gcj-3.3.2 compiles my java programs but when I run them:
>>
>> ex.
>> gcj-3.3.2 --main=HelloWorld HelloWorld.java
>> (a.out created)
>> ./a.out
>> (segmentation fault)
>
>There aren't enough clues in your message to guess what may have gone
>wrong.
>
>Try running "ldd a.out" to verify it is linking to the libgcj.so in
>$prefix/lib. Try running under gdb to get a stack trace.
Thanks for your reply Jeff; this is the output:
gio@debian:~$ ldd a.out
libgcc_s.so.1 => /home/gio/Gcc-3.3.2/lib/libgcc_s.so.1 (0x40014000)
libgcj.so.4 => /home/gio/Gcc-3.3.2/lib/libgcj.so.4 (0x4001c000)
libm.so.6 => /lib/libm.so.6 (0x40805000)
libpthread.so.0 => /lib/libpthread.so.0 (0x40826000)
libdl.so.2 => /lib/libdl.so.2 (0x4083a000)
libc.so.6 => /lib/libc.so.6 (0x4083d000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
runnig a.out with gdb:
(gdb) run
Starting program: /home/gio/Desktop/a.out
[New Thread 1024 (LWP 488)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 488)]
0x79730065 in ?? ()
Giovanni.