Patching Eclipse 3.2 for Debian 3.1
Eclipse 3.2 is out but I haven’t had much of a chance to look at it yet because I’ve spent the afternoon trying to get it to install.
The GTK focus bug from 3.1 is still present (the problem lies with Debian’s use of version numbers) so you need to download the source, patch it and compile it for your own platform. (Instructions here.)
Compilation proved a little trickier than it was for 3.1. As before you need to edit plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java - feel free to use my patch from the root of your unzipped source:
$ patch -p0 < debGTKBugPatch
I couldn’t get the default build to work but finally got things compiling (ignoring literally hundreds of warnings about non-type safe generic code) by editing the build.xml file and changing javacSource and javacTarget to 1.5 (I only have Java 1.5 on my machine: it should be possible to compile at least some of the source using Java 1.4 but I haven’t tried it)
<property name="javacSource" value="1.5" />
<property name="javacTarget" value="1.5" />
Finally start the build process and go and do something else for a while (on my ageing P4 1.8 it takes close to 50 minutes to build).
$ export ANT_HOME=/usr/bin/ant
$ export JAVA_HOME=/usr/
$ chmod +x build
$ ./build -os linux -ws gtk -arch x86 -java5home /usr/bin/
The custom built version will be in result/linux-gtk-x86-sdk.tar.gz. Extract it into another directory and run eclipse from there.
These notes explain how I got it to work on my machine. Your setup may differ.
July 2nd, 2006 at 4:17 pm
Interesting, I’d like to check out Callisto and see if the CDT has improved since the last time I looked at it.
Building Eclipse has always been a pain in the past and I have never quite gotten into Eclipse enough for it to lure me away from Emacs, so I’d hate to burn a lot of time on this.
I’d love to see an Ubuntu package of Callisto native-compiled with GCJ. I don’t suppose such a beast exists yet?
July 3rd, 2006 at 1:09 pm
Thanks for the comments, Marc. I only discovered Eclipse recently since I started studying Java and haven’t explored CDT yet. But if you’re anything like most Emacs users, I suspect that however good the latest CDT version is, it won’t lure you away
That’s an interesting idea of native-compiling with GCJ. As far as I know, such a package doesn’t exist yet. SWT’s use of the native graphics already makes Eclipse very responsive for a Java app; this would only make it faster still. I doubt I’ll have much time to experiment myself but perhaps someone else reading this will step up to the plate?
July 18th, 2006 at 3:25 pm
The eclipse 3.1 packages in Debian Etch (and I think Ubuntu Dapper) are available as GCJ native compiled GCJ packages on at least i386. Install the eclipse-foo-gcj packages.
I believe 3.2 packages are currently being worked on.
July 18th, 2006 at 4:38 pm
Cheers for that Andrew!
August 9th, 2006 at 4:10 pm
thanks a lot. it works perfectly.
August 9th, 2006 at 4:21 pm
Glad to hear it Bruno. Thanks for the feedback.