Getting started with merged GCJ

Jim Mayer jim@pentastich.org
Wed Jan 31 03:19:00 GMT 2007


Tom,
I think I may have been getting a confused mix of old and new stuff... I
had just downloaded the "gcc" directory (following the directions I had
found), so it may have been trying to use the system java library... not
sure.
Anyway, I just got a clean build WITHOUT the --java-maintainer-mode
switch set. When I tried to bootstrap from scratch using
"--java-maintainer-mode" and using the scripts you posted for "egcj" and
"gjavah" I got failures in "gjavah":
[jim@perdita bin]$ ./gjavah
Exception in thread "main" java.lang.NoClassDefFoundError:
gnu.classpath.tools.javah.Main
 at java.lang.Class.initializeClass(libgcj.so.7rh)
Caused by: java.lang.ClassNotFoundException:
org.objectweb.asm.ClassVisitor not found in
gnu.gcj.runtime.SystemClassLoader{urls=[file:/opt/gcc-bootstrap/lib/tools.zip], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
 at java.net.URLClassLoader.findClass(libgcj.so.7rh)
 at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.7rh)
 at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
 at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
 at java.lang.Class.initializeClass(libgcj.so.7rh)
I made the "tools.zip" by running:
 zip -r /opt/gcc-bootstrap/lib/tools.zip gnu
from the "trunk/libjava/tools/classes" directory. If I had to guess,
I'd suspect that your system's base gcc is rather newer than mine (which
is "gcc (GCC) 4.1.1 20070105 (Red Hat 4.1.1-51)".
I was happy to see my little "Generic World" program run, though I was a
bit shocked at the 41 megabytes (using -static-libgcj, 13 megabytes
stripped) executable file:
 import java.util.*;
 public class Foo {
 public static void main(String[] args) {
 Set<String> messages = new LinkedHashSet<String>();
 messages.add("It's a generic world!");
 messages.add("In gcj!");
 for (String msg : messages) {
 System.out.println(msg);
 }
 System.exit(0);
 }
 }
I'm going to try building a "--java-maintainer-mode" version tonight.
-- Jim
On Tue, 2007年01月30日 at 12:43 -0700, Tom Tromey wrote:
> >>>>> "Jim" == Jim Mayer <jim@pentastich.org> writes:
>> Jim> gnu/java/awt/color/LinearRGBConverter.java:0: internal compiler error:
> Jim> Illegal instruction
> Jim> Please submit a full bug report,
> Jim> with preprocessed source if appropriate.
>> Do you get this if you try to build again?
>> Your configure/etc commands looked ok to me.
> I'm wondering if you have bad memory or something.
>> Tom



More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /