To reproduce, download: http://people.atrpms.net/~hdegoede/sdljava-0.9.1-4.fc8.src.rpm (100% free software, under review for Fedora) Make sure your java and javac alternatives point to gcj Build it on rawhide (using gcc & friends: 4.1.2-25), result: <snip> + /usr/bin/aot-compile-rpm /usr/bin/gcj -c -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fPIC -findirect-dispatch -fjni sdljava-0.9.1.jar.1.jar -o sdljava-0.9.1.jar.1.o {standard input}: Assembler messages: {standard input}:156056: Error: junk at end of line, first unrecognized character is `-' {standard input}:156057: Error: bad or irreducible absolute expression {standard input}:156057: Error: junk at end of line, first unrecognized character is `,' {standard input}:156060: Error: unrecognized symbol type "" {standard input}:156060: Error: junk at end of line, first unrecognized character is `-' {standard input}:156061: Error: expected comma after name `_CD_sdljava_audio_package' in .size directive {standard input}:156062: Error: invalid character '_' in mnemonic {standard input}:156066: Error: unrecognized symbol type "" {standard input}:156066: Error: junk at end of line, first unrecognized character is `-' <snip> {standard input}:422422: Error: expected comma after name `_catch_classes_sdljavax.gfx.package' in .size directive {standard input}:422423: Error: invalid character '_' in mnemonic make: *** [sdljava-0.9.1.jar.1.o] Error 1 aot-compile-rpm: error: /usr/bin/make exited with code 2 error: Bad exit status from /var/tmp/rpm-tmp.57191 (%install) --- Now install java-1.7.0-icedtea-devel if not already installed and set the java and javac alternatives to auto. Build again -> build succeeds. Additional notes: 1) Note that even when using icedtea, eventually gcj still gets called, so appearantly the .class files build by gcj's own javac are not liked by it (jar being the fault is highly unlikely)! 2) The sdljava demos will run fine using gcj when build with icedtea
The problem is that ant jar which is used for *.java -> *.class compilation in this package (why?) creates from package-info.java sources package-info.class (unlike e.g. ecj or gcj) and gcj assumes classes don't contain invalid characters in class names. Not sure if ant must be fixed not to do that, or instead gcj should somehow special case package-info.class, or something else. BTW, gcj -C on package-info.java, e.g.: /** Provides foo <h2>Package Specification</h2> Detailed documentation can be found here: <ul> <li><a href="http://www.foo.com">Foobar</a> </ul> */ package foo; doesn't create any output and gcj -S package-info.java ICEs.
About comment #2, I'm a bit new to the java packaging game and I can't follow you, if you want any info / answers from me can you rephrase please? Also I just tried doing an F-7 mock build of this and there things work fine, so this is a regression compared to F-7.
Patch upstream; see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33639.
In gcc-4.1.2-32.