Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swt: 4.5 -> 4.14 #75609

Draft
wants to merge 1 commit into
base: master
from
Draft

swt: 4.5 -> 4.14 #75609

wants to merge 1 commit into from

Conversation

@doronbehar
Copy link
Contributor

@doronbehar doronbehar commented Dec 13, 2019

Motivation for this change

swt 4.5 is outdated since 2015 (!). Moreover, it's GTK2 compatibility is with gtk 2.18, meaning running something depending on our swt with gtk 2.24.32 will spit out errors such as:

***WARNING: GTK+ version too new (major mismatch)
***WARNING: SWT requires GTK 2.18.0
***WARNING: Detected: 2.24.32

See also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=476644

Related PR: #59999 .

BTW #30826 should be closed.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

I've tried switching over to the source tarball upstream provides (see the bottom link here) but the build failed because what's in src.zip is completely different then what's in that tarball, download the source table and see for your self.

EDIT:

Maintainers: cc @pSub

@pSub
Copy link
Member

@pSub pSub commented Dec 16, 2019

Thank you for your investigation @doronbehar. Much appreciated. I am currently really busy, but I will try to look into this.

@doronbehar
Copy link
Contributor Author

@doronbehar doronbehar commented Dec 18, 2019

Oh right, it seems that the main issue was to find the latest version - 4.14 according to this page and the default build procedure seems to work for this version just like the old ones. Yet, that swt based program I tried to run with this version installed failed with:

I18n Locale: en found ...
Exception in thread "main" java.lang.NullPointerException
        at java.base/java.io.Reader.<init>(Reader.java:167)
        at java.base/java.io.InputStreamReader.<init>(InputStreamReader.java:72)
        at org.eclipse.swt.graphics.Device.lambda$overrideThemeValues$0(Device.java:719)
        at org.eclipse.swt.graphics.Device.overrideThemeValues(Device.java:733)
        at org.eclipse.swt.graphics.Device.init(Device.java:693)
        at org.eclipse.swt.widgets.Display.init(Display.java:3345)
        at org.eclipse.swt.graphics.Device.<init>(Device.java:176)
        at org.eclipse.swt.widgets.Display.<init>(Display.java:623)
        at org.eclipse.swt.widgets.Display.<init>(Display.java:614)
        at cz.natur.cuni.mirai.math.editor.swt.CommonTasks.shell(CommonTasks.java:180)
        at cz.natur.cuni.mirai.math.editor.swt.MiraiMath.<init>(MiraiMath.java:482)
        at cz.natur.cuni.mirai.math.editor.swt.MiraiMath.main(MiraiMath.java:545)

Not sure what that means, but most probably, that the latest swt isn't compatible with this program and it's unmaintained so screw it...

Anyway, swt seems to be updated now. @pSub do you know how to test all packages that depend on swt with this update?

Remove other x86 unsupported platform.
Add gtk3 as a dependency.
@doronbehar doronbehar force-pushed the doronbehar:update-swt branch from 9c0e0a6 to 31e0d83 Dec 18, 2019
@doronbehar doronbehar changed the title [WIP] swt: 4.5 -> 4.9 [WIP] swt: 4.5 -> 4.14 Dec 18, 2019
@doronbehar doronbehar changed the title [WIP] swt: 4.5 -> 4.14 swt: 4.5 -> 4.14 Dec 18, 2019
@ofborg ofborg bot added the 8.has: clean-up label Dec 18, 2019
@petabyteboy
Copy link
Member

@petabyteboy petabyteboy commented Feb 25, 2020

I tested this with nix-review:

6 package built:
areca azureus ipscan swt tuxguitar vuze

However this does not fix #76168 for me, and it does not seem like the swt package is used in any way by JDK or Eclipse.

@petabyteboy
Copy link
Member

@petabyteboy petabyteboy commented Feb 25, 2020

The way it is this breaks some applications. Vuze fails with the following error:

(java:5559): Gtk-ERROR **: 05:23:56.219: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported

I was not able to fix this error, even after removing gtk3 from buildInputs again it still persists.

@doronbehar
Copy link
Contributor Author

@doronbehar doronbehar commented Feb 25, 2020

I see. TBH I've lost interest in this update, maybe we should create a swt4_14 derivation or likewise. I'm not closing this PR as there have been useful efforts made here.

@doronbehar doronbehar marked this pull request as draft May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.