I thought MMTk is written in java and it is compiled by javac.
It is compiled by javac to produce Java bytecode. Then vmkit runs the initialization code of MMTk (through the JIT) and generates the binary code through llvm.
Could you do make ENABLE_OPTIMIZED=1 clean and then make ENABLE_OPTIMIZED=1 ? Some files may have not been generated because of the missing JIT and that screwed up the Makefile.
#0 0x000000000050cf37 in j3::JavaMethod::invokeIntSpecialAP(j3::Jnjvm*, j3::Class*, j3::JavaObject*, __va_list_tag*) () #1 0x000000000050d715 in j3::JavaMethod::invokeIntSpecial(j3::Jnjvm*, j3::Class*, j3::JavaObject*, ...) () #2 0x0000000000524af8 in j3::JavaObjectClass::getDeclaredConstructors(j3::JavaObjectClass*, bool) () #3 0x0000000000530496 in Java_java_lang_VMClass_getDeclaredConstructors () #4 0x00007ffff5fbaa40 in ?? () #5 0x00000001100fdf80 in ?? () #6 0x00007ffff5fba9fb in ?? () #7 0x0000000002147dd0 in ?? () #8 0x0000000000000000 in ?? ()
My LLVMRuntime.inc /does/ have a lot of stuff in the "// Type Definitions" and "// Function Declarations" sections (and nothing in the other sections).
This error occurs on a CentOS 5.8 system. llvm, clang, and vmkit are all being built from SVN (llvm and clang themselves were built with gcc 4.6.2). I've seen the same error on an OS X machine (10.7.3).
I finally found the root of the problem. Build was unable to locate llvm-build because it was looking for it in
path/to/vmkit_src/utils/llvm-build while it was located in path/to/llvm_src/utils/llvm-build
Actually llvm-build's path is defined by the path/to/llvm_src/Makefile.rules and looks like this
LLVMBuildTool := $(PROJ_SRC_ROOT)/utils/llvm-build/llvm-build
however in the case of vmkit it should be
LLVMBuildTool := $(LLVM_SRC_ROOT)/utils/llvm-build/llvm-build
i Also noticed that in the vmkit's generated (by configure) Makefile.config there are defined PROJ_SRC_ROOT and VMKIT_SRC_ROOT as well as PROJ_OBJ_ROOT and VMKIT_OBJ_ROOT. What should be the difference between PROJ_* and VMKIT_* paths? In my case they where equal (so what's the need for 2 different variables?)
I hope the first section will help you to create a patch
(i edited my Makefile.rules just before configuring vmkit to make it work)
Is there any manual/documentation available for vmkit?
vmkit.llvm.org is all there is Otherwise, you can find published papers on the website, but they’re not very verbose on how the engineering works.
Do you know if there is an easy way to completely disable JIT and interpret the code instead?
vmkit was built with JIT in mind, and I’m not sure the interpreter implements all of vmkit’s requirements. So I would say no, I don’t know of an easy way to just use the interpreter.