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

Closed
wants to merge 1 commit into from
Closed

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 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

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 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
@ghost
Copy link

ghost 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.

@ghost
Copy link

ghost 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

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 09:56
@Dietr1ch
Copy link
Contributor

Dietr1ch commented Nov 9, 2020

I got to a similar NPE using nix-review and trying to run Tuxguitar,

cd ~/Projects/nixpkgs
nix run nixpkgs.nixpkgs-review
nixpkgs-review pr 75609
nix-shell -p tuxguitar

[nix-shell:~/.cache/nixpkgs-review/pr-75609]$ tuxguitar
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 org.herac.tuxguitar.ui.swt.SWTApplication.createDisplay(SWTApplication.java:65)
at org.herac.tuxguitar.ui.swt.SWTApplication.<init>(SWTApplication.java:15)
at org.herac.tuxguitar.ui.swt.SWTApplicationFactory.createApplication(SWTApplicationFactory.java:9)
at org.herac.tuxguitar.app.ui.TGApplication.<init>(TGApplication.java:25)
at org.herac.tuxguitar.app.ui.TGApplication$1.createInstance(TGApplication.java:56)
at org.herac.tuxguitar.app.ui.TGApplication$1.createInstance(TGApplication.java:54)
at org.herac.tuxguitar.util.singleton.TGSingletonUtil.getInstance(TGSingletonUtil.java:12)
at org.herac.tuxguitar.app.ui.TGApplication.getInstance(TGApplication.java:54)
at org.herac.tuxguitar.app.synchronizer.TGSynchronizerControllerImpl.<init>(TGSynchronizerControllerImpl.java:18)
at org.herac.tuxguitar.app.TuxGuitar.createUIContext(TuxGuitar.java:116)
at org.herac.tuxguitar.app.TuxGuitar.createApplication(TuxGuitar.java:102)
at org.herac.tuxguitar.app.TGMainSingleton.launchTuxGuitar(TGMainSingleton.java:59)
at org.herac.tuxguitar.app.TGMainSingleton.launchSingleton(TGMainSingleton.java:47)

To me tuxguitar is currently broken after an nixpkgs/home-manager update, so I'd rather have it broken with the nullptr, than with a library incompatibility and terminating right away, it feels that this is a step in the right direction anyways and maybe having a swt4_14 isn't really justified.

@stale
Copy link

stale bot commented Jun 4, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 4, 2021
@doronbehar
Copy link
Contributor Author

I don't know if this PR is worth something, not to me anyway. Closing.

@doronbehar doronbehar closed this Jun 4, 2021
@doronbehar doronbehar mentioned this pull request Sep 26, 2021
10 tasks
@doronbehar doronbehar deleted the update-swt branch March 2, 2023 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants