libgdprivate-1.0.so cannot find libgd
When I search something in GNOME Shell dash, I am getting the following errors in the journal:
Jun 20 09:24:54 kaiser .gnome-document[2762]: Failed to load shared library '/nix/store/kz5hqylscr3qsqsjcva17l7x9vrq8g1i-gnome-documents-3.28.1/lib/gnome-documents/libgdprivate-1.0.so' referenced by the typelib: libgd.so: cannot open shared object file: No such file or directory
Jun 20 09:24:54 kaiser .gnome-document[2762]: JS ERROR: GLib.Error g-invoke-error-quark: Could not locate gd_filename_strip_extension: libgd.so: cannot open shared object file: No such file or directory
Jun 20 09:24:54 kaiser .gnome-document[2762]: JS ERROR: GLib.Error g-invoke-error-quark: Could not locate gd_filename_strip_extension: (null)
Jun 20 09:24:55 kaiser .gnome-document[2762]: JS ERROR: GLib.Error g-invoke-error-quark: Could not locate gd_filename_strip_extension: (null)
Jun 20 09:24:55 kaiser .gnome-document[2762]: JS ERROR: GLib.Error g-invoke-error-quark: Could not locate gd_filename_strip_extension: (null)
Jun 20 09:25:19 kaiser .gnome-shell-wr[1634]: Received error from DBus search provider org.gnome.Documents.desktop during GetResultMetas: Gio.IOErrorEnum: Timeout was reached
Jun 20 09:25:19 kaiser .gnome-shell-wr[1634]: Wrong number of result metas returned by search provider org.gnome.Documents.desktop: expected 5 but got 0
ldd
confirms that the library cannot be found:
$ ldd /nix/store/kz5hqylscr3qsqsjcva17l7x9vrq8g1i-gnome-documents-3.28.1/lib/gnome-documents/libgdprivate-1.0.so | grep 'not found'
libgd.so => not found
The file is installed:
$ ls /nix/store/kz5hqylscr3qsqsjcva17l7x9vrq8g1i-gnome-documents-3.28.1/lib/gnome-documents/
girepository-1.0 libgdprivate-1.0.so libgd.so
readelf
confirms that the file is missing from DT_RUNPATH
.
To fix this, the location of the libgd
should be added to the rpath of libgdprivate
.
install_rpath: documents_pkglibdir,
should work, but something like the following would probably be better
install_rpath: libgd.get_install_dir(),
I am running GNOME Documents 3.28.1 built with meson on NixOS.