Bug 429332 - Providing 64-bit SWT libraries for Solaris/X86_64
Summary: Providing 64-bit SWT libraries for Solaris/X86_64
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.4   Edit
Hardware: PC Solaris-GTK
: P3 enhancement (vote)
Target Milestone: 4.6 M7   Edit
Assignee: Arun Thondapu CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
: 56674 442260 (view as bug list)
Depends on:
Blocks: 429335 429343
  Show dependency tree
 
Reported: 2014-02-28 11:41 EST by Thorsten Heit CLA
Modified: 2016-04-20 10:41 EDT (History)
8 users (show)

See Also:


Attachments
Patch for building 64-bit binaries for Solaris/x86 (8.36 KB, application/octet-stream)
2014-02-28 11:41 EST, Thorsten Heit CLA
no flags Details
Patch for eclipse.platform.swt.binaries for building 64-bit binaries for Solaris/x86 (4.06 KB, patch)
2014-02-28 12:04 EST, Thorsten Heit CLA
no flags Details | Diff
Patch for building 64-bit binaries for Solaris/x86 (8.36 KB, patch)
2014-03-03 09:22 EST, Thorsten Heit CLA
no flags Details | Diff
patch for eclipse.platform.swt to allow for compiling SWT on Solaris x86_64 (5.71 KB, patch)
2014-08-18 09:53 EDT, Thorsten Heit CLA
no flags Details | Diff
Makefile patch for Solaris x86_64 (1.76 KB, patch)
2014-08-18 09:58 EDT, Thorsten Heit CLA
no flags Details | Diff
patch for eclipse.platform.swt.binaries to allow for compiling SWT on Solaris x86_64 (3.16 KB, patch)
2014-08-18 10:00 EDT, Thorsten Heit CLA
no flags Details | Diff
Shell script to apply the patches to eclipse.platform.swt and eclipse.platform.swt.binaries (1.57 KB, text/plain)
2014-08-18 10:13 EDT, Thorsten Heit CLA
no flags Details
patch for eclipse.platform.swt.binaries to allow for compiling SWT on Solaris x86_64 (master branch) (3.16 KB, patch)
2014-08-19 05:07 EDT, Thorsten Heit CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten Heit CLA 2014-02-28 11:41:48 EST
Created attachment 240404 [details]
Patch for building 64-bit binaries for Solaris/x86

Eclipse 4.4M5 for Solaris/x86 doesn't work using the release candidate of the upcoming Java 8 as default JVM. The reason is quite simple: Build 128 and 129 from https://jdk8.java.net/download.html exist only as 64-bit binaries; the executable launcher and the SWT libraries are 32-bit only.

Attached is a patch for the build scripts so that I'm able to build native 64-bit libraries of SWT on my Solaris 11.1 machine.

The Mozilla libraries had to be commented out because they exist only as 32-bit.

Gnome support is also actually not possible because at least Solaris 11(.1) doesn't contain libgnome-2.so and libgnomeui-2.so as 64-bit-binaries for whatever reason.
Comment 1 Thorsten Heit CLA 2014-02-28 12:03:31 EST
Besides the project eclipse.platform.swt I also checked out eclipse.platform.swt.binaries. Apply the following patch to the main pom.xml:

diff --git a/pom.xml b/pom.xml
index a225256..4c8e792 100644
--- a/pom.xml
+++ b/pom.xml
@@ -57,6 +57,7 @@
     <module>bundles/org.eclipse.swt.gtk.linux.x86_64</module>
     <module>bundles/org.eclipse.swt.gtk.solaris.sparc</module>
     <module>bundles/org.eclipse.swt.gtk.solaris.x86</module>
+    <module>bundles/org.eclipse.swt.gtk.solaris.x86_64</module>
     <module>bundles/org.eclipse.swt.win32.win32.x86</module>
     <module>bundles/org.eclipse.swt.win32.win32.x86_64</module>
   </modules>


In the bundles subdirectory create a copy of the org.eclipse.swt.gtk.solaris.x86 directory:

%> cd bundles
%> cp -pr org.eclipse.swt.gtk.solaris.x86 org.eclipse.swt.gtk.solaris.x86_64
%> cd org.eclipse.swt.gtk.solaris.x86_64

Apply the second patch that basically replaces references to "x86" with "x86_64" and additionally removes the "make_mozilla" target from the build.xml.
Comment 2 Thorsten Heit CLA 2014-02-28 12:04:35 EST
Created attachment 240405 [details]
Patch for eclipse.platform.swt.binaries for building 64-bit binaries for Solaris/x86
Comment 3 Thorsten Heit CLA 2014-03-03 09:22:03 EST
Created attachment 240460 [details]
Patch for building 64-bit binaries for Solaris/x86

