Monday, January 7, 2008

Eclipse 3.3 solaris-gtk-x86 Build Script for Nexenta

The following script was extracted from another blog posting about compiling Eclipse 3.3 for Nexenta (solaris-gtk-x86). I have separated it out and modified the original post because most of the steps for figuring-out dependencies are valid for building Eclipse 3.4M4 and building Eclipse 3.4M5, but the build itself is slightly different.
I have used this script to build Eclipse 3.3 for myself, have since programmed a bit with my version so I know it has worked for my basic needs and would be curious to know if anyone else has gotten any use out of it.
The script itself makes extensive use of the simple command-line find-and-replace syntax I wrote about here.
You should be able to drop the script into a directory that contains the eclipse-sourceBuild-srcIncluded-3.3.zip, execute it, and it will decompress the archive, modify the build scripts to support nexenta with gtk on x86, and create a distibutable file in the result directory.
The script can now be downloaded from the solipse downloads page.  Be aware of the Nexenta-specific configurations for compiling the SWT libraries.
 


The Europa splash-screen on nexenta solaris-gtk-x86.
The Europa splash-screen on nexenta solaris-gtk-x86.

The Europa workbench on nexenta solaris-gtk-x86.
The Europa workbench on nexenta solaris-gtk-x86.

6 comments:

Darth Debian - VelociRaulEitor said...

Great hit!!
I needing them. When build in openSolaris 2008.05 I will tell you. Thanks!!! and Regards from Chile.

Tim Myer said...

Glad to be of help. Please keep in mind that this script is for Eclipse 3.3.1. There were a couple of changes for Eclipse 3.3.2. Also, if you are building on OpenSolaris instead of Nexenta, you will probably not want to use GCC to compile the SWT libraries -- CC will work just fine. If you run into any problem, just drop me a line as I also have a script specifically for building Eclipse 3.3.2 on OpenSolaris which a couple of people (including myself) have already used successfully.
Best of luck!

Darth Debian - VelociRaulEitor said...

Thanks and here is a little problem :-P:


