Compiling jakarta projects with gcj
Costin Manolache
cmanolache@yahoo.com
Sat Aug 3 21:19:00 GMT 2002
On 2002年8月03日 17:47:00 -0700, Bryce McKinlay wrote:
> Costin Manolache wrote:
>>>I'm trying to test that tomcat compiles with gcj. I was able to compile
>>most of it and it's dependencies - but there are some problems.
>>>>First, in jakarta-commons/beanutils there are few files having non-ascii
>>chars in some comments ( the author name, French ). That fails.
>>>>> Try setting your locale (ie "export LANG=en_US" or whatever). If you are
> using the C locale then GCJ will not accept non-ascii characters
> (ideally it would default to latin-1 to match Javac, but its up to glibc
> not us, I believe). Alternativly you can just compile with the
> --encoding=UTF-8 command line option.
Thanks. I think that means I need to patch ant ( I'm using ant with
build.compiler=gcj ).
>>Any sugestions ? I would like to make the required changes in tomcat so
>>it compiles and works with gcj - but this is a show-stopper.
>>>>> Presumably Tomcat compiles with Jikes and Javac, so this is a bug in GCJ
> rather than Tomcat and should be fixed there. The best thing to do is to
> try an isolate a small as possible test case which reproduces the bug,
> and we can try and fix it from there.
That would be quite difficult. If you want to reproduce it - all the
code is available ( but not easy to compile - you'll need 4-5
repositories from jakarta ).
The file with problems is:
http://cvs.apache.org/viewcvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java
There are actually a lot of problems with this file - but I got around them by
refactoring the code and moving some inner classes around. It seems
gcj still has problems compiling inner classes declared inside a method.
Costin
More information about the Java
mailing list