Hi,<br><br>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?<br>
<br>I remember reading somewhere that llvm code should use dyn_cast instead of dynamic_cast.  Do these need to be changed here?<br><br>A little background:<br>I'm trying to use llvm as a replacement aot compiler for the Avian JVM (see <a href="http://oss.readytalk.com">oss.readytalk.com</a>).  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).  <br>
<br>Sincerely,<br>Joshua<br><br>Here is the output of the build (after ./configure):<br><br><span class="gI"></span>make[1]: Entering directory `/home/jowarner/code/llvm/projects/java/lib'<br>make[2]: Entering directory `/home/jowarner/code/llvm/projects/java/lib/ClassFile'<br>
llvm[2]: Compiling ClassFile.cpp for Release build<br>In file included from ClassFile.cpp:17:<br>/home/jowarner/code/llvm/projects/java/include/llvm/Java/ClassFile.h:24:36: warning: llvm/Support/DataTypes.h: No such file or directory<br>
ClassFile.cpp:21:32: warning: llvm/Config/alloca.h: No such file or directory<br>In file included from ClassFile.cpp:17:<br>/home/jowarner/code/llvm/projects/java/include/llvm/Java/ClassFile.h:58: warning: comma at end of enumerator list<br>
ClassFile.cpp: In function ‘uint8_t<unnamed>::readU1(std::istream&)’:<br>ClassFile.cpp:56: error: exception handling disabled, use -fexceptions to enable<br>ClassFile.cpp: In static member function ‘static std::vector<llvm::sys::Path, std::allocator<llvm::sys::Path> > llvm::Java::ClassFile::getClassPath()’:<br>
ClassFile.cpp:143: error: ‘class llvm::sys::Path’ has no member named ‘toString’<br>ClassFile.cpp:146: warning: comparison is always true due to limited range of data type<br>ClassFile.cpp: In static member function ‘static llvm::sys::Path llvm::Java::ClassFile::getFileForClass(const std::string&)’:<br>
ClassFile.cpp:167: error: ‘class llvm::sys::Path’ has no member named ‘toString’<br>ClassFile.cpp: In member function ‘llvm::Java::ConstantClass* llvm::Java::ClassFile::getConstantClass(unsigned int) const’:<br>ClassFile.cpp:218: error: ‘dynamic_cast’ not permitted with -fno-rtti<br>
ClassFile.cpp: In member function ‘llvm::Java::ConstantMemberRef* llvm::Java::ClassFile::getConstantMemberRef(unsigned int) const’:<br>ClassFile.cpp:225: error: ‘dynamic_cast’ not permitted with -fno-rtti<br>ClassFile.cpp: In member function ‘llvm::Java::ConstantFieldRef* llvm::Java::ClassFile::getConstantFieldRef(unsigned int) const’:<br>
ClassFile.cpp:232: error: ‘dynamic_cast’ not permitted with -fno-rtti<br>ClassFile.cpp: In member function ‘llvm::Java::ConstantMethodRef* llvm::Java::ClassFile::getConstantMethodRef(unsigned int) const’:<br>ClassFile.cpp:239: error: ‘dynamic_cast’ not permitted with -fno-rtti<br>
ClassFile.cpp: In member function ‘llvm::Java::ConstantInterfaceMethodRef* llvm::Java::ClassFile::getConstantInterfaceMethodRef(unsigned int) const’:<br>ClassFile.cpp:247: error: ‘dynamic_cast’ not permitted with -fno-rtti<br>
ClassFile.cpp: In member function ‘llvm::Java::ConstantNameAndType* llvm::Java::ClassFile::getConstantNameAndType(unsigned int) const’:<br>ClassFile.cpp:254: error: ‘dynamic_cast’ not permitted with -fno-rtti<br>ClassFile.cpp: In member function ‘llvm::Java::ConstantUtf8* llvm::Java::ClassFile::getConstantUtf8(unsigned int) const’:<br>
ClassFile.cpp:261: error: ‘dynamic_cast’ not permitted with -fno-rtti<br>ClassFile.cpp: In constructor ‘llvm::Java::CodeAttribute::CodeAttribute(const llvm::Java::ClassFile*, uint16_t, std::istream&)’:<br>ClassFile.cpp:688: warning: unused variable ‘length’<br>
ClassFile.cpp: In constructor ‘llvm::Java::ExceptionsAttribute::ExceptionsAttribute(const llvm::Java::ClassFile*, uint16_t, std::istream&)’:<br>ClassFile.cpp:754: warning: unused variable ‘length’<br>make[2]: *** [/home/jowarner/code/llvm/projects/java/lib/ClassFile/Release/ClassFile.o] Error 1<br>
make[2]: Leaving directory `/home/jowarner/code/llvm/projects/java/lib/ClassFile'<br>make[1]: *** [ClassFile/.makeall] Error 2<br>make[1]: Leaving directory `/home/jowarner/code/llvm/projects/java/lib'<br>make: *** [all] Error 1<br>
jowarner@jowarner-pc:~/code/llvm/projects/java$ find ../../include/ -name DataTypes.h<br>../../include/llvm/System/DataTypes.h<br>jowarner@jowarner-pc:~/code/llvm/projects/java$ find ../../include/ -name alloca.h<br><br>