-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
apache-directory-studio: fix startup #384524
Open
bjornfor
wants to merge
3
commits into
NixOS:master
Choose a base branch
from
bjornfor:fix-apache-directory-studio
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+11
−1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix loading the SWT library by adding glib to the runtime library search path. Before: $ ./result/bin/ApacheDirectoryStudio ApacheDirectoryStudio: An error has occurred. See the log file /home/bf/.eclipse/1900982865_linux_gtk_x86_64/configuration/1740319909191.log. where the log file contains !SESSION 2025-02-23 15:11:49.037 ----------------------------------------------- eclipse.buildId=unknown java.version=21.0.5 java.vendor=N/A BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US Framework arguments: /studio-rcp/resources/icons/linux/studio.xpm Command-line arguments: -os linux -ws gtk -arch x86_64 /studio-rcp/resources/icons/linux/studio.xpm !ENTRY org.eclipse.osgi 4 0 2025-02-23 15:11:49.771 !MESSAGE Application error !STACK 1 java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: no swt-pi4-gtk-4940r23 in java.library.path: /nix/store/l1rnlmalihpfg7aj9lxh4mv5ffnqx6qi-webkitgtk-2.46.6+abi=4.0/lib:/etc/sane-libs:/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib no swt-pi4-gtk in java.library.path: /nix/store/l1rnlmalihpfg7aj9lxh4mv5ffnqx6qi-webkitgtk-2.46.6+abi=4.0/lib:/etc/sane-libs:/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib Can't load library: /home/bf/.swt/lib/linux/x86_64/libswt-pi4-gtk-4940r23.so Can't load library: /home/bf/.swt/lib/linux/x86_64/libswt-pi4-gtk.so at org.eclipse.swt.internal.Library.loadLibrary(Library.java:338) at org.eclipse.swt.internal.Library.loadLibrary(Library.java:257) at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:96) at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:209) at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:155) at org.eclipse.swt.widgets.Display.<clinit>(Display.java:163) at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:726) at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:168) at org.apache.directory.studio.Application.start(Application.java:47) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) at org.eclipse.equinox.launcher.Main.run(Main.java:1461) at org.eclipse.equinox.launcher.Main.main(Main.java:1434) It's worth noting, that when the program fails to load libswt-pi4-gtk-*.so, it has libswt-pi3-gtk-*.so available (it is put there by the application): $ tree ~/.swt /home/bf/.swt └── lib └── linux └── x86_64 └── libswt-pi3-gtk-4940r23.so After: (a different runtime error, possibly only seen on some DEs -- will be fixed in next commit)
eb6b58b
to
e881068
Compare
Before: $ ./result/bin/ApacheDirectoryStudio SWT WebKitGDBus: error creating DBus server Error binding to address (GUnixSocketAddress): No such file or directory SWT WebKit: error initializing DBus server, dBusServer == 0 (Apache Directory Studio:1218305): GLib-GIO-CRITICAL **: 15:17:33.727: g_dbus_server_get_client_address: assertion 'G_IS_DBUS_SERVER (server)' failed # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fe033c36f48, pid=1218305, tid=1218306 # # JRE version: OpenJDK Runtime Environment (21.0.5+1) (build 21.0.5+1-nixos) # Java VM: OpenJDK 64-Bit Server VM (21.0.5+1-nixos, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64) # Problematic frame: # C [libswt-gtk-4940r23.so+0x36f48] Java_org_eclipse_swt_internal_C_strlen+0xf # # Core dump will be written. Default location: Core dumps may be processed with "/nix/store/jz45idky1nhvf3c9gz20ds2py19kdvgf-systemd/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /home/bf/areas/itadmin/nixpkgs/core.1218305) # # An error report file with more information is saved as: # /home/bf/areas/itadmin/nixpkgs/hs_err_pid1218305.log [2.073s][warning][os] Loading hsdis library failed # # If you would like to submit a bug report, please visit: # https://bugreport.java.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # After: $ ./result/bin/ApacheDirectoryStudio ** (WebKitWebProcess:1221467): ERROR **: 15:18:35.064: Failed to create server: Error binding to address (GUnixSocketAddress): No such file or directory ...but the GUI opens and the application seems fine. Tested on NixOS with GNOME (Wayland). Fixes NixOS#333377.
2b225bd
to
d5f7e84
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
10.rebuild-darwin: 0
This PR does not cause any packages to rebuild on Darwin
10.rebuild-linux: 1-10
10.rebuild-linux: 1
backport release-24.11
Backport PR automatically
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Things done
Fixes #333377.
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.