Testing GCJ in Linux RedHat!

Tom Tromey tromey at cygnus.com
Thu Feb 24 18:22:52 UTC 2000


>>>>> "Oscar" == Oscar Martinez de la Torre <omt at wm.estec.esa.nl> writes:

Oscar> 	I'm trying to run JAVA in ERC32 (a space microprocessor like "sparc")
Oscar> 	I'm trying Kaffe + RTEMS (A RTOS which works on ERC32)
Oscar> 	But as I'm finding lots of problems in it (any suggestions is welcome)
Oscar> 	I'm also trying GCJ approach!

As far as I know libgcj has not been ported to RTEMS.

Oscar> /opt/rtems/bin/sparc-rtems-gcj HelloWorldApp.java

>From the messages it looks like you don't have libgcj (of course), and
so you can't link.  libgcj is required to link a gcj-compiled program.

Oscar> 	Also, it seems that libgcj is no so easy to port and crosscompile!

I cross compile it routinely.
I've ported it, too.  It isn't trivial, but it is possible.
There is some help available on the web page.  Did you look there?

I doubt I'll be doing an RTEMS port unless somebody hires us to do
one.  We rely on volunteer effort for things like this.

Oscar> gcj HelloWorldApp.java  
Oscar> /usr/lib/crt1.o(.text+0x18): undefined reference to `main'
Oscar> /usr/lib/gcc-lib/i386-linux/2.95.2/libgcj.so: undefined reference to
Oscar> `__rethrow'
Oscar> /usr/lib/gcc-lib/i386-linux/2.95.2/libgcj.so: undefined reference to
Oscar> `__start_cp_handler'

Try gcj --main=HelloWorldApp HelloWorldApp.java

This is documented on our web pages:

http://sourceware.cygnus.com/java/

Tom



More information about the users mailing list