Skip to content

Commit eef362c

Browse files
committed
apache-directory-studio: add missing glib
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) (cherry picked from commit 83d6952)
1 parent dc6275a commit eef362c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkgs/by-name/ap/apache-directory-studio/package.nix

+6-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,12 @@ stdenv.mkDerivation rec {
5959
makeWrapper "$dest/ApacheDirectoryStudio" \
6060
"$out/bin/ApacheDirectoryStudio" \
6161
--prefix PATH : "${jdk}/bin" \
62-
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath ([ webkitgtk_4_0 ])}
62+
--prefix LD_LIBRARY_PATH : ${
63+
lib.makeLibraryPath ([
64+
glib
65+
webkitgtk_4_0
66+
])
67+
}
6368
install -D icon.xpm "$out/share/pixmaps/apache-directory-studio.xpm"
6469
install -D -t "$out/share/applications" ${desktopItem}/share/applications/*
6570
'';

0 commit comments

Comments
 (0)