Fwd: IcedTea built on Gentoo

Alistair Bush <[email protected]>
Newsgroups gmane.linux.gentoo.java
Message-ID <[email protected]>
Hi am forwarding this to the Gentoo Java mailing this for anyone who is 
interested.  It was posted by Kyle Galloway from Redhat to 
[email protected]

I would just like to say a big thank you to him for sharing this.

Alistair (ali_bush)
Gentoo Java Developer.

ps.  I suppose this means someones going to have to make a ebuild for it ;) .

*********************************************************************************

I have now successfully built IcedTea using ecj on Gentoo.  Included in
this e-mail are instructions on how to do it for all those Gentoo users
out there who want to hack on IcedTea.

This was done on Gentoo 2007.0 ~x86

1. Required Packages

emerge -av xalan xalan-serializer xerces cups lesstif eclipse-ecj

Some of those are probably already installed, but -av will tell you and
let you confirm whether you want to rebuild any of those.

2. Build a 1.5 compliant libgcj  (substitute the stuff in <> with
directories of your choice).

svn co svn://gcc.gnu.org/svn/gcc/branches/redhat/gcc-4_1-branch gcc
mkdir gcc-build
cd gcc-build
../gcc/configure --prefix=<installation dir> --exec-prefix=<installation
dir>/<architecture>
make && make install

3. Modify icedtea/javac.in.

In order to get IcedTea to build with your built libgcj you will need to
modify the attached patch to point to your libgcj-4.1.3.jar, then apply
it to javac.in.

vim javac_in.patch
cd icedtea
patch -p0 < javac_in.patch

4. Configure and build IcedTea

./configure --with-ecj=/usr/bin/ecj-3.2
--with-ecj-jar=/usr/share/eclipse-ecj-3.2/lib/ecj.jar
--with-libgcj-jar=<gcc installation dir>/share/java/libgcj-4.1.3.jar
--with-xalan2-jar=/usr/share/xalan/lib/xalan.jar
--with-xalan2-serializer-jar=/usr/share/xalan-serializer/lib/serializer.jar
--with-xerces2-jar=/usr/share/xerces-2/lib/xercesImpl.jar
make

And there you have it.

Kyle
javac_in.patch (text/x-patch, 620 B)
diff -r 123c2340f9cf javac.in
--- a/javac.in	Thu Jun 07 19:21:19 2007 -0400
+++ b/javac.in	Wed Jun 13 10:20:13 2007 -0400
@@ -1,4 +1,10 @@
 #!/bin/sh
+libgcjjar=/home/user/gcc-install/share/java/libgcj-4.1.3.jar
+
+case "$*" in
+  *-bootclasspath*) ;;
+  *) bcoption="-bootclasspath $libgcjjar"
+esac
 
 # Work around ecj's inability to handle duplicate command-line
 # options.
@@ -21,4 +27,4 @@ fi
 fi
 
 CLASSPATH=@ECJ_JAR@${CLASSPATH:+:}$CLASSPATH \
-  @JAVA@ org.eclipse.jdt.internal.compiler.batch.Main -1.5 -nowarn $NEW_ARGS
+  @JAVA@ org.eclipse.jdt.internal.compiler.batch.Main -1.5 -nowarn $bcoption $NEW_ARGS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.