[kaffe] Re: using ant to build kaffe - ant needs non-free java!

Dalibor Topic robilad@yahoo.com
Sun, 4 Aug 2002 15:20:15 -0700 (PDT)


Hi Grzegorz,
--- Grzegorz Prokopski <gadek@debian.org> wrote:
> W li¶cie z nie, 04-08-2002, godz. 17:02, Jim Pick
> pisze: 

> > I'd be interested in hearing how well 1.0.7 runs
> ant.  
> quite good now, but not 100% success yet
> it does the bootstrap it seems, but when it tries to
> use itself
> to continue it compilation - it fails 
> 
> with setup
>
CLASSPATH=/usr/jre/lib/rt.jar:/usr/jre/lib/rmi.jar:/usr/lib/tools.jar
> JAVA_HOME=/usr/jre and tried /usr/lib too..
> the previous error disappeared, now I am getting
> this:
> 
> 
> /bin/sh bootstrap.sh
> ... Bootstrapping Ant Distribution
> ... Compiling Ant Classes
> ... Copying Required Files
> ... Building Ant Distribution
> Buildfile: build.xml
> 
> prepare:
> check_for_optional_packages:
> 
> build:
> Created dir: /opt/media/build/ant-1.5/build/lib
> Compiling 200 source files to
> /opt/media/build/ant-1.5/build/classes
> 
> file:/opt/media/build/ant-1.5/build.xml:565: Cannot
> use classic
> compiler, as it is not available.  A common solution
> is to set the
> environment variable JAVA_HOME to your jdk
> directory.
> 
> 
>
http://www.infozone-group.org/prowlerDocs/html/faqs.html
> says:
> "...the ANT build environment needs access to the
> Java Compiler class
> which is part of tools.jar in JDK 1.2 or greater.
> (to be found in
> [java-home]/lib/tools.jar)"
> 
> I of course tried to set JAVA_HOME and CLASSPATH,
> but w/o results.
> I think problem lies elsewhere.

It actually wants to see com.sun.javac (or whatever
the class for Sun's javac compiler is), as far as I
know. Of course, you won't find it in kaffe's
tools.jar ,)
 
> that piece of build.xml is this:
> 
>     <javac srcdir="${java.dir}"
>            destdir="${build.classes}"
>            debug="${debug}"
>            deprecation="${deprecation}"
>            target="${javac.target}"
>            optimize="${optimize}" >
> 
> From different parts of build.xml:
> <property name="src.dir" value="src"/>
> <property name="java.dir" value="${src.dir}/main"/>
> <property name="build.dir" value="build"/>
> <property name="build.classes"
> value="${build.dir}/classes"/>
> <property name="debug" value="true" />
> <property name="deprecation" value="false" />
> <property name="javac.target" value="1.1" />
> <property name="optimize" value="true" />
> 
> Can you help me here?

You could either put Sun's tools.jar from JDK1.X , X
>= 2 into your classpath, or set the property
build.compiler to kjc or jikes in the buld.xml file.

> PS: I am using jikes to do the compilation. gcj
> gives many
> warnings and this error right after "... Compiling
> Ant Classes":
>
src/main/org/apache/tools/ant/util/facade/ImplementationSpecificArgument.java:69:
> Superclass `Commandline.Argument' of class
>
`org.apache.tools.ant.util.facade.ImplementationSpecificArgument'
> not found.
>    public class ImplementationSpecificArgument
> extends
> Commandline.Argument {

If you want to help to fix that bug, please report
bugs in gcj to the gcj mailing list or bug tracking
page ;) Gcj runs natively and doesn't use kaffe, as
far as I know. There are rpm packages of jakarta
packages compiled to binary using gcj somewhere , I
read about it here:
http://www.advogato.org/person/mjw/diary.html?start=6

best regards,

dalibor topic


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com