Gentoo and Free Java
Over the last week, I’ve been getting Gentoo and Free Java up and running on my new x86_64 box, a process which has culminated in the creation of my own overlay:
http://fuseyism.com/hg/libre_java_overlay
For those unfamiliar with Gentoo, an overlay is an additional set of packages (known in Gentoo as ebuilds, as for a source-based distribution the packages are essentially build scripts) which can be placed over the top of the main system tree to provide newer/better versions of existing builds and completely new ones too.
The Libre Java overlay includes a build for GCJ 4.3 (adapted from the one for an alpha snapshot in the java-gcj-overlay) and one for IcedTea6. Unfortunately, Gentoo’s Java support seems incredibly broken — the main stable and experimental (~) distributions don’t include OpenJDK or IcedTea, and the stable versions of GNU Classpath and VMs like CACAO and JamVM are ancient. GNU Classpath is still on 0.90, which is older than the one in Debian stable. It also tries to pull in the proprietary JDK by default; I recommend Free Java Gentoo users add:
dev-java/sun-jdk
dev-java/ibm-jdk
dev-java/jrockit
dev-java/diablo
dev-java/sun-jre-bin
dev-java/blackdown-jdk
to package.mask to avoid accidentally installing proprietary software on their machines. Unfortunately, stable versions of portage have yet to honour any license scheming, although it is in the unstable version. If you use Gentoo, feel free to try out the ebuilds from my overlay and give feedback. To use it, just get Mercurial (emerge mercurial), clone the repository:
hg clone http://fuseyism.com/hg/libre_java_overlay
and then add the following to /etc/make.conf:
PORTDIR_OVERLAY=<location you downloaded libre_java_overlay to>
The build process for IcedTea6 is fully documented on the IcedTea wiki.
April 18th, 2008 at 5:48 pm
Your gnu-classpath status is outdated:
betelgeuse@pena /usr/portage/dev-java/gnu-classpath $ eshowkw
Keywords for dev-java/gnu-classpath:
| s |
| p |
| a x |
| r 8 |
| c 6 | u
| a a p s - - | n
| l m h i m m p s p f f | u s
| p d a p a 6 i p c 3 a b x b | s l
| h 6 r p 6 8 p p 6 9 s r s 8 s | e o
| a 4 m a 4 k s c 4 0 h c d 6 d | d t
——–+——————————-+——-
0.90 | + + + + | 0
——–+——————————-+——-
0.92 | ~ ~ ~ ~ | 0.92
——–+——————————-+——-
0.93 | ~ ~ ~ ~ | 0.93
——–+——————————-+——-
0.97 | ~ ~ ~ ~ | * 0.97
0.97-r1 | + ~ ~ + |
April 21st, 2008 at 3:27 pm
I can’t even read that clearly, but it backs up what I said. Only 0.90 is completely stable.
May 4th, 2008 at 11:56 pm
Where would you prefer to get the feedback? (eclipse-ecj refuse to compile on a amd64 that has no other Java on it) Should I file a bug at bugs.gentoo.org or write here?
May 6th, 2008 at 8:59 pm
Here is fine or you can e-mail me (see http://fuseyism.com/). I think the Gentoo folks would prefer you don’t file bugs about my stuff
Here is better because it’s more public, but I’ll also respond slower (though trying to rectify that and blog more). E-mail I do check more frequently.
What error do you get from eclipse-ecj? I’m also on amd64, and the following works fine for me:
1. Make sure the overlay packages are enabled in /etc/portage/package.keywords and that the proprietary JDKs are blocked in package.mask.
2. You should then be able to emerge eclipse-ecj and it will pull in gcj and gcj-jdk, which will pull in ecj1 (the binary ecj) in turn. If not, you can obviously force these, but it should occur as the only available JDK option.
If not, let me know the output and I’ll try and hunt down the problem.