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

Jim Pick jim@kaffe.org
04 Aug 2002 09:39:38 -0700


On Sun, 2002-08-04 at 09:32, Grzegorz Prokopski wrote:
> W li=B6cie z nie, 04-08-2002, godz. 17:02, Jim Pick pisze:=20
> > Ean Scheussler maintains the .deb - I'd ask him about when he's going t=
o
> > have time to put out 1.0.7.  I'm sure it fixes some bugs (but possibly
> > creates more).
> I somehow quickly created 1.0.7 deb - by copying ./debian content from
> current debian package. I got very messy directory layout, so small
> sidenote here. Why is this all so non-FHShis?

The file layout is modelled on the way Sun lays out the files for their
JDK and JRE.  It is decidedly non-FHS/FSSTND, but on the other hand,
it makes it easier to use Kaffe as a drop-in replacement for the JDK.

For packaging for a distro, I'd suggest using --prefix=3D/usr/lib/kaffe,
so you'd have the JDK/JRE stuff packages all together in the same spot,
and use symbolic links in /usr/bin to link the binaries.  That way, you
get the best of both worlds.

Of course, Debian has some more elaborate policies for their Java stuff,
so you'd want to check those.

> - I got jars (kjs.jar, tools.jar) in /usr/lib, when they should be
> somewhere in /usr/share (architecutre independant stuff), like
> /usr/share/kaffe or sth?
>
> - most of things in /usr/jre (desired to be JAVA_HOME dir I think) -
> there's no jre in /usr hirearhy - should be for ex. /usr/lib/kaffe
> or sth. like that (maybe /usr/lib/jre, but that can overlap with
> others I think)
>=20
> I may be wrong with sth. here, as the package was created as
> "upstream-debianized" - so I don't have a diff between your and
> debianized version and it can have some effect here.

Again, we're using Sun's layout, which does not map well onto the FHS
heirarchy.
=20
> > I'd be interested in hearing how well 1.0.7 runs ant. =20
> 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=20
>=20
> with setup
> CLASSPATH=3D/usr/jre/lib/rt.jar:/usr/jre/lib/rmi.jar:/usr/lib/tools.jar
> JAVA_HOME=3D/usr/jre and tried /usr/lib too..
> the previous error disappeared, now I am getting this:
>=20
>=20
> /bin/sh bootstrap.sh
> ... Bootstrapping Ant Distribution
> ... Compiling Ant Classes
> ... Copying Required Files
> ... Building Ant Distribution
> Buildfile: build.xml
>=20
> prepare:
> check_for_optional_packages:
>=20
> build:
> Created dir: /opt/media/build/ant-1.5/build/lib
> Compiling 200 source files to /opt/media/build/ant-1.5/build/classes
>=20
> 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.
>=20
>=20
> 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)"
>=20
> I of course tried to set JAVA_HOME and CLASSPATH, but w/o results.
> I think problem lies elsewhere.
>=20
> that piece of build.xml is this:
>=20
>     <javac srcdir=3D"${java.dir}"
>            destdir=3D"${build.classes}"
>            debug=3D"${debug}"
>            deprecation=3D"${deprecation}"
>            target=3D"${javac.target}"
>            optimize=3D"${optimize}" >
>=20
> >From different parts of build.xml:
> <property name=3D"src.dir" value=3D"src"/>
> <property name=3D"java.dir" value=3D"${src.dir}/main"/>
> <property name=3D"build.dir" value=3D"build"/>
> <property name=3D"build.classes" value=3D"${build.dir}/classes"/>
> <property name=3D"debug" value=3D"true" />
> <property name=3D"deprecation" value=3D"false" />
> <property name=3D"javac.target" value=3D"1.1" />
> <property name=3D"optimize" value=3D"true" />
>=20
> Can you help me here?
>=20
> 				Grzegorz B. Prokopski
>=20
> 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.u=
til.facade.ImplementationSpecificArgument' not found.
>    public class ImplementationSpecificArgument extends
> Commandline.Argument {
>=20

I haven't had time to try ant myself.  Maybe some other people on the
list can help.

Cheers,

 - Jim