Java code (compiles fine with blackdown): public class hello { public static void main(String[] args) { System.out.println("Hello\n"); } } Compile attempt: ligur tmp # gcj hello.java hello.java:1: Internal compiler error in make_class_data, at java/class.c:1676 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugs.gentoo.org/> for instructions. ligur tmp # GCJ version: ligur tmp # gcj -v Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/specs Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/libgcj.spec rename spec lib to liborig Configured with: /var/tmp/portage/gcc-3.2.3-r1/work/gcc-3.2.3/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.2 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/info --enable-shared --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++,ada,f77,objc,java --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext Thread model: posix gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1, propolice) ligur tmp # Compile attempt with syntactically erronous java code (having inserted "blurk!?" as the first line in the code file): ligur tmp # gcj hello.java hello.java:1: Class or interface declaration expected. blurk!? ^ 1 error ligur tmp # (Thus the syntax checking works fine, the problem arises later than that) Reproducible: Always Steps to Reproduce: 1.Write a hello world java file 2.Try to compile it with GCJ 3. Actual Results: It failed with an internal compiler error Expected Results: It should have produced a native machine code executable. (Or, actually, it should probably have complained that I hadn't specified the "main" class. Doing this doesn't help though). Portage 2.0.48-r5 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1) ================================================================= System uname: 2.4.21_rc8-gss-jp5 i686 AMD Athlon(TM) XP 1800+ GENTOO_MIRRORS="http://skrotix.itm.mh.se/gentoo http://gentoo.oregonstate.edu/ http://www.ibiblio.org/pub/Linux/distributions/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /opt/tomcat/conf /usr/kde/3.1/share/config /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="" USE="x86 oss 3dnow avi crypt encode foomaticdb gif jpeg libg++ mad mikmod mmx mpeg ncurses nls pdflib png quicktime spell xml2 xmms xv zlib gtkhtml alsa gdbm berkdb slang readline arts tetex aalib bonobo svga tcltk java guile ruby X sdl gpm tcpd pam libwww ssl python esd imlib oggvorbis gtk qt kde motif opengl -apm cups apache2 cdr dga dvd -fbcon gd gnome imap matrox mbox mozilla mysql perl postgres samba truetype directfb wmf" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O3 -pipe" CXXFLAGS="-march=athlon-xp -O3 -pipe" ACCEPT_KEYWORDS="x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache fixpackages"
*** Bug 29152 has been marked as a duplicate of this bug. ***
Created attachment 19955 [details] HelloWorld.java HelloWorld.java i tested
I compiled it with this command line: gcj --classpath=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/java/libgcj-3.3.2.jar -o HelloWorld --main=HelloWorld HelloWorld.java Generated file says: HelloWorld: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.0, dynamically linked (uses shared libs), not stripped
I am pretty sure this can be resolved. The bug reporter should check what CLASSPATH environment variable is defined (it probably contains the blackdown .rt.jar etc) mkennedy@killr:~$ gcj --bootclasspath=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/java/libgcj-3.3.2.jar --classpath="" -o HelloWorld HelloWorld.java --main=HelloWorld mkennedy@killr:~$ ./HelloWorld Starting Finished