Quantcast

How to build SWT JNI Natives on gtk-linux-x86_64 ?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to build SWT JNI Natives on gtk-linux-x86_64 ?

Oberhuber, Martin

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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to build SWT JNI Natives on gtk-linux-x86_64 ?

Oberhuber, Martin

Hi again,

 

So I can answer the 3rd question myself (“hang on printers”), this was

https://bugs.eclipse.org/bugs/show_bug.cgi?id=215234

and I could work around it by “sudo yum install cups && /etc/init.d/cups restart”.

 

Tests are looking reasonably good now, though I encountered a reproducible crash:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=515471

 

And, quite early in the test suite some 50 tests always fail with “not implemented [multiple displays]”.

See attached screenshot – re-running the failed tests only (from the Junit “failed tests” filter) makes

Them succeed. Any ideas on that one?

 

The other 2 questions remain from below E-Mail (regarding docs and how to build properly).

 

Thanks,

Martin

--

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

 

From: <[hidden email]> on behalf of Martin Oberhuber <[hidden email]>
Reply-To: "Eclipse Platform SWT component developers list." <[hidden email]>
Date: Wednesday 19 April 2017 at 18:43
To: "[hidden email]" <[hidden email]>
Subject: [platform-swt-dev] How to build SWT JNI Natives on gtk-linux-x86_64 ?

 

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
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev

swtrhel6_50_tests_fail.png (884K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to build SWT JNI Natives on gtk-linux-x86_64 ?

Leo Ufimtsev-2
In reply to this post by Oberhuber, Martin
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 <[hidden email]> 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
[hidden email]
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

[hidden email]   


_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to build SWT JNI Natives on gtk-linux-x86_64 ?

Leo Ufimtsev-2
In reply to this post by Oberhuber, Martin
I've worked on porting webkit1 to webkit2.

At the moment webkit1 is notorious for crashing a fair bit. Do you have webkit2 on your system? You could try running eclipse with webkit2 if you have it installed.
pkg: webkitgtk4.x86_64    << webkit2 with gtk3 bindings.


then:
export SWT_WEBKIT2=1
./eclipse

Note, you should be running newest eclipse, e.g nightly/integration build that has latest webkit2 fixes:
http://download.eclipse.org/eclipse/downloads/drops4/I20170417-2000/download.php?dropFile=eclipse-SDK-I20170417-2000-linux-gtk-x86_64.tar.gz

Webkit1/Webkit2 & Fedora/RedHat is one of my main responsibilities, please feel free to reach out to me via IRC for quicker support if you like:
freenode#swt




On Wed, Apr 19, 2017 at 1:44 PM, Oberhuber, Martin <[hidden email]> wrote:

Hi again,

 

So I can answer the 3rd question myself (“hang on printers”), this was

https://bugs.eclipse.org/bugs/show_bug.cgi?id=215234

and I could work around it by “sudo yum install cups && /etc/init.d/cups restart”.

 

Tests are looking reasonably good now, though I encountered a reproducible crash:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=515471

 

And, quite early in the test suite some 50 tests always fail with “not implemented [multiple displays]”.

See attached screenshot – re-running the failed tests only (from the Junit “failed tests” filter) makes

Them succeed. Any ideas on that one?

 

The other 2 questions remain from below E-Mail (regarding docs and how to build properly).

 

Thanks,

Martin

--

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

 

From: <[hidden email]> on behalf of Martin Oberhuber <[hidden email]>
Reply-To: "Eclipse Platform SWT component developers list." <[hidden email]>
Date: Wednesday 19 April 2017 at 18:43
To: "[hidden email]" <[hidden email]>
Subject: [platform-swt-dev] How to build SWT JNI Natives on gtk-linux-x86_64 ?

 

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
[hidden email]
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

[hidden email]   


_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to build SWT JNI Natives on gtk-linux-x86_64 ?

Leo Ufimtsev-2
I haven't experienced the multi-display test failures that you have. It might be RHEL 6 specific.

RHEL 6 is approaching End-of-Production 2 phase on May 10th, so software fixes for that are limited, i.e meaning only security updates will be added, but no software fixes:
https://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux#Product_life_cycle

Is it at possible for you to upgrade to RHEL 7 or Fedora for your machine, or do you have to run a RHEL 6 setup?


On Wed, Apr 19, 2017 at 3:24 PM, Leo Ufimtsev <[hidden email]> wrote:
I've worked on porting webkit1 to webkit2.

At the moment webkit1 is notorious for crashing a fair bit. Do you have webkit2 on your system? You could try running eclipse with webkit2 if you have it installed.
pkg: webkitgtk4.x86_64    << webkit2 with gtk3 bindings.


then:
export SWT_WEBKIT2=1
./eclipse

Note, you should be running newest eclipse, e.g nightly/integration build that has latest webkit2 fixes:
http://download.eclipse.org/eclipse/downloads/drops4/I20170417-2000/download.php?dropFile=eclipse-SDK-I20170417-2000-linux-gtk-x86_64.tar.gz

Webkit1/Webkit2 & Fedora/RedHat is one of my main responsibilities, please feel free to reach out to me via IRC for quicker support if you like:
freenode#swt




On Wed, Apr 19, 2017 at 1:44 PM, Oberhuber, Martin <[hidden email]> wrote:

Hi again,

 

So I can answer the 3rd question myself (“hang on printers”), this was

https://bugs.eclipse.org/bugs/show_bug.cgi?id=215234

and I could work around it by “sudo yum install cups && /etc/init.d/cups restart”.

 

Tests are looking reasonably good now, though I encountered a reproducible crash:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=515471

 

And, quite early in the test suite some 50 tests always fail with “not implemented [multiple displays]”.

See attached screenshot – re-running the failed tests only (from the Junit “failed tests” filter) makes

Them succeed. Any ideas on that one?

 

The other 2 questions remain from below E-Mail (regarding docs and how to build properly).

 

Thanks,

Martin

--

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

 

From: <[hidden email]> on behalf of Martin Oberhuber <[hidden email]>
Reply-To: "Eclipse Platform SWT component developers list." <[hidden email]>
Date: Wednesday 19 April 2017 at 18:43
To: "[hidden email]" <[hidden email]>
Subject: [platform-swt-dev] How to build SWT JNI Natives on gtk-linux-x86_64 ?

 

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
[hidden email]
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

[hidden email]   




--


Leo Ufimtsev

Software Engineer

Red Hat

90 Eglinton Ave E #502,

Toronto, ON M4P 2Y3

[hidden email]   


_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to build SWT JNI Natives on gtk-linux-x86_64 ?

Markus Keller
In reply to this post by Oberhuber, Martin
Hi Martin

> And, quite early in the test suite some 50 tests always fail with “not implemented [multiple displays]”.
> See attached screenshot – re-running the failed tests only (from the Junit “failed tests” filter) makes
> Them succeed. Any ideas on that one?

It looks like you tried to run all tests in the org.eclipse.swt.tests.junit package.
SWT tests are already organized in test suites, with one top-level suite that contains all the other tests in the right order.

=> You have to run org.eclipse.swt.tests.junit.AllTestsas a single test class (using the JUnit 4 test runner).

The concrete reason for your test failures is that Test_org_eclipse_swt_widgets_Display can only run very early. In that test class, each test method creates and eventually destroys a Display.
Other SWT test classes typically use something like "new Shell()" in their setUp(), i.e. they let SWT create the "current" Display if it's not already been created.
Those tests leak the Display, and that leads to the test failures if you run tests in an unsupported order.

Markus




From:        "Oberhuber, Martin" <[hidden email]>
To:        "Eclipse Platform SWT component developers list." <[hidden email]>
Date:        2017-04-19 23:15
Subject:        Re: [platform-swt-dev] How to build SWT JNI Natives on gtk-linux-x86_64 ?
Sent by:        [hidden email]




Hi again,
 
So I can answer the 3rd question myself (“hang on printers”), this was
https://bugs.eclipse.org/bugs/show_bug.cgi?id=215234
and I could work around it by “sudo yum install cups && /etc/init.d/cups restart”.
 
Tests are looking reasonably good now, though I encountered a reproducible crash:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=515471
 
And, quite early in the test suite some 50 tests always fail with “not implemented [multiple displays]”.
See attached screenshot – re-running the failed tests only (from the Junit “failed tests” filter) makes
Them succeed. Any ideas on that one?
 
The other 2 questions remain from below E-Mail (regarding docs and how to build properly).
 
Thanks,
Martin
--
Martin Oberhuber, SMTS / Product Owner – Development Tools, Wind River
 
From: <[hidden email]> on behalf of Martin Oberhuber <[hidden email]>
Reply-To:
"Eclipse Platform SWT component developers list." <[hidden email]>
Date:
Wednesday 19 April 2017 at 18:43
To:
"[hidden email]" <[hidden email]>
Subject:
[platform-swt-dev] How to build SWT JNI Natives on gtk-linux-x86_64 ?

 
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
 [attachment "swtrhel6_50_tests_fail.png" deleted by Markus Keller/Zurich/IBM] _______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev



_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to build SWT JNI Natives on gtk-linux-x86_64 ?

Oberhuber, Martin

Thanks Markus,

 

I had already figured out that running the AllTests Suite was a better idea (and much faster, because the suite has around 4000 tests whereas running “everything in the plugin” duplicates tests leading to over 14000).

 

Thanks for the detailed explanation though!

 

What about a crazy idea … creating a fake AAATest.testDontRunMe() which is not part of the suite, but runs first if somebody does what I did, and just prints “Please run one of the Suites instead” and then fails / aborts the run with an exit() ?

 

Thanks,

Martin

--

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

 

From: <[hidden email]> on behalf of Markus Keller <[hidden email]>
Reply-To: "Eclipse Platform SWT component developers list." <[hidden email]>
Date: Friday 21 April 2017 at 17:26
To: "Eclipse Platform SWT component developers list." <[hidden email]>
Subject: Re: [platform-swt-dev] How to build SWT JNI Natives on gtk-linux-x86_64 ?

 

Hi Martin

> And, quite early in the test suite some 50 tests always fail with “not implemented [multiple displays]”.
> See attached screenshot – re-running the failed tests only (from the Junit “failed tests” filter) makes
> Them succeed. Any ideas on that one?

It looks like you tried to run all tests in the org.eclipse.swt.tests.junit package.
SWT tests are already organized in test suites, with one top-level suite that contains all the other tests in the right order.

=> You have to run org.eclipse.swt.tests.junit.AllTestsas a single test class (using the JUnit 4 test runner).

The concrete reason for your test failures is that Test_org_eclipse_swt_widgets_Display can only run very early. In that test class, each test method creates and eventually destroys a Display.
Other SWT test classes typically use something like "new Shell()" in their setUp(), i.e. they let SWT create the "current" Display if it's not already been created.
Those tests leak the Display, and that leads to the test failures if you run tests in an unsupported order.

Markus




From:        "Oberhuber, Martin" <[hidden email]>
To:        "Eclipse Platform SWT component developers list." <[hidden email]>
Date:        2017-04-19 23:15
Subject:        Re: [platform-swt-dev] How to build SWT JNI Natives on gtk-linux-x86_64 ?
Sent by:        [hidden email]





Hi again,
 
So I can answer the 3rd question myself (“hang on printers”), this was
https://bugs.eclipse.org/bugs/show_bug.cgi?id=215234
and I could work around it by “sudo yum install cups && /etc/init.d/cups restart”.
 
Tests are looking reasonably good now, though I encountered a reproducible crash:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=515471
 
And, quite early in the test suite some 50 tests always fail with “not implemented [multiple displays]”.
See attached screenshot – re-running the failed tests only (from the Junit “failed tests” filter) makes
Them succeed. Any ideas on that one?
 
The other 2 questions remain from below E-Mail (regarding docs and how to build properly).
 
Thanks,
Martin
--
Martin Oberhuber, SMTS / Product Owner – Development Tools, Wind River
 
From: <[hidden email]> on behalf of Martin Oberhuber <[hidden email]>
Reply-To:
"Eclipse Platform SWT component developers list." <[hidden email]>
Date:
Wednesday 19 April 2017 at 18:43
To:
"[hidden email]" <[hidden email]>
Subject:
[platform-swt-dev] How to build SWT JNI Natives on gtk-linux-x86_64 ?

 
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
 [attachment "swtrhel6_50_tests_fail.png" deleted by Markus Keller/Zurich/IBM] _______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev




_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to build SWT JNI Natives on gtk-linux-x86_64 ?

Oberhuber, Martin
In reply to this post by Leo Ufimtsev-2

Hi Leo (and Markus),

 

Thanks for all your help, I’m up and running now. Answering your questions:

 

-          I’m forced to use RHEL6 / Webkit1, and with my fix from https://bugs.eclipse.org/bugs/show_bug.cgi?id=515155 it’s actually working fine for me.

-          I’m not using IRC right now, thanks for your assistance on the mailing list instead

-          The build script worked fine for me on RHEL6:

o    org.eclipse.swt/bin/library/build.sh -gtk-all install

-          The rebuild script seems to build debug variants, and it failed for me when initiated from a directory outside the git tree:

o    $ cd build-swt-centos7/
$bash-4.1$ ~/git/eclipse.platform.swt/bundles/org.eclipse.swt.tools/gtk/rebuild_swt_natives.sh
[…]
[Step 3] Rebuilding SWT bindings and copying them into binary folder
script: invalid option -- '-'
usage: script [-a] [-f] [-q] [-t] [file]
*** [Step 3] Building native glue code failed. Exiting

-          Regarding the docs, it looks like

o    build.sh works fine if called in the (generated) bin/library/build.sh location

o    https://www.eclipse.org/swt/jnigen.php should add a reference to faq.php regarding the build

o    https://www.eclipse.org/swt/faq.php#howbuilddll should reference build.sh (in the generated bin/library location) instead of the awkward fragment/ant mechanism

o    Just doing these 2 little changes might be easy and would help contributors rebuilding SWT themselves?

 

Anyways – back to my original question - I’ve uploaded a gerrit change for https://bugs.eclipse.org/bugs/show_bug.cgi?id=515155 to support RHEL6, and would appreciate a review

 

Thanks,

Martin

--

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

 

From: <[hidden email]> on behalf of Leo Ufimtsev <[hidden email]>
Reply-To: "Eclipse Platform SWT component developers list." <[hidden email]>
Date: Wednesday 19 April 2017 at 21:38
To: "Eclipse Platform SWT component developers list." <[hidden email]>
Subject: Re: [platform-swt-dev] How to build SWT JNI Natives on gtk-linux-x86_64 ?

 

I haven't experienced the multi-display test failures that you have. It might be RHEL 6 specific.

RHEL 6 is approaching End-of-Production 2 phase on May 10th, so software fixes for that are limited, i.e meaning only security updates will be added, but no software fixes:
https://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux#Product_life_cycle

Is it at possible for you to upgrade to RHEL 7 or Fedora for your machine, or do you have to run a RHEL 6 setup?

 

 

On Wed, Apr 19, 2017 at 3:24 PM, Leo Ufimtsev <[hidden email]> wrote:

I've worked on porting webkit1 to webkit2.

At the moment webkit1 is notorious for crashing a fair bit. Do you have webkit2 on your system? You could try running eclipse with webkit2 if you have it installed.

pkg: webkitgtk4.x86_64    << webkit2 with gtk3 bindings.

then:

export SWT_WEBKIT2=1

./eclipse

Note, you should be running newest eclipse, e.g nightly/integration build that has latest webkit2 fixes:
http://download.eclipse.org/eclipse/downloads/drops4/I20170417-2000/download.php?dropFile=eclipse-SDK-I20170417-2000-linux-gtk-x86_64.tar.gz

Webkit1/Webkit2 & Fedora/RedHat is one of my main responsibilities, please feel free to reach out to me via IRC for quicker support if you like:

freenode#swt

 

 

On Wed, Apr 19, 2017 at 1:44 PM, Oberhuber, Martin <[hidden email]> wrote:

Hi again,

 

So I can answer the 3rd question myself (“hang on printers”), this was

https://bugs.eclipse.org/bugs/show_bug.cgi?id=215234

and I could work around it by “sudo yum install cups && /etc/init.d/cups restart”.

 

Tests are looking reasonably good now, though I encountered a reproducible crash:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=515471

 

And, quite early in the test suite some 50 tests always fail with “not implemented [multiple displays]”.

See attached screenshot – re-running the failed tests only (from the Junit “failed tests” filter) makes

Them succeed. Any ideas on that one?

 

The other 2 questions remain from below E-Mail (regarding docs and how to build properly).

 

Thanks,

Martin

--

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

 

From: <[hidden email]> on behalf of Martin Oberhuber <[hidden email]>
Reply-To: "Eclipse Platform SWT component developers list." <[hidden email]>
Date: Wednesday 19 April 2017 at 18:43
To: "[hidden email]" <[hidden email]>
Subject: [platform-swt-dev] How to build SWT JNI Natives on gtk-linux-x86_64 ?

 

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
[hidden email]
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

[hidden email]   




--

 

Leo Ufimtsev

Software Engineer

Red Hat

90 Eglinton Ave E #502,

Toronto, ON M4P 2Y3

[hidden email]   

 


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