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]
Other format: [Raw text]

gcj on Nexenta OS


Hi,

I am using the Alpha 6 version of Nexenta and the following gcj version:
khaled@myhost:~/java.src$ gcj --version
gcj (GCC) 4.1.0 (GNU_OpenSolaris 4.1.0-1nexenta8)

I have tried the following simple example:
import java.io.*;

public class HelloWorld {
       public static void main(String [] args) {
               System.out.println("Hello " + args[0]);
       }
}

Example is compiled using:
khaled@myhost:~/java.src$ gcj -g HelloWorld.java -o hello --main=HelloWorld

The example compiles without any error both to bytecode and native binary.

bytecode seems to run fine under sun jre but the native code crashes.
Here is the output under gdb:

khaled@myhost:~/java.src$ gdb hello
(gdb) run khaled
Starting program: /export/home/khaled/java.src/hello khaled
warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074
warning: Lowest section in /lib/librt.so.1 is .dynamic at 00000074

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()

I would appreciate any advice on debugging this problem.

Thanks,
--
- Khaled


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