CACAO FAQ
Features of CACAO
Does CACAO run Java 1.5 bytecode?
Yes.
Building CACAO
error while loading shared libraries: unexpected reloc type 0x2f
This happens on Linux MIPS when you build with TLS enabled. Use --disable-__thread.
relocation R_X86_64_32S against `buffer_read_memory' can not be used when making a shared object
On a default Fedora system, the JVM cannot be built as a shared library (the default setting) with --enable-disassembler. The reason is that libopcodes from binutils-devel is only available as a static library. The Fedora developers' justification is that the library's API changes so frequently that it would not make sense to link dynamically against it. Unfortunately, this makes it impossible to link the disassembler into another shared library (libjvm.so in this case).
If you own the machine (i.e. have root access), the cheap solution is to remove /usr/lib64/libopcodes.so and replace it with a symlink to the shared library (libopcodes-2.19.51.0.2-17.fc11.so as of this writing).
Otherwise, you need to build binutils from source.
configure: error: cannot find ansidecl.h
You need to install the binutils-dev package. (May be binutils-devel, depending on your distribution.)
Another option is to use the configure flag --disable-disassembler, which removes this dependency.
Where do I get jni.h?
It is included in GNU Classpath. On Debian systems you find it in the classpath-common package
You may have to specify --with-classpath-includedir for this file to be found (see below).
Where do I get ltdl.h?
You need the libltdl3-dev package, or something equivalent. It's called libtool-ltdl-devel on Fedora/RHEL/CentOS.
Help! My Classpath is split into /usr/lib, /usr/include, and so on
This is the case for many distributions. You can specify the individual paths like this (for CACAO SVN):
./configure --with-classpath-libdir=/usr/lib/classpath \
--with-classpath-includedir=/usr/include/classpath \
--with-classpath-glibj-zip=/usr/share/classpath/glibj.zip
For CACAO 0.96 (
TODO: check if this really works!):
./configure --with-classpath-prefix=/usr \
--with-classpath-libdir=/usr/lib/classpath \
--with-classpath-includedir=/usr/include/classpath
Running CACAO
system_mmap_anonymous: mmap failed: Permission denied
There has been a brief discussion about this on the mailing list. Basically, the mmap call needs to be removed, and this is planned to be done in the CACAO repository soon. There's an icedtea patch that does this here.
If you own the machine in question (you have root access), you can run CACAO unmodified after doing
echo 0 > /proc/sys/vm/mmap_min_addr
as root.
Do I have to set BOOTCLASSPATH?
Short answer: No.
If you have installed CACAO (using make install or your package manager), you do not have to set BOOTCLASSPATH. If this variable is not set, CACAO will use built-in defaults to find its own and Classpath's classes. Note that setting the variable to an empty string is not the same as unsetting it. Use unset BOOTCLASSPATH to be sure.
If you compiled CACAO from source but did not install it, you can use the script contrib/setenvsource to set up the environment correctly.
I want to set BOOTCLASSPATH anyway. What's the right value?
Set it like this:
export BOOTCLASSPATH=$CACAO_PREFIX/share/cacao/vm.zip:$CLASSPATH_PREFIX/share/classpath/glibj.zip