[LLVMdev] java front-end

Joshua Warner joshuawarner32 at gmail.com
Fri Jul 16 09:41:31 PDT 2010


Hi,

I'm trying to use the Java front-end (which, based on svn commits, appears
to be three-years-dead), and I'm running into some build errors.  In that
time did llvm change from building with exception handling and rtti to
building without?

I remember reading somewhere that llvm code should use dyn_cast instead of
dynamic_cast.  Do these need to be changed here?

A little background:
I'm trying to use llvm as a replacement aot compiler for the Avian JVM (see
oss.readytalk.com).  I figured I may be able to complete the java front end,
and sufficiently parameterize it to be used with Avian (which will
essentially just provide runtime services like GC and exception handling).

Sincerely,
Joshua

Here is the output of the build (after ./configure):

make[1]: Entering directory `/home/jowarner/code/llvm/projects/java/lib'
make[2]: Entering directory
`/home/jowarner/code/llvm/projects/java/lib/ClassFile'
llvm[2]: Compiling ClassFile.cpp for Release build
In file included from ClassFile.cpp:17:
/home/jowarner/code/llvm/projects/java/include/llvm/Java/ClassFile.h:24:36:
warning: llvm/Support/DataTypes.h: No such file or directory
ClassFile.cpp:21:32: warning: llvm/Config/alloca.h: No such file or
directory
In file included from ClassFile.cpp:17:
/home/jowarner/code/llvm/projects/java/include/llvm/Java/ClassFile.h:58:
warning: comma at end of enumerator list
ClassFile.cpp: In function ‘uint8_t<unnamed>::readU1(std::istream&)’:
ClassFile.cpp:56: error: exception handling disabled, use -fexceptions to
enable
ClassFile.cpp: In static member function ‘static
std::vector<llvm::sys::Path, std::allocator<llvm::sys::Path> >
llvm::Java::ClassFile::getClassPath()’:
ClassFile.cpp:143: error: ‘class llvm::sys::Path’ has no member named
‘toString’
ClassFile.cpp:146: warning: comparison is always true due to limited range
of data type
ClassFile.cpp: In static member function ‘static llvm::sys::Path
llvm::Java::ClassFile::getFileForClass(const std::string&)’:
ClassFile.cpp:167: error: ‘class llvm::sys::Path’ has no member named
‘toString’
ClassFile.cpp: In member function ‘llvm::Java::ConstantClass*
llvm::Java::ClassFile::getConstantClass(unsigned int) const’:
ClassFile.cpp:218: error: ‘dynamic_cast’ not permitted with -fno-rtti
ClassFile.cpp: In member function ‘llvm::Java::ConstantMemberRef*
llvm::Java::ClassFile::getConstantMemberRef(unsigned int) const’:
ClassFile.cpp:225: error: ‘dynamic_cast’ not permitted with -fno-rtti
ClassFile.cpp: In member function ‘llvm::Java::ConstantFieldRef*
llvm::Java::ClassFile::getConstantFieldRef(unsigned int) const’:
ClassFile.cpp:232: error: ‘dynamic_cast’ not permitted with -fno-rtti
ClassFile.cpp: In member function ‘llvm::Java::ConstantMethodRef*
llvm::Java::ClassFile::getConstantMethodRef(unsigned int) const’:
ClassFile.cpp:239: error: ‘dynamic_cast’ not permitted with -fno-rtti
ClassFile.cpp: In member function ‘llvm::Java::ConstantInterfaceMethodRef*
llvm::Java::ClassFile::getConstantInterfaceMethodRef(unsigned int) const’:
ClassFile.cpp:247: error: ‘dynamic_cast’ not permitted with -fno-rtti
ClassFile.cpp: In member function ‘llvm::Java::ConstantNameAndType*
llvm::Java::ClassFile::getConstantNameAndType(unsigned int) const’:
ClassFile.cpp:254: error: ‘dynamic_cast’ not permitted with -fno-rtti
ClassFile.cpp: In member function ‘llvm::Java::ConstantUtf8*
llvm::Java::ClassFile::getConstantUtf8(unsigned int) const’:
ClassFile.cpp:261: error: ‘dynamic_cast’ not permitted with -fno-rtti
ClassFile.cpp: In constructor
‘llvm::Java::CodeAttribute::CodeAttribute(const llvm::Java::ClassFile*,
uint16_t, std::istream&)’:
ClassFile.cpp:688: warning: unused variable ‘length’
ClassFile.cpp: In constructor
‘llvm::Java::ExceptionsAttribute::ExceptionsAttribute(const
llvm::Java::ClassFile*, uint16_t, std::istream&)’:
ClassFile.cpp:754: warning: unused variable ‘length’
make[2]: ***
[/home/jowarner/code/llvm/projects/java/lib/ClassFile/Release/ClassFile.o]
Error 1
make[2]: Leaving directory
`/home/jowarner/code/llvm/projects/java/lib/ClassFile'
make[1]: *** [ClassFile/.makeall] Error 2
make[1]: Leaving directory `/home/jowarner/code/llvm/projects/java/lib'
make: *** [all] Error 1
jowarner at jowarner-pc:~/code/llvm/projects/java$ find ../../include/ -name
DataTypes.h
../../include/llvm/System/DataTypes.h
jowarner at jowarner-pc:~/code/llvm/projects/java$ find ../../include/ -name
alloca.h
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100716/176fa5da/attachment.html>


More information about the llvm-dev mailing list