[kaffe] Kaffe on YOPY, arm-linux PDA

Sebastian Mancke mancke@mancke-software.de
Fri Jul 4 16:32:02 2003


Hello.

I have successfully cross compiled Kaffe 1.1.0=20
for my arm-linux based PDA: YOPY, from GMate.
(Thanks for the FAQ.cross-compiling)

It seems to work fine.

For correct fonts, i had to update the libX11.so.6 on the YOPY.
(http://familiar.handhelds.org/familiar/releases/v0.5.2/packages/armv4l/x=
libs_4.1-5_arm.ipk)

I will provide the binary package at.:
http://www.mancke-software.de/yopy/java.html

The YOPY has 207 MHz and 64 MB SD Ram
(The ram is used for both: filesystem and working memory.)
Is it possible to optimize Kaffe for such small systems?
For example by compile options for heap sizes=20
or making the binary size smaller?


Sebastian.


Build Options:
CC=3Darm-linux-gcc NM=3Darm-linux-nm AR=3Darm-linux-ar \
./configure --host=3Darm-linux  --build=3Di686-linux \=20
--with-rt-jar=3D/home/asteban/trash/rt.jar \
--with-threads=3Dunix-jthreads --with-awt=3DX \=20
--x-includes=3D/usr/arm-linux/X11R6/include/ \=20
--x-libraries=3D/usr/arm-linux/X11R6/lib/ \
--with-x  && make

Compiler:
GMates cross compile toolchain.
Based on gcc 2.95.2=20

During the build procecc I ran in two small problems:

1. I had to remove the line 431 in=20
kaffe-1.1.0/libraries/clib/net/InetAddressImpl.c

*** kaffe-1.1.0/libraries/clib/net/InetAddressImpl.c    2003-05-15=20
17:03:16.000000000 +0200
--- kaffe-1.1.0-arm-linux/libraries/clib/net/InetAddressImpl.c  2003-07-0=
4=20
12:35:22.000000000 +0200
***************
*** 410,416 ****
                memcpy(&sin6->sin6_addr,
                       unhand_byte_array(addr),
                       addr->length);
-               sin6->sin6_scope_id =3D 0;
                break;
  #endif
        default:
--- 410,415 ----
(Is the diff format ok? diff -c file_old file_mine)

Error message:
arm-linux-gcc -DHAVE_CONFIG_H -I. -I. -I../../../config -I../../../includ=
e \
    -I../../../kaffe -DKVER=3D\"1.1.0\" \
    -I/home/asteban/trash/kaffe-1.1.0/./kaffe/kaffevm \
    -I/home/asteban/trash/kaffe-1.1.0/./kaffe/kaffevm/systems/unix-jthrea=
ds \
    -I../../../config -I../../../include -DKAFFE_VMDEBUG -g -O2 -Wall \
    -Wstrict-prototypes -fsigned-char -c InetAddressImpl.c \
    -Wp,-MD,.deps/InetAddressImpl.TPlo  -fPIC -DPIC -o .libs/InetAddressI=
mpl.o
InetAddressImpl.c: In function \ =20
   `java_net_NativeInetAddressImpl_getHostByAddr0':
InetAddressImpl.c:413: structure has no member named `sin6_scope_id'
make[2]: *** [InetAddressImpl.lo] Fehler 1
make[2]: Verlassen des Verzeichnisses \=20
   =BB/home/asteban/trash/kaffe-1.1.0/libraries/clib/net=AB
make[1]: *** [all-recursive] Fehler 1
make[1]: Verlassen des Verzeichnisses \
   =BB/home/asteban/trash/kaffe-1.1.0/libraries/clib=AB
make: *** [all-recursive] Fehler 1


2. It inherently uses /usr/lib/libjpeg.so instead of=20
/usr/arm-linux/lib/libjpeg.so
I also tryed to set the lib dirs by the following options:
	LDFLAGS=3D-L/usr/arm-linux/lib/=20
	--with-libraries=3D/usr/arm-linux/lib/
	--with-awtlibpath=3D/usr/arm-linux/lib/
Theese had no affects.
My dirty fix was replacing the PC lib with an link to the arm lib.

Error message:
arm-linux-gcc -shared  .libs/tlk.o .libs/wnd.o .libs/evt.o .libs/gra.o \
   .libs/fnt.o .libs/clr.o .libs/img.o .libs/imggif.o .libs/imgjpeg.o \
   .libs/imgpng.o .libs/cbd.o  -Wl,--rpath -Wl,/usr/arm-linux/X11R6/lib/ =
\
   /usr/lib/libjpeg.so -lpng -lz -lm -L/usr/arm-linux/X11R6/lib/ -lXext -=
lSM \=20
   -lICE -lX11  -Wl,-soname -Wl,libawt-1.1.0.so -Wl,-retain-symbols-file =
 \=20
   -Wl,.libs/libawt.exp -o .libs/libawt-1.1.0.so
/usr/lib/libjpeg.so(*ABS*+0x1d218): multiple definition of `_DYNAMIC'
/usr/arm-linux/lib/crti.o(.dynamic+0x0): first defined here
/usr/lib/libjpeg.so: In function `_init':
/usr/lib/libjpeg.so(.init+0x0): multiple definition of `_init'
/usr/arm-linux/lib/crti.o(.init+0x0): first defined here
/usr/lib/libjpeg.so: In function `_fini':
/usr/lib/libjpeg.so(.fini+0x0): multiple definition of `_fini'
/usr/arm-linux/lib/crti.o(.fini+0x0): first defined here
/usr/lib/libjpeg.so(*ABS*+0x1d2f4): multiple definition of=20
    `_GLOBAL_OFFSET_TABLE_'
/usr/arm-linux/lib/crti.o(.got.plt+0x0): first defined here
collect2: ld returned 1 exit status
make[3]: *** [libawt.la] Fehler 1
make[3]: Verlassen des Verzeichnisses \=20
   =BB/home/asteban/trash/kaffe-1.1.0/libraries/clib/awt/X=AB
make[2]: *** [all-recursive] Fehler 1
make[2]: Verlassen des Verzeichnisses \=20
   =BB/home/asteban/trash/kaffe-1.1.0/libraries/clib/awt=AB
make[1]: *** [all-recursive] Fehler 1
make[1]: Verlassen des Verzeichnisses \
   =BB/home/asteban/trash/kaffe-1.1.0/libraries/clib=AB
make: *** [all-recursive] Fehler 1