unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#63853: Missing shared libraries for gdk-pixbuf break non-Guix applications on foreign distros
@ 2023-06-02 16:36 raphael.melotte--- via Bug reports for GNU Guix
       [not found] ` <handler.63853.B.168572381423411.ack@debbugs.gnu.org>
  0 siblings, 1 reply; 2+ messages in thread
From: raphael.melotte--- via Bug reports for GNU Guix @ 2023-06-02 16:36 UTC (permalink / raw)
  To: 63853

[-- Attachment #1: Type: text/plain, Size: 3239 bytes --]

Hello,

When running an application that uses gdk-pixbuf as a library, the
GDK_PIXBUF_MODULE_FILE environment variable takes precedence over
build-time defaults (see for example [1]).
If a Guix user on a foreign distro installs in their main profile an
application that sets GDK_PIXBUF_MODULE_FILE, the variable will be used for
all applications, not only the ones installed by Guix (because it's
exported in the profile environment).

See for example when running Thunderbird on Debian when
GDK_PIXBUF_MODULE_FILE is set in the main Guix profile environment file
(note how it loads libgdk_pixbuf provided by Debian, but the PNG loader
provided by Guix):
"""
$ strace thunderbird 2>&1 | grep -E '^open(at)?\(.*\.so' | grep pixbuf
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0",
O_RDONLY|O_CLOEXEC) = 4
openat(AT_FDCWD,
"/gnu/store/5m25ni3hfvmqlsszvbkbz243avz78cb2-gdk-pixbuf-2.42.4/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so",
O_RDONLY|O_CLOEXEC) = 35
"""

This was not so much of a problem until the bump of gdk-pixbuf to version
2.42.8 (see commit 8b0565c07740167982e9cef3fc37359b25340d1b).

In gdkpixbuf 2.42.8, the support for PNG and JPEG is builtin (it's linked
statically, and not as  shared libraries like it was the case in 2.42.4).
This also means that the shared libraries to be able to load such files are
not generated nor install by Guix at all anymore.
Applications that use the newer version of gdk-pixbuf will have no issue as
the gdk-pixbuf library already provides support for loading PNG files.
For non-Guix applications that have been linked against (or dlopen) a
previous version however, this becomes problematic as the support for PNG
files is not builtin anymore, so they will rely on loading the shared
library for it by looking at GDK_PIXBUF_MODULE_FILE, which no longer
contains the path to the lib for PNG files.

An example of such an application is Thunderbird when running on Debian:
with gdk-pixbuf 2.42.8 installed in the main Guix profile, it crashes
everytime the dialog to open a file is opened.
There could be multiple ways to solve it:

- Make sure the library for PNG support (and JPEG) is built as a shared
library again with the current gdk-pixbuf version. This would fix the
crashing apps, but is arguably more a workaround than a solution (do we
have any guarantee that the shared libraries are compatible with any
gdk-pixbuf version the foreign distro might have?).
- Set the GDK_PIXBUF_MODULE_FILE variable for all Guix applications that
need it, but do not export it for the whole profile. Since many other
variables are similarly exported in the profile environment I imagine there
is a good reason for it, so this might not be possible.
- Document as a limitation to not install applications that set
GDK_PIXBUF_MODULE_FILE in the main profile on foreign distros.
- Does anyone have any other idea?

Note that as a temporary fix for anyone affected by this issue, another
possiblity is to unset the GDK_PIXBUF_MODULE_FILE variable in a terminal
before starting the affected application.

Kind regards,

Raphaël

[1]:
https://developer-old.gnome.org/gtk4/stable/gtk-running.html#id-1.9.4.2.10

[-- Attachment #2: Type: text/html, Size: 3504 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#63853: Acknowledgement (Missing shared libraries for gdk-pixbuf break non-Guix applications on foreign distros)
       [not found] ` <handler.63853.B.168572381423411.ack@debbugs.gnu.org>
@ 2023-09-27 13:29   ` raphael.melotte--- via Bug reports for GNU Guix
  0 siblings, 0 replies; 2+ messages in thread
From: raphael.melotte--- via Bug reports for GNU Guix @ 2023-09-27 13:29 UTC (permalink / raw)
  To: 63853

Note that on Debian specifically, this is not so much of an issue after updating to Bookworm (Debian 12), as it itself ships gdk-pixbuf 2.42.10, which has the expected loaders builtin.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-27 13:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-02 16:36 bug#63853: Missing shared libraries for gdk-pixbuf break non-Guix applications on foreign distros raphael.melotte--- via Bug reports for GNU Guix
     [not found] ` <handler.63853.B.168572381423411.ack@debbugs.gnu.org>
2023-09-27 13:29   ` bug#63853: Acknowledgement (Missing shared libraries for gdk-pixbuf break non-Guix applications on foreign distros) raphael.melotte--- via Bug reports for GNU Guix

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).