[kaffe] some problems in reduing the KaffeVM size
Dalibor Topic
robilad at kaffe.org
Mon Jul 19 12:54:17 PDT 2004
jin_leon wrote:
> hi,all
> Sorry to bother you a lot.
> i have received some helpful mails from you but i still meet some problems which i couldn't solve still.
Hi Jin,
sorry for the late reply!
> 1.compile the classlibrary
> i have read the related FAQ files carefully,and do according to them but still failed to reduce the size of library(rt.jar about 2.9M).
> next is my configure options:
> ./configure --prefix=/usr/local/cmpKaffe --disable-gcj --disable-debug --disable-xprofiling --disable-xdebugging --disable-feedback --without-profiling --without-stats --with-engine=intrp --without-exensions --enable-pure-java-math --with-threads=unix-pthreads --with-class-library-profile=/home/jin/kaffe-1.1.4/libraries/javalib/profiles/custom/profile
> (KaffeVM:Kaffe-1.1.4;i have installed a default version of KaffeVM at /usr/local/kaffe/ as JAVAC to compile the libraries
> profiles/custom/profile is a profile i defined myself according to the classlibrary-compile.faq file)
>
> After that, cd to Kaffe_src/libraries/javalib/ and do {
> #export -n JAVA
> #export -n JAVAC
> #export -n CLASSPATH
> #export JAVAC="<PATH_TO_JDK>/bin/kjc"
> #export JAVAC_FLAGS="-g:none -bootclasspath jre/lib"
> #make }
> according to the embedded.faq file, but the output information is
> "cp /home/jin/kaffe-1.1.4/./libraries/javalib/rt-precompiled.jar rt.jar"
> ,and there isn't a rt.jar i wanted at ./javalib/ .
> Could some one can tell me what is wrong during the make procedure?I still have no idea about how to compile without debuging information.
Ah! You're using the 1.1.4 release, which has got the class library
already prebuilt. So in order to rebuild it, you need it to pass
--without-rt-jar to configure.
> 2.Fabien said:
>
>>With this configure :
>
>
>>./configure --disable-nls --enable-pure-java-math
>
>
>>--with-threads=unix-pthreads --with-engine=intrp --with-libffi
>
>
>>--with-jikes --without-x
>
>
>
>
>>I have 7.2M (3.0M for rt.jar and 2.6M for jre/lib/i386) without removing
>
>
>>anything
>
>
> "diable-nls" will not support Native language and i don't konw if it will have affects when running .class program.
that only matters for localozation. So you'd lose out on the localized
usage information from kaffe. :) i.e you;d lose no functionality
required to actually run bytecodes.
> "--with-libffi" is another implements by SysdepCallMethod according to the libffi.faq but the link "http://sourceware.cygnus.com/libffi/" to download it is unable to reach.
libffi is part of gcc now. how it is packaged depends on your
distribution. I'll look into merging in libffi into kaffe this week.
> i will use qte GUI and i don't know whether it will have smaller jre/lib/i386 compared to use X GUI, and could someone can give me an answer?
probably smaller, since you don;t need to have an X implementation onthe
device. Mind you, the Xlib AWT backed works a little bit better. YMMV.
> 3.some one mentioned:
> Does it make great sense to remove the unused binaries under KaffeVm-PATH/bin ,the sum of which is 376K? I thought i had strip the dynamic binaries by 'make install -strip', but the size of the installed jre/lib/i386 is still about 4.0M. Do i mistake your meaning?
Sure. Feel free to remove all jars, binaries and libraries your code is
not using.
> i use the above options to compile the KaffeVM and make $$ make install -strip && make install, but the result is still 8.4M(2.9M for rt.jar and 4.0M for jre/lib/i386 ) ,which is far from my requirements.Do you have some good suggestion?
Use interpreter insted of jit. Use pure java math. That should shave off
another bit, too.
cheers,
dalibor topic
More information about the kaffe
mailing list