[kaffe] Re: Problem getting a real static kaffe-bin for ARM uClinux

Andrea Scian andrea.scian at wawnet.biz
Fri Jan 21 00:54:39 PST 2005


Hi David!

>Dear fellow Kaffe-lings,
>
>I've made good progress on getting a port of Kaffe 1.1.4 to uClinux
>2.4.22 on an ARM processor. I (like many others, it seems) can get an
>executable that will give the usage() message, but if you try to run
>code, I get "Failed to locate native library "libnative" in path: ...

Nice to hear about your progress! :-)
Due the fact that Kaffe uses libtool you will never get a "real" static 
executable, but you can only have a "semi-static" executable that will NOT 
use the Linux dynamic library loading but will make all this works on its 
own (IOW: kaffe-bin itself loads libnative and extract the right function 
pointer). I'm not an expert of libtool (I have just some minor experience 
with Kaffe and other open source project that use this tool) so, anyone 
that knows libtool better that me can correct me! :-)

You have find a way to tell to Kaffe where to find this library (which is 
what the original kaffe bash script does)... I run kaffe-bin with the 
following msh script (that I call 'java'):

#!/bin/msh
env KAFFE_NATIVE_LIBRARY_DIR=/kaffe/jre/lib/arm KAFFE_LIBDIR=/kaffe/lib \
LIBRARY_PATH=/kaffe/jre/lib/arm \
LD_LIBRARY_PATH=/kaffe/jre/lib/arm \
/kaffe/jre/bin/kaffe-bin  $*

Please note that I used /kaffe as prefix when configuring kaffe.

Best Regards,

Andrea

>
>I've tried every combination of --with-static[lib|vm|bin], but I still
>get a dynamic executable. The libtool scripts seem to be ok - they have:
>build_libtool_libs=no
>build_old_libs=yes
>allow_libtool_libs_with_static_runtimes=no
>link_static_flag="-static"
>
>
>Please, if anyone has figured this out or can point me in the right
>direction I'd really appreciate it.
>
>PS - Why does javax.naming.InitialContext depend on java.applet.Applet?
>That drags half of awt right back into the picture.
>
>
>Here's my configure script:
>
>CFLAGS="-mcpu=arm9 -Wl,-elf2flt -D__ARM__ -D__uclinux__" \
>KAFFEH="/home/dtiller/kaffe/kaffe-linux/bin/kaffeh" \
>CC="/usr/local/bin/arm-elf-gcc" \
>CXX="/usr/local/bin/arm-elf-g++" \
>AR="/usr/local/bin/arm-elf-ar" \
>NM="/usr/local/bin/arm-elf-nm" \
>../kaffe-1.1.4/configure \
>--prefix=/home/dtiller/kaffe/kaffe-arm \
>--with-class-library-profile=tagsware \
>--with-rt-jar=/home/dtiller/kaffe/kaffe-linux/jre/lib/rt.jar \
>--disable-profiling \
>--disable-xprofiling \
>--disable-xdebugging \
>--disable-feedback \
>--without-profiling \
>--without-stats \
>--disable-gcj \
>--host=arm-linux \
>--build=i686-linux \
>--enable-pure-java-math \
>--with-includes=/usr/local/arm-elf/include \
>--with-libs=/usr/local/arm-elf/lib \
>--with-staticlib \
>--with-staticvm \
>--with-staticbin \
>--enable-shared=no \
>--enable-static=yes \
>--disable-sound \
>--without-awt
>
>





More information about the kaffe mailing list