gcj on Nexenta OS

David Daney ddaney@avtrex.com
Mon Mar 5 05:50:00 GMT 2007


Khaled Mohammed wrote:
> 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.
>
You don't say what architecture this is running on .  It would be 
helpful to know that.  Also it would be nice to have a back trace from 
the failure point.

It looks like you did something similar to making a call through a NULL 
function pointer.

I don't want to sound discouraging, but I don't think much libgcj 
porting work has been done for Nexenta.  So if you want to get it 
working, you may be spending a lot of quality time with gdb.  Also I 
would not rule out problems with the C library or linker as causes.  But 
really from the information you gave it is very difficult to say what is 
wrong.


> Thanks,



More information about the Java mailing list