Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] How to build SWT JNI Natives on gtk-linux-x86_64 ?

Hello Martin,

Thank you for reaching out.

Our apologies, the documentation is somewhat outdated. After Oxygen release, I'll update the docu.

In the mean time:
0) Make sure you have SWT and SWT bindings repositories check out into ~/git/  (Or at the very least both should be in the same folder, but better in ~/git).
https://git.eclipse.org/c/gerrit/platform/eclipse.platform.swt.git/
https://git.eclipse.org/c/gerrit/platform/eclipse.platform.swt.binaries.git/

.classpath_gtk -> .classpath

1) Try checking out the newest SWT codebase. (If you need to compile older codebase, let me know).

2) Install required dependencies for building gtk applications:
sudo yum -y groups install "C Development Tools and Libraries"
sudo yum -y install java-1.8.0-openjdk-devel.x86_64
sudo yum -y install gtk3-devel gtk2-devel
sudo yum -y install libXt-devel libXtst-devel
sudo yum -y install mesa-libGLU-devel

3) Rebuild bindings by running rebuild script:
~/git/eclipse.platform.swt/bundles/org.eclipse.swt/bin/library/build.sh -gtk-all install

OR:
~/git/eclipse.platform.swt/bundles/org.eclipse.swt.tools/gtk/rebuild_swt_natives.sh




On Wed, Apr 19, 2017 at 12:43 PM, Oberhuber, Martin <Martin.Oberhuber@xxxxxxxxxxxxx> wrote:

Hi SWT Experts,

 

I’m trying to build my own SWT GTK Fragment on RHEL 6 / x86_64

(because of https://bugs.eclipse.org/bugs/show_bug.cgi?id=515155 ).

 

1.       I followed this article, running build.xml:build_libraries from the gtk.linux.x86_64 fragment:
https://www.eclipse.org/swt/jnigen.php
but the build runs into an error:
[exec] cc1plus: error: /bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/include/mozilla-config.h: No such file or directory

    

2.       So I found “Building the SWT natives on Ubuntu…(without XULRunner support)” here:
https://www.eclipse.org/swt/faq.php#howbuilddll
And adding “targets = install” on the Properties tab did help, but I found the instructions inaccurate because they didn’t ask to select build.xml in the org.eclipse.swt.gtk.linux.x86_64 fragment before doing right-click > Run As > Ant Build…

 

3.       So finally I tried running “build.sh” as per the FAQ URL above, since it seemed to be able to find the libxulrunner-dev of my system. But the build.sh resides in a different directory than documented and running it produces this error:
make_linux.mak:23: make_common.mak: No such file or directory
make: *** No rule to make target 'make_common.mak'.  Stop.
*** GTK2 Build failed.

 

Now I’m confused …

-          Which of the 3 instructions is supposed to be the right one?

-          Is there any value building XULRunner (eg for some Unittests) if I plan to use Webkit instead? If yes, how would I build it properly?

-          With the Libs built from approach 2, I tried running the tests (o.e.swt.tests > Run As > Junit). Many of the 14230 tests do succeed, but it gets stuck in #2962 test_printLorg_eclipse_swt_printing_Printer . I didn’t find a Bugzilla for that … any ideas?

 

For the records, here’s what I installed on my RHEL6 for the build:

yum install gtk2-devel libXtst-devel libXt-devel webkitgtk-devel xulrunner-devel

 

Thanks,

Martin

--

Martin Oberhuber, SMTS / Product Owner – Development Tools, Wind River

 


_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev



--


Leo Ufimtsev

Software Engineer

Red Hat

90 Eglinton Ave E #502,

Toronto, ON M4P 2Y3

Leonidas@xxxxxxxxxx   


Back to the top