[kaffe] Problems with kaffe and ARM9

Achim Ehrlich aehrlich at taskit.de
Mon Jun 6 00:49:50 PDT 2005


Hello All,

I'm trying to compile and run kaffe-1.1.5 on an Atmel ARM9 and Linux-2.4.26. I'm using gcc-2.95.3. Everything cross-compiles happily, but when I try to run a simple helloworld application, the enviroment crashes with the error *java/lang/NullPointerException*. The error is different for jit or intrp. I found similar posts on the mailing list, but compiling the whole with libffi didn't help nor I'm i on  a XScale either.

I invoked configure with:

 $ ../kaffe-1.1.5/configure --target=arm --host=arm-linux --build=i386-linux --
disable-xprofiling  --disable-alsotest --disable-esdtest --disable-sound --without-profiling --without-stats --disable-static --prefix=/develop/portux/56597/kaffe-arm-install --exec-prefix=/develop/portux/56597/kaffe-arm-install --without-alsa --without-classpath-gtk-awt --without-x --without-esd --with-staticvm=no --with-staticbin=no --enable-pure-java-math --with-engine=intrp --with-includes=/usr/arm-linux/include --with-libraries=/usr/arm-linux/lib --with-libffi

When I run java -fullversion, which works fine  I get:

Engine: Just-in-time   Version: 1.1.5   Java Version: 1.1
Configuration/Compilation options:
  Compile date     : Fri Jun 3 15:31:49 CEST 2005
  Compile host     : gieselher
  Install prefix   : /develop/portux/56597/kaffe-arm-install
  Thread system    : unix-pthreads
  Garbage Collector: kaffe-gc
  CC               : arm-linux-gcc
  CFLAGS           : -g -O2 -Wall -fsigned-char -fno-omit-frame-pointer -pthread
 -DENABLE_BINRELOC
  LDFLAGS          :
  ChangeLog head   : 2005-04-05  Jim Pick  <jim at kaffe.org>

When I start the hello-world application with --with-engine=jit, the whole crashes with a kernel oops:

root at Portux920T:$ ./java -v HelloWorld
pc : [<4007e874>]    lr : [<4007e848>]    Not tainted
sp : bffff934  ip : bffff934  fp : bffff95c
r10: 400a37b8  r9 : 00010000  r8 : 00000000
r7 : 00000001  r6 : 000ba02c  r5 : 400a88d8  r4 : 00001000
r3 : c0000000  r2 : bffff000  r1 : 400a88d8  r0 : 00001000
Flags: nzCv  IRQs on  FIQs on  Mode USER_32  Segment user
Control: C000317F  Table: 2272C000  DAC: 00000015

The output is quite different for --with-engine=intrp, java stops execution after some oopses with a NULL-Pointer exception (I omitted the loaded classes before the oops to shorten the message):

Loading java/lang/reflect/Array.class(/develop/portux/56597/kaffe-arm-install/jr
e/lib/rt.jar) [compressed]
pc : [<4020be10>]    lr : [<4004fd0c>]    Not tainted
sp : bfffc6b8  ip : 00000000  fp : bfffc744
r10: 4008d164  r9 : 00000001  r8 : 00000000
r7 : 00000003  r6 : bfffc9e8  r5 : bfffc6d8  r4 : 00000000
r3 : 00000000  r2 : 00000020  r1 : 00000000  r0 : 00000000
Flags: nzCv  IRQs on  FIQs on  Mode USER_32  Segment user
Control: C000317F  Table: 2272C000  DAC: 00000015
Loading java/lang/ExceptionInInitializerError.class(/develop/portux/56597/kaffe-
arm-install/jre/lib/rt.jar) [compressed]
pc : [<4020be10>]    lr : [<4004fd0c>]    Not tainted
sp : bfffc654  ip : 00000000  fp : bfffc6e0
r10: 4008d164  r9 : 00000001  r8 : 00000009
r7 : 00000003  r6 : bfffc94c  r5 : bfffc674  r4 : 00000000
r3 : 00000000  r2 : 00000020  r1 : 00000000  r0 : 00000000
Flags: nzCv  IRQs on  FIQs on  Mode USER_32  Segment user
Control: C000317F  Table: 2272C000  DAC: 00000015
pc : [<4020be10>]    lr : [<4004fd0c>]    Not tainted
sp : bfffcc3c  ip : 00000000  fp : bfffccc8
r10: 4008d164  r9 : 00000001  r8 : 00000009
r7 : 00000003  r6 : bfffcf34  r5 : bfffcc5c  r4 : 00000000
r3 : 00000000  r2 : 00000020  r1 : 00000000  r0 : 00000000
Flags: nzCv  IRQs on  FIQs on  Mode USER_32  Segment user
Control: C000317F  Table: 2272C000  DAC: 00000015
pc : [<4020be10>]    lr : [<4004fd0c>]    Not tainted
sp : bfffd930  ip : 00000000  fp : bfffd9bc
r10: 4008d164  r9 : 00000001  r8 : 00000009
r7 : 00000003  r6 : bfffdc28  r5 : bfffd950  r4 : 00000000
r3 : 00000000  r2 : 00000020  r1 : 00000000  r0 : 00000000
Flags: nzCv  IRQs on  FIQs on  Mode USER_32  Segment user
Control: C000317F  Table: 2272C000  DAC: 00000015
pc : [<4020be10>]    lr : [<4004fd0c>]    Not tainted
sp : bfffe16c  ip : 00000000  fp : bfffe1f8
r10: 4008d164  r9 : 00000001  r8 : 00000009
r7 : 00000003  r6 : bfffe464  r5 : bfffe18c  r4 : 00000000
r3 : 00000000  r2 : 00000020  r1 : 00000000  r0 : 00000000
Flags: nzCv  IRQs on  FIQs on  Mode USER_32  Segment user
Control: C000317F  Table: 2272C000  DAC: 00000015
Internal error: caught an unexpected exception.
Please check your CLASSPATH and your installation.
java/lang/NullPointerException
        at java.lang.VMThrowable.fillInStackTrace(VMThrowable.java:76)
        at java.lang.Throwable.fillInStackTrace(Throwable.java:498)
        at java.lang.Throwable.<init>(Throwable.java:159)
        at java.lang.Error.<init>(Error.java:81)
        at java.lang.LinkageError.<init>(LinkageError.java:72)
        at java.lang.ExceptionInInitializerError.<init>(ExceptionInInitializerEr
ror.java:97)
        at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:772)
Aborted

I tried to compile with libffi and without, also with the debian toolchain instead of mine and other versions of kaffe (1.1.3 and 1.07). The error remains the same. Now I'm a little clueless. Any pointer in what direction to look for a solution would be highly appreciated.

Best Regards

Achim Ehrlich



-- 
taskit Rechnertechnik GmbH
Seelenbinderstr. 33
D-12555 Berlin
email:aehrlich at taskit.de web:http://www.taskit.de
Tel.: ++49 30 611295-25
Fax: ++49 30 611295-11








More information about the kaffe mailing list