compiling java frontend

I am looking for a way to translate Java bytecode to LLVM bytecode and the LLVM Java frontend seem like a good match for initial testing. But after checking out the svn version of the Java frontend I get the following error when running configure

configure: error: cannot find install-sh or install.sh in …/…/autoconf ./…/…/autoconf

This error persisted even after successfully regenerating configure with the ‘AutoRegen.sh’ script in the ‘java/trunk/autoconf’ subdirectory. Do you have any advice on how to configure and compile the Java frontend?

thanks,
Andreas

Which java frontend?

-Chris

I am trying to compile the Java frontend in
https:/llvm.org/svn/llvm-project/java/trunk
If there are another preferred Java frontend available, and it is suited for translating Java bytecode to LLVM bytecode, I’d be happy to use that frontend instead.

thanks,
Andreas

I am trying to compile the Java frontend in
https:/llvm.org/svn/llvm-project/java/trunk
If there are another preferred Java frontend available, and it is suited for translating Java bytecode to LLVM bytecode, I’d be happy to use that frontend instead.

That is really old and out of date, I’m sure it doesn’t work anymore. Check out http://vmkit.llvm.org/

-Chris

Thanks, I am now working on compiling up VMKit. When compiling VMKit in my up-to-date svn checkout I get several error messages on missing members of the class ‘llvm::Type’:

PNetLib.cpp: In function ‘void decapsulePrimitive(n3::VMObject*, const llvm::Type*, std::vector<llvm::GenericValue, std::allocatorllvm::GenericValue >&)’:
PNetLib.cpp:694: error: ‘Int1Ty’ is not a member of ‘llvm::Type’
PNetLib.cpp:698: error: ‘Int8Ty’ is not a member of ‘llvm::Type’

PNetLib.cpp:702: error: ‘Int16Ty’ is not a member of ‘llvm::Type’
PNetLib.cpp:706: error: ‘Int32Ty’ is not a member of ‘llvm::Type’

There are several other errors on the same form. When inspecting the source code of llvm::Type I do not see any member variables with those names, but I see member functions on the form ‘getInt1Ty(LLVMContext &C)’ where LLVMContextImpl have member variables with those names. Do you know how to solve this problem?

thanks,
Andreas

vmkit probably expects to be built against llvm 2.5, I'd recommend asking on a vmkit list like http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits

-Chris

Hi Andreas,

Since you're only looking for a Java frontend, I suggest you only build the Java frontend of vmkit and don't pass any pnet or mono information to the configure script. I haven't updated the pnet part of the .Net frontend. On the other hand, the Java frontend is up-to-date.

Nicolas

Andreas Saebjoernsen wrote:

Thanks! That worked. Everything is now set up and I am doing experiments.

Andreas