Multiple file compilation patch
Per Bothner
per@bothner.com
Sun Mar 18 09:49:00 GMT 2001
Bryce McKinlay <bryce@albatross.co.nz> writes:
> You can get my BeanShell tree, modified to compile with gcj, from
> http://waitaki.otago.ac.nz/~bryce/ . The command to build it is something
> like "cd src; gcj bsh/*.java bsh/classpath/*.java --main=bsh.Interpreter -o
> beanshell". This modified tree definatly compiled fine with the gcc 3
> branch a couple of weeks ago.
I get:
kelso<2762>gcj bsh/*.java bsh/classpath/*.java --main=bsh.Interpreter -o beanshell
./bsh/classpath/BshClassPath.java: In class `bsh.classpath.BshClassPath':
./bsh/classpath/BshClassPath.java: In method `bsh.classpath.BshClassPath.traverseDirForClassesAux(java.io.File,java.io.File)':
./bsh/classpath/BshClassPath.java:413: Can't find method `listFiles()' in type `java.io.File'.
File [] children = dir.listFiles();
^
1 error
and indeed libjava does not implement the listFiles method, which is
new in jdk 1.2.
I then downloaded KopiSusu-1.9b2.tar.gz. In settings I changed I
added COMPILER="gcj -C". I had to modify make.sh because for some
readon gcj -c -classpath would act the way -CLASSPATH is supposed to -
i.e. override the default classpath. I haven't looked into this.
Instead, I set a CLASSPATH environment variable. Then the 'util'
directory built fine. The next directory 'lexgen' failed:
kelso<2758>./make.sh
./src/at/dms/lexgen/TokenDefinition.java: In class `at.dms.lexgen.TokenDefinition':
./src/at/dms/lexgen/TokenDefinition.java: In method `(int,java.lang.String,java.lang.String)':
./src/at/dms/lexgen/TokenDefinition.java:77: Can't assign a value to the final variable `this'.
this.value = null;
^
1 error
This looks like a failure in the "final variable" testing. I did comment out
some code there, but my guess is that this didn't use to work, and you
patched your source. (Hopefully, I'll have time to fix the final
variable testing for gcc 3.0.)
--
--Per Bothner per@bothner.com http://www.bothner.com/~per/
More information about the Java
mailing list