Multiple file compilation patch

Mark Wielaard mark@klomp.org
Sun Mar 18 08:02:00 GMT 2001


Hi,
On Sun, Mar 18, 2001 at 02:51:00PM +0100, Mark Wielaard wrote:
> On Sun, Mar 18, 2001 at 10:20:46PM +1200, Bryce McKinlay wrote:
> > 
> > - KopiSusu (kjc) - http://www.klomp.org/KopiSusu/
> > 
> > These may require some small modifications to work around other gcj
> > bugs/features, but both basically work before the multiple-file patch and
> > fail miserably with it applied.
>> Did you actually get a working kjc executable? Which gcj version did you
> use? I tried compiling with an older gcj (20010218) by putting all source
> files in one directory (also for antlr and gnu.getopt, since compiling
> from jars and/or classes didn't work). I also had to work around some
> final variable problems that you already noticed and had to rewrite one
> anonymous inner class to a 'normal' static inner class to get gcj to
> compile everything. But then I got (after 20 minutes compiling):

I updated my tree on powerpc (3.0 branch) and I can now compile the whole
kjc/antlr/gnu.getopt package. Running it gives:
$ gkjc
usage: at.dms.kjc.Main [option]* [--help] <java-files>
version number: 1.9beta2 released 16/march/2001
error: No input files given
(Note that you have to set the CLASSPATH so that the program can find its
gnu/getopt/MessagesBundle.properties)
But trying to compile a simple Hello World program gives:
ident = Hello.main
Exception in thread "main" java.lang.NullPointerException
 at 0x0fce8eb4: _Jv_ThrowSignal (/usr/local/gcc/lib/libgcj.so.1)
 at 0x0fce8eec: _Jv_ThrowSignal (/usr/local/gcc/lib/libgcj.so.1)
 at 0x0fa17090: pthread_kill (/lib/libpthread.so.0)
 at 0x7f7fed78: ?? (??:0)
 at 0x1012957c: at.dms.kjc.JMethodCallExpression.genCode(at.dms.kjc.CodeSequence) (/opt/mark/allsrc/src/at/dms/kjc/JMethodCallExpression.java:0)
 at 0x1011ff18: at.dms.kjc.JExpressionStatement.genCode(at.dms.kjc.CodeSequence) (/opt/mark/allsrc/src/at/dms/kjc/JExpressionStatement.java:0)
 at 0x10108774: at.dms.kjc.JBlock.genCode(at.dms.kjc.CodeSequence) (/opt/mark/allsrc/src/at/dms/kjc/JBlock.java:0)
 at 0x100fa454: at.dms.kjc.CSourceMethod.genCode() (/opt/mark/allsrc/src/at/dms/kjc/CSourceMethod.java:0)
 at 0x100f1960: at.dms.kjc.CMethodInfo.resolveConstants(at.dms.classfile.ConstantPool) (/opt/mark/allsrc/src/at/dms/kjc/CMethodInfo.java:0)
 at 0x1019fc98: at.dms.classfile.ClassInfo.resolveConstants() (/opt/mark/allsrc/src/at/dms/classfile/ClassInfo.java:0)
 at 0x1019ef78: at.dms.classfile.ClassInfo.write(java.io.DataOutput) (/opt/mark/allsrc/src/at/dms/classfile/ClassInfo.java:0)
 at 0x1019f8b4: at.dms.classfile.ClassInfo.write(java.io.File, java.lang.String) (/opt/mark/allsrc/src/at/dms/classfile/ClassInfo.java:0)
 at 0x100d5cf0: at.dms.kjc.CClass.genClassFile(java.lang.String) (/opt/mark/allsrc/src/at/dms/kjc/CClass.java:0)
 at 0x100f7304: at.dms.kjc.CSourceClass.genCode(java.lang.String) (/opt/mark/allsrc/src/at/dms/kjc/CSourceClass.java:0)
 at 0x100eddb8: at.dms.kjc.Main.genCode(java.lang.String) (/opt/mark/allsrc/src/at/dms/kjc/Main.java:278)
 at 0x100ed1e8: at.dms.kjc.Main.run(java.lang.String[]) (/opt/mark/allsrc/src/at/dms/kjc/Main.java:163)
 at 0x100ee69c: at.dms.kjc.Main.compile(java.lang.String[]) (/opt/mark/allsrc/src/at/dms/kjc/Main.java:379)
 at 0x100ee5e4: at.dms.kjc.Main.main(java.lang.String[]) (/opt/mark/allsrc/src/at/dms/kjc/Main.java:368)
 at 0x0fd0c3dc: gnu.gcj.runtime.FirstThread.run() (/usr/local/gcc/lib/libgcj.so.1)
 at 0x0fd1b3b4: java.lang.Thread.run_(java.lang.Object) (/usr/local/gcc/lib/libgcj.so.1)
 at 0x0fecce18: _Jv_ThreadSetPriority(_Jv_Thread_t, int) (/usr/local/gcc/lib/libgcj.so.1)
 at 0x0fa52a4c: GC_start_routine (/usr/local/gcc/lib/libgcjgc.so.1)
 at 0x0fa13ea0: pthread_detach (/lib/libpthread.so.0)
 at 0x0f94b954: __clone (/lib/libc.so.6)
I am not sure how to debug this. Has someone gotten kjc to work with gcj
on non-powerpc? I want to try it on i586 but I have to rebuild my tree
(trunk) first on that machine.
Cheers,
Mark
-- 
Stuff to read:
 < http://www.toad.com/gnu/whatswrong.html >
 What's Wrong with Copy Protection, by John Gilmore


More information about the Java mailing list

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