GNU bug report logs - #63853
Missing shared libraries for gdk-pixbuf break non-Guix applications on foreign distros

Previous Next

Package: guix;

Reported by: Raphaël Mélotte <raphael.melotte <at> mind.be>

Date: Fri, 2 Jun 2023 16:37:02 UTC

Severity: normal

To reply to this bug, email your comments to 63853 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#63853; Package guix. (Fri, 02 Jun 2023 16:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raphaël Mélotte <raphael.melotte <at> mind.be>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Fri, 02 Jun 2023 16:37:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Raphaël Mélotte <raphael.melotte <at> mind.be>
To: bug-guix <at> gnu.org
Subject: Missing shared libraries for gdk-pixbuf break non-Guix applications
 on foreign distros
Date: Fri, 2 Jun 2023 18:36:34 +0200
[Message part 1 (text/plain, inline)]
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
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#63853; Package guix. (Wed, 27 Sep 2023 13:30:02 GMT) Full text and rfc822 format available.

Message #8 received at 63853 <at> debbugs.gnu.org (full text, mbox):

From: Raphaël Mélotte <raphael.melotte <at> mind.be>
To: 63853 <at> debbugs.gnu.org
Subject: Re: bug#63853: Acknowledgement (Missing shared libraries for
 gdk-pixbuf break non-Guix applications on foreign distros)
Date: Wed, 27 Sep 2023 15:29:03 +0200
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.




This bug report was last modified 209 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.