Readded the patch, now with the correct content type
Comment 4 Thorsten Heit CLA 2014-08-18 09:53:11 EDT
Created attachment 246080 [details]
patch for eclipse.platform.swt to allow for compiling SWT on Solaris x86_64

This patch is made with "git diff" and contains the changes I made to allow for compiling SWT on Solaris x86_64
Source code branch: R4_4_maintenance
Comment 5 Thorsten Heit CLA 2014-08-18 09:58:20 EDT
Created attachment 246081 [details]
Makefile patch for Solaris x86_64

Small changes for the Makefile so that the shared library compiles successfully on Solaris x86_64
Source code branch: R4_4_maintenance
Comment 6 Thorsten Heit CLA 2014-08-18 10:00:28 EDT
Created attachment 246082 [details]
patch for eclipse.platform.swt.binaries to allow for compiling SWT on Solaris x86_64

This patch replace the string "x86" with "x86_64" in the created bundles/org.eclipse.swt.gtk.solaris.x86_64 directory
Source code branch: R4_4_maintenance
Comment 7 Thorsten Heit CLA 2014-08-18 10:13:25 EDT
Created attachment 246083 [details]
Shell script to apply the patches to eclipse.platform.swt and eclipse.platform.swt.binaries

This shell applies the patches to the submodules eclipse.platform.swt and eclipse.platform.swt.binaries so that native Solaris x86_64 binaries can be compiled. After that, it executes Ant to build the SWT libraries for Solaris x86_64.

Hint:
To execute Ant I have to use Java 7. With Java 8 I'm getting a javax.script.ScriptException error right at the beginning:

Buildfile: /home/h2841/git/eclipse/eclipse.platform.releng.aggregator/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml

init_fragment:

build_libraries:

copy.library.src:

BUILD FAILED
/home/h2841/git/eclipse/eclipse.platform.releng.aggregator/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml:962: The following error occurred while executing this line:
/home/h2841/git/eclipse/eclipse.platform.releng.aggregator/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml:934: javax.script.ScriptException: ReferenceError: "importClass" is not defined in <eval> at line number 3
	at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:564)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:548)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:528)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:524)
(...)
Comment 8 Thorsten Heit CLA 2014-08-18 10:16:34 EDT
To apply the script successfully, the patches and the script itself are assumed to reside in the same directory. Apart from executing the script, there's nothing else to do.
The patches themselves were made against the R4_4_maintenance branch.
Comment 9 Thorsten Heit CLA 2014-08-19 05:07:39 EDT
Created attachment 246123 [details]
patch for eclipse.platform.swt.binaries to allow for compiling SWT on Solaris x86_64 (master branch)

This patch is basically the same as the one for eclipse.platform.swt.binaries. The only difference is that the referenced plugin/bundle versions were changed from 3.103.1 (branch) to 3.104.0 (master branch), i.e. the original one cannot be fully applied to the master branch.

To have the script use this patch, simply omit the "master-" prefix from the file name, i.e. save it to disc as "eclipse.platform.swt.binaries.patch".
Comment 10 Dani Megert CLA 2014-11-20 05:22:45 EST
*** Bug 442260 has been marked as a duplicate of this bug. ***
Comment 11 Dani Megert CLA 2014-11-20 05:23:20 EST
*** Bug 56674 has been marked as a duplicate of this bug. ***
Comment 12 Arun Thondapu CLA 2015-10-20 07:36:55 EDT
I've started working on this item but won't be able to complete it in time for M3, planning for early M4...
Comment 13 Arun Thondapu CLA 2015-12-03 05:20:46 EST
(In reply to Arun Thondapu from comment #12)
> I've started working on this item but won't be able to complete it in time
> for M3, planning for early M4...

Moving to M5.
Comment 14 Arun Thondapu CLA 2016-01-25 06:46:47 EST
Unfortunately couldn't make it in M5 as well, should definitely be done in M6 though.
Comment 15 Arun Thondapu CLA 2016-03-15 09:07:11 EDT
This work is close to completion but there are a few more native builds that need to be completed before we can have a full eclipse build, so moving to M7.
Comment 17 Alexander Kurtakov CLA 2016-04-08 16:31:44 EDT
Doesn't Solaris come with Gtk 3.x ? It would be nice to get it started with GTK 3 directly as GTK 2 is in maintenance mode thus adding new port on top of it doesn't make much sense.
Comment 18 Arun Thondapu CLA 2016-04-20 10:41:58 EDT
(In reply to Alexander Kurtakov from comment #17)
> Doesn't Solaris come with Gtk 3.x ? It would be nice to get it started with
> GTK 3 directly as GTK 2 is in maintenance mode thus adding new port on top
> of it doesn't make much sense.

AFAICS there are no pre-built GTK3 libraries available for Solaris, they need to be compiled from source and I don't think any eclipse users would be interested in doing that, so we'll have to stick to GTK2 for now.

Resolving the bug as there is nothing more to be done here.