I'm getting an error when trying to compile the following classes with gcj:
| $ scalac hamming.scala | $ ls -lh *.class | -rw-rw-r-- 1 vadim vadim 1.1K Sep 7 20:16 hamming$$anonfun$0.class | -rw-rw-r-- 1 vadim vadim 1.1K Sep 7 20:16 hamming$$anonfun$1.class | -rw-rw-r-- 1 vadim vadim 1.1K Sep 7 20:16 hamming$$anonfun$2.class | -rw-rw-r-- 1 vadim vadim 1.5K Sep 7 20:16 hamming$$anonfun$3$$anonfun$4.class | -rw-rw-r-- 1 vadim vadim 1.5K Sep 7 20:16 hamming$$anonfun$3$$anonfun$5.class | -rw-rw-r-- 1 vadim vadim 1.5K Sep 7 20:16 hamming$$anonfun$3$$anonfun$6.class | -rw-rw-r-- 1 vadim vadim 1.3K Sep 7 20:16 hamming$$anonfun$3.class | -rw-rw-r-- 1 vadim vadim 868 Sep 7 20:16 hamming.class | -rw-rw-r-- 1 vadim vadim 2.4K Sep 7 20:16 hamming$.class | $ jar cf hamming.jar *.class | $ gcj --main=hamming --classpath=/usr/local/scala/share/scala/lib/scala-library.jar hamming.jar | hamming.scala: In class 'hamming$': | hamming.scala: In constructor '()': | hamming$.java:0: warning: assignment to final static field `MODULE$' not in class initializer | /tmp/cc8cPsFr.s: Assembler messages: | /tmp/cc8cPsFr.s:85: Error: symbol `_ZN18hamming$$anonfun$05applyEv' is already defined | /tmp/cc8cPsFr.s:514: Error: symbol `_ZN18hamming$$anonfun$15applyEv' is already defined | /tmp/cc8cPsFr.s:841: Error: symbol `_ZN18hamming$$anonfun$25applyEv' is already defined | /tmp/cc8cPsFr.s:2416: Error: symbol `_ZN18hamming$$anonfun$35applyEv' is already defined The .class files were produced by Scala 2.1.8: http://scala.epfl.ch/downloads/distrib/files/scala-2.1.8.tar.gz The above is under the following version of GCJ: | $ gcj -v | Using built-in specs. | Reading specs from /usr/lib/gcc/x86_64-redhat-linux/4.1.1/libgcj.spec | rename spec lib to liborig | Target: x86_64-redhat-linux | Configured with: ../configure --prefix=/usr --mandir=/usr/share/man \ | --infodir=/usr/share/info --enable-shared --enable-threads=posix \ | --enable-checking=release --with-system-zlib --enable-__cxa_atexit \ | --disable-libunwind-exceptions --enable-libgcj-multifile \ | --enable-languages=c,c++,objc,obj-c++,java,fortran,ada \ | --enable-java-awt=gtk --disable-dssi \ | --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre \ | --with-cpu=generic --host=x86_64-redhat-linux | Thread model: posix | gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) I will attach the offending .jar file in a minute. -- Summary: GCJ errors out when compiling .class files produced by Scala 2.1.8 Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcj AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: vnasardinov at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28979