[javac] 45. WARNING in /export/home/ramoran/eclipse_solaris/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/rcp/IntroTemplate.java (at line 262)
[javac] return (IPluginReference[]) result.toArray(new IPluginReference[result
[javac] .size()]);
[javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] Type safety: The method toArray(Object[]) belongs to the raw type ArrayList. References to generic type ArrayList E should be parameterized
[javac] ----------
[javac] 45 problems (45 warnings)
[exec] sh: line 1: O: not found
[exec] sh: line 1: O: not found
[exec] sh: line 1: O: not found
[exec] sh: line 1: O: not found
[exec] sh: line 1: o: not found
[exec] "../eclipseJNI.h", line 15: cannot find include file: -jni.h-
[exec] "../eclipseJNI.h", line 25: warning: no explicit type given
[exec] "../eclipseJNI.h", line 25: syntax error before or at: *
[exec] "../eclipseJNI.h", line 25: syntax error before or at: *
[exec] "../eclipseJNI.h", line 25: warning: undefined or missing type for: void
[exec] "../eclipseJNI.h", line 25: function cannot return function or array
[exec] "../eclipseJNI.h", line 42: warning: old-style declaration or incorrect type for: JNIEXPORT
[exec] "../eclipseJNI.h", line 42: syntax error before or at: void
[exec] "../eclipseJNI.h", line 42: cannot have void object: JNICALL
[exec] "../eclipseJNI.h", line 42: syntax error before or at: *
[exec] "../eclipseJNI.h", line 42: parameter redeclared: jstring
[exec] "../eclipseJNI.h", line 42: warning: function prototype parameters must have types
[exec] "../eclipseJNI.h", line 42: warning: old-style declaration or incorrect type for: Java_org_eclipse_equinox_launcher_JNIBridge__1set_1exit_1data
[exec] "../eclipseJNI.h", line 48: warning: old-style declaration or incorrect type for: JNIEXPORT
[exec] "../eclipseJNI.h", line 48: syntax error before or at: void
[exec] "../eclipseJNI.h", line 48: cannot have void object: JNICALL
[exec] "../eclipseJNI.h", line 48: syntax error before or at: *
[exec] "../eclipseJNI.h", line 48: warning: function prototype parameters must have types
[exec] "../eclipseJNI.h", line 48: warning: old-style declaration or incorrect type for: Java_org_eclipse_equinox_launcher_JNIBridge__1update_1splash
[exec] "../eclipseJNI.h", line 54: warning: old-style declaration or incorrect type for: JNIEXPORT
[exec] "../eclipseJNI.h", line 54: syntax error before or at: jlong
[exec] "../eclipseJNI.h", line 54: warning: old-style declaration or incorrect type for: jlong
[exec] "../eclipseJNI.h", line 54: warning: old-style declaration or incorrect type for: JNICALL
[exec] "../eclipseJNI.h", line 54: syntax error before or at: *
[exec] "../eclipseJNI.h", line 54: warning: function prototype parameters must have types
[exec] "../eclipseJNI.h", line 54: warning: old-style declaration or incorrect type for: Java_org_eclipse_equinox_launcher_JNIBridge__1get_1splash_1handle
[exec] "../eclipseJNI.h", line 60: warning: old-style declaration or incorrect type for: JNIEXPORT
[exec] "../eclipseJNI.h", line 60: syntax error before or at: void
[exec] "../eclipseJNI.h", line 60: cannot have void object: JNICALL
[exec] "../eclipseJNI.h", line 60: syntax error before or at: *
[exec] "../eclipseJNI.h", line 60: warning: function prototype parameters must have types
[exec] "../eclipseJNI.h", line 60: warning: old-style declaration or incorrect type for: Java_org_eclipse_equinox_launcher_JNIBridge__1show_1splash
[exec] "../eclipseJNI.h", line 66: warning: old-style declaration or incorrect type for: JNIEXPORT
[exec] "../eclipseJNI.h", line 66: syntax error before or at: void
[exec] "../eclipseJNI.h", line 66: cannot have void object: JNICALL
[exec] "../eclipseJNI.h", line 66: syntax error before or at: *
[exec] "../eclipseJNI.h", line 66: warning: function prototype parameters must have types
[exec] "../eclipseJNI.h", line 66: warning: old-style declaration or incorrect type for: Java_org_eclipse_equinox_launcher_JNIBridge__1takedown_1splash
[exec] "../eclipse.c", line 337: warning: old-style declaration or incorrect type for: JNIEXPORT
[exec] "../eclipse.c", line 337: syntax error before or at: void
[exec] "../eclipse.c", line 345: warning: old-style declaration or incorrect type for: JNIEXPORT
[exec] "../eclipse.c", line 345: syntax error before or at: int
[exec] cc: acomp failed for ../eclipse.c
[exec] make: Fatal error: Command failed for target `eclipse.o'

BUILD FAILED
/export/home/ramoran/eclipse_solaris/build.xml:96: exec returned: 1

Total time: 18 minutes 25 seconds

How can use cc instead gcc? Regards.

Tim Myer said...

Hi Raul,
It looks like the script is having trouble finding your JDK install to resolve the library imports. A couple of questions:
1. Which version of Eclipse are you using?
2. Which version of the JDK are you using?
3. Have you pointed the script to your install of SunStudio, the JDK and ANT_HOME as indicated on the top of the script?

If your answers are:
1. 3.3.2
2. JDK 1.6
3. Yes
then email me directly at
timezra AT gmail DOT com
and I will send you the OpenSolaris script (I would paste it here but would need to reformat it as HTML).

Tim Myer said...

You might also want to follow the following bugzilla entry for solaris-gtk-x86:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=84344
Volker Stolz modified and used this script to create a binary distribution of eclipse 3.3 for OpenSolaris, and he posted the link address in the bug thread. That might save you some headaches and time.
Let me know if this works!
------Tim-------

Darth Debian - VelociRaulEitor said...

You are a great man, thanks my friend. You are a superOpenSource man :-P And will send mail with the problem details in base to your referces(Questions). Thanks!