http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55716
Bug #: 55716 Summary: [4.8 Regression] gjavah crashes Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcj AssignedTo: unassig...@gcc.gnu.org ReportedBy: ja...@gcc.gnu.org For redhat/gcc-4_X-branch, I remove all gjavah --cni generated headers (and *.class files and *.jar files except for libjava.jar testcase), then build with --enable-java-maintainer-mode. If I use gcc 4.7.2 gjavah for that (also on the trunk tree), everything works fine, but with gcc 4.8.0 gjavah it fails. $ gjavah --cni --all ../../../libjava/classpath/lib --cmdfile=../../../libjava/headers.txt -d ../../../libjava --force java.io.IOException: can't find class file gnu/xml/stream/XMLParser$ContentModel.class in java.net.URLClassLoader{urls=[file:/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre/lib/rt.jar], parent=gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}} at gnu.classpath.tools.javah.Main.getClass(libgcj-tools.so.14) at gnu.classpath.tools.javah.Main.parseClasses(libgcj-tools.so.14) at gnu.classpath.tools.javah.Main.parseClasses(libgcj-tools.so.14) at gnu.classpath.tools.javah.Main.run(libgcj-tools.so.14) at gnu.classpath.tools.javah.Main.main(libgcj-tools.so.14) Usually I'm using hack like # If we don't have gjavah in $PATH, try to build it with the old gij mkdir java_hacks cd java_hacks cp -a ../../libjava/classpath/tools/external external mkdir -p gnu/classpath/tools cp -a ../../libjava/classpath/tools/gnu/classpath/tools/{common,javah,getopt} gnu/classpath/tools/ cp -a ../../libjava/classpath/tools/resource/gnu/classpath/tools/common/messages.properties gnu/classpath/tools/common cp -a ../../libjava/classpath/tools/resource/gnu/classpath/tools/getopt/messages.properties gnu/classpath/tools/getopt cd external/asm; for i in `find . -name \*.java`; do gcj --encoding ISO-8859-1 -C $i -I.; done; cd ../.. for i in `find gnu -name \*.java`; do gcj -C $i -I. -Iexternal/asm/; done gcj -findirect-dispatch -O2 -fmain=gnu.classpath.tools.javah.Main -I. -Iexternal/asm/ `find . -name \*.class` -o gjavah.real cat > gjavah <<EOF #!/bin/sh export CLASSPATH=`pwd`${CLASSPATH:+:$CLASSPATH} exec `pwd`/gjavah.real "\$@" EOF chmod +x `pwd`/gjavah and prepend that java_hacks/ into $PATH for gcc bootstrap, that method fails the exact same way. Initially I thought there would be some issue with this way of creating gjavah, but when I've used system gjavah (removed this one), bootstrapped/regtested it fine, then installed the new gcc + gcc-java/libgcj etc., and using the new (4.8.0) system gjavah it failed the same way.