[kaffe] Kaffe on YOPY, arm-linux PDA

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


Hello.

I have successfully cross compiled Kaffe 1.1.0 
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/xlibs_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 
or making the binary size smaller?


Sebastian.


Build Options:
CC=arm-linux-gcc NM=arm-linux-nm AR=arm-linux-ar \
./configure --host=arm-linux  --build=i686-linux \ 
--with-rt-jar=/home/asteban/trash/rt.jar \
--with-threads=unix-jthreads --with-awt=X \ 
--x-includes=/usr/arm-linux/X11R6/include/ \ 
--x-libraries=/usr/arm-linux/X11R6/lib/ \
--with-x  && make

Compiler:
GMates cross compile toolchain.
Based on gcc 2.95.2 

During the build procecc I ran in two small problems:

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

*** kaffe-1.1.0/libraries/clib/net/InetAddressImpl.c    2003-05-15 
17:03:16.000000000 +0200
--- kaffe-1.1.0-arm-linux/libraries/clib/net/InetAddressImpl.c  2003-07-04 
12:35:22.000000000 +0200
***************
*** 410,416 ****
                memcpy(&sin6->sin6_addr,
                       unhand_byte_array(addr),
                       addr->length);
-               sin6->sin6_scope_id = 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../../../include \
    -I../../../kaffe -DKVER=\"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-jthreads \
    -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/InetAddressImpl.o
InetAddressImpl.c: In function \  
   `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 \ 
   »/home/asteban/trash/kaffe-1.1.0/libraries/clib/net«
make[1]: *** [all-recursive] Fehler 1
make[1]: Verlassen des Verzeichnisses \
   »/home/asteban/trash/kaffe-1.1.0/libraries/clib«
make: *** [all-recursive] Fehler 1


2. It inherently uses /usr/lib/libjpeg.so instead of 
/usr/arm-linux/lib/libjpeg.so
I also tryed to set the lib dirs by the following options:
	LDFLAGS=-L/usr/arm-linux/lib/ 
	--with-libraries=/usr/arm-linux/lib/
	--with-awtlibpath=/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 \ 
   -lICE -lX11  -Wl,-soname -Wl,libawt-1.1.0.so -Wl,-retain-symbols-file  \ 
   -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 
    `_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 \ 
   »/home/asteban/trash/kaffe-1.1.0/libraries/clib/awt/X«
make[2]: *** [all-recursive] Fehler 1
make[2]: Verlassen des Verzeichnisses \ 
   »/home/asteban/trash/kaffe-1.1.0/libraries/clib/awt«
make[1]: *** [all-recursive] Fehler 1
make[1]: Verlassen des Verzeichnisses \
   »/home/asteban/trash/kaffe-1.1.0/libraries/clib«
make: *** [all-recursive] Fehler 1







More information about the kaffe mailing list