problems building vmkit

Hi All,

Thanks Nicolas for pointing out that I needed --enable-targets=x86,cpp for my
llvm config to get vmkit to build. The process gets a lot farther but fails in
different places depending upon the vmkit config (Can you please see the three
case below?).

My machine is a intel core i7 running ubuntu karmic and gcc 4.4.1.
What arch/OS/distro/gcc do you all have VMKit working on?

thanks for your help.
-ZK

  1. For any configuration with (pnet and pnetlib build successfully):
    –with-pnet-local-prefix=/home/zoewolk/RESEARCH/pnet-0.8.0 --with-pnetlib=/home/zoewolk/RESEARCH/pnetlib-0.8.0
    I get that TRACER is undefined. I messed with this some but there are two tracer functions depending on the gc
    (tracer() and tracer(…)). I’m not sure about the authors intent.
    I tried with llvm-gcc/mmtk and without it, any config with pnet-based N3 fails
    in this way. I didn’t try via mono.

    make[3]: Entering directory `/home/zoewolk/RESEARCH/vmkit/lib/N3/VMCore’
    llvm[3]: Compiling Assembly.cpp for Release build (bytecode)
    In file included from Assembly.cpp:15:
    Assembly.h:140: error: variable or field ‘TRACER’ declared void
    In file included from Assembly.cpp:19:
    N3.h:81: error: invalid use of incomplete type ‘struct mvm::VirtualMachine’
    /home/zoewolk/RESEARCH/vmkit/include/mvm/Threads/Thread.h:39: error: forward declaration of ‘struct mvm::VirtualMachine’
    N3.h:109: error: variable or field ‘TRACER’ declared void
    In file included from Assembly.cpp:21:
    VMClass.h:56: error: variable or field ‘TRACER’ declared void
    VMClass.h:140: error: variable or field ‘TRACER’ declared void

  2. For
    ./configure --with-llvmsrc=/home/zoewolk/RESEARCH/LLVMSystem/llvm --with-llvmobj=/home/zoewolk/RESEARCH/LLVMSystem/llvm
    –with-gnu-classpath-glibj=/home/zoewolk/RESEARCH/classpath-0.97.2/lib --with-gnu-classpath-libs=/home/zoewolk/RESEARCH/classpath-0.97.2/lib
    –with-llvmgcc=/home/zoewolk/RESEARCH/LLVMSystem --with-gc=mmtk

It makes it much farther but stops here:

make[2]: Leaving directory /home/zoewolk/RESEARCH/vmkit/mmtk/java' make[1]: Leaving directory /home/zoewolk/RESEARCH/vmkit/mmtk’
make[1]: Entering directory /home/zoewolk/RESEARCH/vmkit/tools' make[2]: Entering directory /home/zoewolk/RESEARCH/vmkit/tools/vmkit’
make[2]: *** No rule to make target /home/zoewolk/RESEARCH/vmkit/Release/lib/FinalMMTk.bc', needed by vmkit.bc’. Stop.
make[2]: Leaving directory /home/zoewolk/RESEARCH/vmkit/tools/vmkit' make[1]: *** [vmkit/.makeall] Error 2 make[1]: Leaving directory /home/zoewolk/RESEARCH/vmkit/tools’
make: *** [all] Error 1

ls Release/lib/
Allocator.bc J3.bc MMTKAlloc.bc MMTKRuntime.bc StaticGCPass.so
Classpath.bc J3Compiler.bc MMTk.bc Mvm.bc
CommonThread.bc JITGCPass.so MMTKMagic.so MvmCompiler.bc

  1. For
    ./configure --with-llvmsrc=/home/zoewolk/RESEARCH/LLVMSystem/llvm --with-llvmobj=/home/zoewolk/RESEARCH/LLVMSystem/llvm
    –with-gnu-classpath-glibj=/home/zoewolk/RESEARCH/classpath-0.97.2/lib --with-gnu-classpath-libs=/home/zoewolk/RESEARCH/classpath-0.97.2/lib
    I get:
    llvm[1]: Compiling vmjc.cpp for Release build
    llvm[1]: Linking Release executable vmjc (without symbols)
    /home/zoewolk/RESEARCH/vmkit/Release/lib/libGCMmap2.a(gcinit.o): In function mvm::Collector::destroy()': gcinit.cpp:(.text+0x24): undefined reference to GCAllocator::~GCAllocator()’
    gcinit.cpp:(.text+0x2c): undefined reference to GCAllocator::operator delete(void*)' /home/zoewolk/RESEARCH/vmkit/Release/lib/libGCMmap2.a(gcinit.o): In function mvm::Collector::initialise()’:
    gcinit.cpp:(.text+0x93): undefined reference to GCAllocator::operator new(unsigned long)' gcinit.cpp:(.text+0x9e): undefined reference to GCAllocator::GCAllocator()’
    collect2: ld returned 1 exit status
    make[1]: *** [/home/zoewolk/RESEARCH/vmkit/Release/bin/vmjc] Error 1
    make[1]: Leaving directory `/home/zoewolk/RESEARCH/vmkit/tools/vmjc’
    make: *** [all] Error 1

  2. This is the only build that I can get to finish without error (just fyi):
    ./configure --with-llvmsrc=/home/zoewolk/RESEARCH/LLVMSystem/llvm
    –with-llvmobj=/home/zoewolk/RESEARCH/LLVMSystem/llvm
    –with-gnu-classpath-glibj=/home/zoewolk/RESEARCH/classpath-0.97.2/lib
    –with-gnu-classpath-libs=/home/zoewolk/RESEARCH/classpath-0.97.2/lib
    –with-llvmgcc=/home/zoewolk/RESEARCH/LLVMSystem

However j3 segfaults immediately for j3 --help.
vmjc, vmkit, llcj with the -version flag, give the version. I’ve not tested beyond this.

Hi Zoe,

For 1), don’t bother with N3. It hasn’t been updated for a while, and the compilation errors don’t surprise me.
For 2), do you have the ‘ant’ tool installed? The build system should abort if it’s not there, but that has not been implemented yet.
For 3) and 4) I am not sure what the problem is. It works fine for my intel core2 duo, ubuntu lucid, gcc 4.4.3.

Maybe if you can provide me with a backtrace for 3) and 4) I could help more. I do encourage you to use MMTk (config 2) in your case). Hopefully, the only problem is that you haven’t ‘ant’ installed on your machine.

Nicolas