vmkit build failure of lots of "undefined reference"

I got lots of “undefined reference” when building vmkit. Anyone can help to give a solution?

I download vmkit with “svn co http://llvm.org/svn/llvm-project/vmkit/trunk/”,
followed the instructions of “http://llvm.org/svn/llvm-project/vmkit/trunk/README.TXT”, and built vmkit on ubuntu 13.10 x64 with sunjava 1.6.0_45 + llvm 3.3 + classpath 0.99 + gcc 4.8.1. Following is the information when I build vmkit:
/home/x/llvm/source/vmkit/Release+Asserts/lib/libPrecompiled.a(Precompiled-gc.o):(.data.rel+0xbe0):undefined reference to ‘java_lang_System_bytes’
/home/x/llvm/source/vmkit/Release+Asserts/lib/libPrecompiled.a(Precompiled-gc.o):(.data.rel+0xcd0):undefined reference to ‘java_lang_Cloneable_bytes’
/home/x/llvm/source/vmkit/Release+Asserts/lib/libPrecompiled.a(Precompiled-gc.o):(.data.rel+0xdc0):undefined reference to ‘java_lang_VMObject_bytes’
/home/x/llvm/source/vmkit/Release+Asserts/lib/libPrecompiled.a(Precompiled-gc.o):(.data.rel+0xeb0):undefined reference to ‘java_lang_CloneNotSupportedException_bytes’

I have read “http://lists.cs.uiuc.edu/pipermail/vmkit-commits/2012-June/002655.html” which uses classpath-0.97.2 + llvm 3.2 + gcc 4.6.3, that’s different with me, but it’s important?


The readme is probably outdated, you should use the instructions on the web page.


Hi Gaël Thomas,

Thanks for quick response.

I have configured and made vmkit with the commands in “http://vmkit.llvm.org/get_started.html”, but the errors is still exist. In fact, I only want to convert java bytecode(.class) into llvm bitcode(.bc), can you tell me any tools to do it?

If I can convert java bytecode to llvm bitcode, I will analyze and optimize java applications with the passes of llvm. That is wonderful!

Of course, the best is using llvm (not sun-java) to compile java applications(.java), but I am afraid that would not work in some conditions. Maybe I am wrong?


在 2014-03-31 23:32:11,“Gaël Thomas” <gael.thomas00@gmail.com> 写道: