Getting Started: Building and Running VMKit
This page gives you the shortest path to checking out vmkit and demos a few options. This should get you up and running with the minimum of muss and fuss. If you like what you see, please consider getting involved with the vmkit community.
Building vmkit / working with the code
If you would like to check out and build the project, the current scheme is:
Prerequisites
You will have to install a C++ compiler and Java 1.5 or more in order to
compile vmkit2
- Download LLVM 3.2 and Clang 3.2 source code.
- tar zxvf llvm-3.2.src.tar.gz
- cd llvm-3.2.src/tools
- tar zxvf ../../clang-3.2.src.tar.gz
- mv clang-3.2.src clang
- cd ..
- ./configure --enable-optimized; make
- Download GNU Classpath 0.99:
- tar zxvf classpath-0.99.tar.gz
- cd classpath-0.99
- ./configure --disable-plugin --disable-examples --disable-Werror; make
- cd lib
- If you are running on Linux:
- ln -s ../native/jni/gtk-peer/.libs/libgtkpeer.so;
- ln -s ../native/jni/gconf-peer/.libs/libgconfpeer.so;
- ln -s ../native/jni/java-io/.libs/libjavaio.so;
- ln -s ../native/jni/java-lang/.libs/libjavalangreflect.so;
- ln -s ../native/jni/java-lang/.libs/libjavalang.so;
- ln -s ../native/jni/java-net/.libs/libjavanet.so;
- ln -s ../native/jni/java-nio/.libs/libjavanio.so;
- ln -s ../native/jni/java-util/.libs/libjavautil.so;
- If you are running on MacOS:
- ln -s ../native/jni/gtk-peer/.libs/libgtkpeer.dylib;
- ln -s ../native/jni/gconf-peer/.libs/libgconfpeer.dylib;
- ln -s ../native/jni/java-io/.libs/libjavaio.dylib;
- ln -s ../native/jni/java-lang/.libs/libjavalangreflect.dylib;
- ln -s ../native/jni/java-lang/.libs/libjavalang.dylib;
- ln -s ../native/jni/java-net/.libs/libjavanet.dylib;
- ln -s ../native/jni/java-nio/.libs/libjavanio.dylib;
- ln -s ../native/jni/java-util/.libs/libjavautil.dylib;
- Checkout vmkit:
- svn co http://llvm.org/svn/llvm-project/vmkit/trunk vmkit
- Configure vmkit:
- ./configure
- --with-llvm-config-path=<path/to/llvm-config>
- Tell vmkit where the llvm-config binary is located.
--with-mmtk-plan=-
- org.mmtk.plan.marksweep.MS (default)
- org.mmtk.plan.copyms.CopyMS
- org.mmtk.plan.semispace.SS
- org.mmtk.plan.immix.Immix
- org.mmtk.plan.generational.marksweep.GenMS
- org.mmtk.plan.generational.copying.GenCopy
- org.mmtk.plan.generational.immix.GenImmix
-
you can use GNU Classpath by configuring the following :
- --with-gnu-classpath-glibj=<path/to/file/glibj.zip>
- Tell vmkit where GNU Classpath glibj.zip is located.
- --with-gnu-classpath-libs=<path/to/libs/directory>
- Tell vmkit where GNU Classpath libs are located.
-
or OpenJDK by configuring :
- --with-classpath-impl=openjdk
- Tell vmkit to use OpenJDK classpath implementation.
- --with-openjdk-path=<directory>
- Tell vmkit where OpenJDK is located.
- Build vmkit:
- make (this will give you a release build)
- Try it out: (assuming vmkit/Release+Asserts/bin is in your path)
- j3 --help
- j3 HelloWorld
Skip the Classpath steps if you plan to use OpenJDK.