HOWTO: Building Eclipse v3.0.0 on Linux/PPC (with GTK)
I use the Eclipse IDE almost exclusively for Java development. However I’ve had a difficult time getting it working on my PPC Linux based laptop. This is a HOWTO intended to spare others from the agony I’ve recently been through.
Basically, the idea is the use the Linux/GTK/x86 binary distribution, but strip out the x86-compiled GTK bindings and replace them with PPC-compiled GTK bindings. (compiled from the source distribution)
Note: This is the procedure I used. There is bound to be a more efficient one, but as I already have a working build I’m not as interested in trying to find it. If you have an update you’d like to submit to this document, please email me.
Prerequisites
You must have the IBM JDK v1.4.1 installed. Don’t worry that Eclipse.org tells you v1.4.2 is required. It works just fine with IBM’s v1.4.1.
You must have Apache Ant v1.6.1 installed.
You must have the GNU development tools installed.
The Procedure
mkdir eclipse && cd eclipse- Download the Eclipse Linux (x86/GTK 2) v3.0.
unzip eclipse-SDK-3.0-linux-gtk.zipcd ..mkdir eclipse_src && cd eclipse_src- Download the Eclipse Source Build v3.0.
unzip eclipse-sourceBuild-srcIncluded-3.0.zipcd plugins/org.eclipse.swt.gtkant -buildfile build.xml ws/gtk/swtsrc.zipant -buildfile build.xml ws/gtk/swt-pisrc.zipcd ws/gtkunzip swtsrc.zipunzip swt-pisrc.zip- Edit
make_gtk.mak:
Under# 32 bit pathchangeJAVA_HOME = ...toJAVA_HOME = /opt/ibm-jdk-bin-1.4.1
(or wherever you JDK in installed)... ifeq ($(SWT_PTR_CFLAGS),-DSWT_PTR_SIZE_64) # 64 bit path JAVA_HOME = /bluebird/teamswt/swt-builddir/jdk1.5.0 AWT_LIB_PATH = $(JAVA_HOME)/jre/lib/amd64 XTEST_LIB_PATH = /usr/X11R6/lib64 else # 32 bit path JAVA_HOME = /opt/ibm-jdk-bin-1.4.1 AWT_LIB_PATH = $(JAVA_HOME)/jre/bin XTEST_LIB_PATH = /usr/X11R6/lib endif ... - Run
sh build.sh cp *.so ../../../../../eclipse/plugins/org.eclipse.swt.gtk_3.0.0/os/linux/x86/cd ../../../../../eclipse- Create the following in startup.sh:
java -cp startup.jar org.eclipse.core.launcher.Main -os linux -ws gtk chmod +x startup.sh./startup.sh
You’re done! Eclipse should start, ask you were you’d like your workspace to be stored, and drop you into the “welcome” screen. You can now quit, delete any workspace directories it created and move the eclipse directory under /opt (owned by root of course). You can also safely delete the eclipse_src directory.
References
These links were the most useful in figuring this out:
- http://lists.debian.org/debian-powerpc/2003/04/msg00442.html
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=57897
Much of this procedure was built off of the debian list post. Thanks florian!







