GNU bug report logs - #63427
gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)

Previous Next

Package: guix;

Reported by: Nathan Dehnel <ncdehnel <at> gmail.com>

Date: Wed, 10 May 2023 18:52:01 UTC

Severity: normal

Done: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63427 in the body.
You can then email your comments to 63427 AT debbugs.gnu.org in the normal way.

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#63427; Package guix. (Wed, 10 May 2023 18:52:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nathan Dehnel <ncdehnel <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 10 May 2023 18:52:02 GMT) Full text and rfc822 format available.

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

From: Nathan Dehnel <ncdehnel <at> gmail.com>
To: bug-guix <bug-guix <at> gnu.org>
Subject: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
Date: Wed, 10 May 2023 13:50:51 -0500
Gtk:ERROR:gtkiconhelper.c:494:
ensure_surface_for_gicon: assertion
failed (error == NULL): Failed to load
/run/current-system/profile/share/icons/Adwaita/16x16/status/image-missing.png:
Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Bail out! Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon:
assertion failed (error == NULL): Failed to load
/run/current-system/profile/share/icons/Adwaita/16x16/status/image-missing.png:
Unrecognized image file format (gdk-pixbuf-error-quark, 3)

This is breaking various apps like viewnior, xfce4-power-manager,
causing firefox to crash when opening the file picker, making app
icons not appear, etc.

guix version b7e7744




Information forwarded to bug-guix <at> gnu.org:
bug#63427; Package guix. (Wed, 10 May 2023 22:26:01 GMT) Full text and rfc822 format available.

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

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 63427 <at> debbugs.gnu.org
Date: Wed, 10 May 2023 23:24:37 +0100
Hi,

How to reproduce the issue? May you, please provide some steps please.

-- 
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.

Information forwarded to bug-guix <at> gnu.org:
bug#63427; Package guix. (Thu, 11 May 2023 08:07:02 GMT) Full text and rfc822 format available.

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

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Nathan Dehnel <ncdehnel <at> gmail.com>, 63427 <at> debbugs.gnu.org
Subject: Re: bug#63427: gdk-pixbuf unable to recognize image formats (JPG,
 PNG, etc.)
Date: Thu, 11 May 2023 10:05:41 +0200
[Message part 1 (text/plain, inline)]
Hi Nathan,

Nathan Dehnel <ncdehnel <at> gmail.com> writes:

> Gtk:ERROR:gtkiconhelper.c:494:
> ensure_surface_for_gicon: assertion
> failed (error == NULL): Failed to load
> /run/current-system/profile/share/icons/Adwaita/16x16/status/image-missing.png:
> Unrecognized image file format (gdk-pixbuf-error-quark, 3)
> Bail out! Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon:
> assertion failed (error == NULL): Failed to load
> /run/current-system/profile/share/icons/Adwaita/16x16/status/image-missing.png:
> Unrecognized image file format (gdk-pixbuf-error-quark, 3)
>
> This is breaking various apps like viewnior, xfce4-power-manager,
> causing firefox to crash when opening the file picker, making app
> icons not appear, etc.

So, GDK Pixbuf has a dynamic loader mechanism, where additional formats
can be added via additional loaders, which are usually all installed in
the same directory.  In Guix, this means that we need to point GDK
Pixbuf to a list of loaders to use that is dependent on what is
installed (there's no easy way to record this per-package, embed it
inside of it and then use that only there like with the ld cache).  For
that, we use the environment variable GDK_PIXBUF_MODULE_FILE, which is a
search-path for the package gdk-pixbuf, meaning that it is set only if
gdk-pixbuf is installed in your profile.

Now, if we had packaged everything properly, all the applications you
mention should *propagate* gdk-pixbuf and not just list it as an input,
so that it always gets installed to the profile as well, but that's not
the case!  The reason it doesn't happen for other users is because they
have some applications which pull in gdk-pixbuf inside the profile!  So
we should fix this and propagate gdk-pixbuf everywhere (something which
I'm not too much a fan of, but alas).

In the meantime, you can manually install gdk-pixbuf to your profile,
log-out and log-in and it should hopefully work.

Best,
-- 
Josselin Poiret
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#63427; Package guix. (Thu, 11 May 2023 11:05:01 GMT) Full text and rfc822 format available.

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

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: Josselin Poiret via Bug reports for GNU Guix <bug-guix <at> gnu.org>
Cc: Nathan Dehnel <ncdehnel <at> gmail.com>, Josselin Poiret <dev <at> jpoiret.xyz>,
 63427 <at> debbugs.gnu.org
Subject: Re: bug#63427: gdk-pixbuf unable to recognize image formats (JPG,
 PNG, etc.)
Date: Thu, 11 May 2023 13:04:31 +0200
Hi all.

Josselin Poiret via Bug reports for GNU Guix <bug-guix <at> gnu.org> writes:
> For
> that, we use the environment variable GDK_PIXBUF_MODULE_FILE, which is a
> search-path for the package gdk-pixbuf, meaning that it is set only if
> gdk-pixbuf is installed in your profile.  […] So
> we should fix this and propagate gdk-pixbuf everywhere (something which
> I'm not too much a fan of, but alas).

The cambalache package does the right thing by wrapping the program to
setenv GDK_PIXBUF_MODULE_FILE to the value it has while building the
package.  glib-or-gtk build system sets GDK_PIXBUF_MODULE_FILE while
building the package.  Note that gdkpixbuf and perhaps
librsvg-for-system must be in inputs.

Regards,
Florian




Information forwarded to bug-guix <at> gnu.org:
bug#63427; Package guix. (Thu, 11 May 2023 11:05:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#63427; Package guix. (Thu, 11 May 2023 19:12:01 GMT) Full text and rfc822 format available.

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

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Josselin Poiret <dev <at> jpoiret.xyz>, Nathan Dehnel <ncdehnel <at> gmail.com>, 
 63427 <at> debbugs.gnu.org
Subject: Re: bug#63427: gdk-pixbuf unable to recognize image formats (JPG,
 PNG, etc.)
Date: Thu, 11 May 2023 21:11:36 +0200
Am Donnerstag, dem 11.05.2023 um 10:05 +0200 schrieb Josselin Poiret:
> Now, if we had packaged everything properly, all the applications you
> mention should *propagate* gdk-pixbuf and not just list it as an
> input
No.  Propagated inputs are *never* the result of proper packaging. 
More often than not, they create more issues than they solve by
reducing Guix to the capabilities of a dumb package manager.  While
yes, they have been accepted as a solution to some issues (e.g. pkg-
config not finding inputs), this by no means translates to "oh,
something's not found, let's propagate an input".  However, even for
those cases where they have become accepted practice, we ought to look
for better solutions, as proliferating propagations do end up biting us
in the form of conflicts.

The only instance in which propagated inputs behave as intended is with
meta packages; there they are even slightly less clunky than their
alternative (union builds).

As for the actual problem at hand, the solution has already been
pointed out by Florian: wrapping commands to bind
GDK_PIXBUF_MODULE_FILE.  Sadly, Florian didn't point these unwanted
side effects of propagation, as contributors are often unaware of them.

Cheers




Information forwarded to bug-guix <at> gnu.org:
bug#63427; Package guix. (Thu, 11 May 2023 21:23:02 GMT) Full text and rfc822 format available.

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

From: Nathan Dehnel <ncdehnel <at> gmail.com>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, 63427 <at> debbugs.gnu.org
Subject: Re: bug#63427: gdk-pixbuf unable to recognize image formats (JPG,
 PNG, etc.)
Date: Thu, 11 May 2023 16:22:08 -0500
Installing gdk-pixbuf and rebooting didn't fix the issue:

viewnior '/home/nathan/Downloads/from-phone/Pictures/Screenshots/Screenshot_20230509-183317_F-Droid.png'

(viewnior:2482): Gtk-WARNING **: 16:14:57.820: Unable to locate theme
engine in module_path: "adwaita",

(viewnior:2482): Gtk-WARNING **: 16:14:57.822: Unable to locate theme
engine in module_path: "adwaita",
/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libc.so.6:
version `GLIBC_2.34' not found (required by
/gnu/store/yr4lbvdyc4dgs76yij1dw2w2z8s84af8-gnutls-3.7.7/lib/libgnutls.so.30)
Failed to load module:
/home/nathan/.guix-profile/lib/gio/modules/libgiognutls.so
/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libc.so.6:
version `GLIBC_2.34' not found (required by
/gnu/store/8sfnwc672lswqgkf9g5qv7r5247jyipp-libproxy-0.4.17/lib/libproxy.so.1)
Failed to load module:
/home/nathan/.guix-profile/lib/gio/modules/libgiolibproxy.so

** (viewnior:2482): WARNING **: 16:14:57.853: Pixbuf theme: Cannot
load pixmap file
/run/current-system/profile/share/themes/Adwaita-dark/gtk-2.0/assets/line.png:
Couldn’t recognize the image file format for file
“/run/current-system/profile/share/themes/Adwaita-dark/gtk-2.0/assets/line.png”


(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

** (viewnior:2482): WARNING **: 16:14:57.853: Invalid borders
specified for theme pixmap:
        /run/current-system/profile/share/themes/Adwaita-dark/gtk-2.0/assets/line.png,
borders don't fit within the image

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

** (viewnior:2482): WARNING **: 16:14:57.853: Invalid borders
specified for theme pixmap:
        /run/current-system/profile/share/themes/Adwaita-dark/gtk-2.0/assets/line.png,
borders don't fit within the image

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

On Thu, May 11, 2023 at 2:11 PM Liliana Marie Prikler
<liliana.prikler <at> gmail.com> wrote:
>
> Am Donnerstag, dem 11.05.2023 um 10:05 +0200 schrieb Josselin Poiret:
> > Now, if we had packaged everything properly, all the applications you
> > mention should *propagate* gdk-pixbuf and not just list it as an
> > input
> No.  Propagated inputs are *never* the result of proper packaging.
> More often than not, they create more issues than they solve by
> reducing Guix to the capabilities of a dumb package manager.  While
> yes, they have been accepted as a solution to some issues (e.g. pkg-
> config not finding inputs), this by no means translates to "oh,
> something's not found, let's propagate an input".  However, even for
> those cases where they have become accepted practice, we ought to look
> for better solutions, as proliferating propagations do end up biting us
> in the form of conflicts.
>
> The only instance in which propagated inputs behave as intended is with
> meta packages; there they are even slightly less clunky than their
> alternative (union builds).
>
> As for the actual problem at hand, the solution has already been
> pointed out by Florian: wrapping commands to bind
> GDK_PIXBUF_MODULE_FILE.  Sadly, Florian didn't point these unwanted
> side effects of propagation, as contributors are often unaware of them.
>
> Cheers




Information forwarded to bug-guix <at> gnu.org:
bug#63427; Package guix. (Fri, 12 May 2023 09:28:02 GMT) Full text and rfc822 format available.

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

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: Nathan Dehnel <ncdehnel <at> gmail.com>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>, 63427 <at> debbugs.gnu.org
Subject: Re: bug#63427: gdk-pixbuf unable to recognize image formats (JPG,
 PNG, etc.)
Date: Fri, 12 May 2023 11:19:11 +0200
Nathan, could you try running this command:

guix shell --pure viewnior gdk-pixbuf -- viewnior

For me this works now.  My guess is that for you, something else breaks
viewnior and --pure can help.

Regards,
Florian




Information forwarded to bug-guix <at> gnu.org:
bug#63427; Package guix. (Fri, 12 May 2023 21:23:01 GMT) Full text and rfc822 format available.

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

From: Nathan Dehnel <ncdehnel <at> gmail.com>
To: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>, 63427 <at> debbugs.gnu.org
Subject: Re: bug#63427: gdk-pixbuf unable to recognize image formats (JPG,
 PNG, etc.)
Date: Fri, 12 May 2023 16:21:53 -0500
Yes, that one works

On Fri, May 12, 2023 at 4:27 AM pelzflorian (Florian Pelz)
<pelzflorian <at> pelzflorian.de> wrote:
>
> Nathan, could you try running this command:
>
> guix shell --pure viewnior gdk-pixbuf -- viewnior
>
> For me this works now.  My guess is that for you, something else breaks
> viewnior and --pure can help.
>
> Regards,
> Florian




Information forwarded to bug-guix <at> gnu.org:
bug#63427; Package guix. (Sat, 13 May 2023 10:50:02 GMT) Full text and rfc822 format available.

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

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: Nathan Dehnel <ncdehnel <at> gmail.com>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>, 63427 <at> debbugs.gnu.org
Subject: Re: bug#63427: gdk-pixbuf unable to recognize image formats (JPG,
 PNG, etc.)
Date: Sat, 13 May 2023 12:49:16 +0200
[Message part 1 (text/plain, inline)]
Nathan Dehnel <ncdehnel <at> gmail.com> writes:
> Yes, that one works

That’s good.  This means maybe either

- if guix shell without --pure works too, you just have not run “guix
  upgrade” recently, or

- --pure helped and viewnior is not compatible with the Adwaita dark
    theme, or

- --pure helped because you have misconfigured something that breaks the
  installed viewnior, but leaves the pure one intact.

What remains as a bug is wrapping the viewnior program inside
gdk-pixbuf, so installing gdk-pixbuf is not needed anymore.  Untested
patch is attached.

But then other image loaders installed by the user to support
e.g. libexif would not be usable anymore.  We could also add libexif,
but do we even want the attached patch?  Or should it be up to the user
to install image loaders?

Regards,
Florian

[viewnior-Support-image-formats-out-of-the-box.patch (text/x-patch, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#63427; Package guix. (Sat, 13 May 2023 13:51:01 GMT) Full text and rfc822 format available.

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

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>, Nathan Dehnel
 <ncdehnel <at> gmail.com>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, 63427 <at> debbugs.gnu.org
Subject: Re: bug#63427: gdk-pixbuf unable to recognize image formats (JPG,
 PNG, etc.)
Date: Sat, 13 May 2023 15:50:16 +0200
Am Samstag, dem 13.05.2023 um 12:49 +0200 schrieb pelzflorian (Florian
Pelz):
> But then other image loaders installed by the user to support
> e.g. libexif would not be usable anymore.  We could also add libexif,
> but do we even want the attached patch?  Or should it be up to the
> user to install image loaders?
Given that $GDK_PIXBUF_MODULE_FILE is bound and not PATH-like, it would
be up to the package to declare those dependencies.  Perhaps we ought
to have a meta-package for gdk-pixbuf with all available loaders. 
Lacking that it's up to the packager to decide which formats are
important and add each one manually; though note that this practice
also allows users to override said defaults with proper modify-inputs.

Cheers




Information forwarded to bug-guix <at> gnu.org:
bug#63427; Package guix. (Sat, 13 May 2023 18:39:02 GMT) Full text and rfc822 format available.

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

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: Nathan Dehnel <ncdehnel <at> gmail.com>, Josselin Poiret <dev <at> jpoiret.xyz>,
 63427 <at> debbugs.gnu.org
Subject: Re: bug#63427: gdk-pixbuf unable to recognize image formats (JPG,
 PNG, etc.)
Date: Sat, 13 May 2023 20:38:12 +0200
[Message part 1 (text/plain, inline)]
Hi Liliana and all.  Until now the user could decide what image loaders
to install alongside.  Or so I thought.  However, surprisingly I cannot
get any other loader except gdk-pixbuf and librsvg to work anyway.

That is,

guix shell viewnior webp-pixbuf-loader

surprisingly does not see webp files.  I do not understand.

If this changed patch looks fine, now with proper gexp use, I will push
it.  The patch continues to include gdk-pixbuf among the inputs even
though gtk+@2 propagates gdk-pixbuf anyway, but better be explicit.

Regards,
Florian
[viewnior-Support-image-formats-out-of-the-box.patch (text/x-patch, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#63427; Package guix. (Mon, 15 May 2023 05:20:01 GMT) Full text and rfc822 format available.

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

From: Nathan Dehnel <ncdehnel <at> gmail.com>
To: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>, 63427 <at> debbugs.gnu.org
Subject: Re: bug#63427: gdk-pixbuf unable to recognize image formats (JPG,
 PNG, etc.)
Date: Mon, 15 May 2023 00:18:45 -0500
[Message part 1 (text/plain, inline)]
With another update, the errors went away. Thanks

On Sat, May 13, 2023, 13:38 pelzflorian (Florian Pelz) <
pelzflorian <at> pelzflorian.de> wrote:

> Hi Liliana and all.  Until now the user could decide what image loaders
> to install alongside.  Or so I thought.  However, surprisingly I cannot
> get any other loader except gdk-pixbuf and librsvg to work anyway.
>
> That is,
>
> guix shell viewnior webp-pixbuf-loader
>
> surprisingly does not see webp files.  I do not understand.
>
> If this changed patch looks fine, now with proper gexp use, I will push
> it.  The patch continues to include gdk-pixbuf among the inputs even
> though gtk+@2 propagates gdk-pixbuf anyway, but better be explicit.
>
> Regards,
> Florian
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#63427; Package guix. (Wed, 15 Jan 2025 05:28:01 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
Cc: Nathan Dehnel <ncdehnel <at> gmail.com>, Josselin Poiret <dev <at> jpoiret.xyz>,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>, 63427 <at> debbugs.gnu.org
Subject: Re: bug#63427: gdk-pixbuf unable to recognize image formats (JPG,
 PNG, etc.)
Date: Wed, 15 Jan 2025 14:26:43 +0900
Hi,

"pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de> writes:

> Hi Liliana and all.  Until now the user could decide what image loaders
> to install alongside.  Or so I thought.  However, surprisingly I cannot
> get any other loader except gdk-pixbuf and librsvg to work anyway.
>
> That is,
>
> guix shell viewnior webp-pixbuf-loader
>
> surprisingly does not see webp files.  I do not understand.

Try again with:

--8<---------------cut here---------------start------------->8---
guix shell viewnior gdk-pixbuf webp-pixbuf-loader
--8<---------------cut here---------------end--------------->8---

You need to add gdk-pixbuf as the GDK_PIXBUF_MODULE_FILE search path is
defined on this package, and this currently gets computed per-profile.

-- 
Thanks,
Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#63427; Package guix. (Wed, 15 Jan 2025 14:28:01 GMT) Full text and rfc822 format available.

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

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Nathan Dehnel <ncdehnel <at> gmail.com>, Josselin Poiret <dev <at> jpoiret.xyz>,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>, 63427 <at> debbugs.gnu.org
Subject: Re: bug#63427: gdk-pixbuf unable to recognize image formats (JPG,
 PNG, etc.)
Date: Wed, 15 Jan 2025 15:28:17 +0100
[Message part 1 (text/plain, inline)]
Thank you Maxim for waking up the bug and giving an essential hint,
because I did not understand the bug anymore.

Indeed, without wrapping GDK_PIXBUF_MODULE_FILE as in my patch

guix shell --pure viewnior gdk-pixbuf webp-pixbuf-loader

does open webp files fine.

Wrapping it with the attached patch,

guix shell --pure viewnior

also opens webp files fine, but only after I have added
webp-pixbuf-loader to viewnior’s inputs.

But wrapping inhibits webp-pixbuf-loader when I don’t add it to inputs
even with

guix shell --pure viewnior gdk-pixbuf webp-pixbuf-loader

So wrapping apparently hard-codes which input formats there are.

Notably librsvg exceptionally does not need to be added explicitly.

Is it better to wrap viewnior and hard-code the supported image formats,
as I wanted, so installing only viewnior is enough?

Or better drop the attached patch and users need to install gdk-pixbuf
webp-pixbuf-loader as well?

I tend to prefer to wrap viewnior.

Regards,
Florian
[viewnior-Support-image-formats-out-of-the-box.patch (text/x-patch, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#63427; Package guix. (Wed, 15 Jan 2025 15:08:01 GMT) Full text and rfc822 format available.

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

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>, Maxim
 Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Nathan Dehnel <ncdehnel <at> gmail.com>, Josselin Poiret <dev <at> jpoiret.xyz>,
 63427 <at> debbugs.gnu.org
Subject: Re: bug#63427: gdk-pixbuf unable to recognize image formats (JPG,
 PNG, etc.)
Date: Wed, 15 Jan 2025 16:07:06 +0100
[Message part 1 (text/plain, inline)]
Am Mittwoch, dem 15.01.2025 um 15:28 +0100 schrieb pelzflorian (Florian
Pelz):
> Is it better to wrap viewnior and hard-code the supported image
> formats, as I wanted, so installing only viewnior is enough?
> 
> Or better drop the attached patch and users need to install gdk-
> pixbuf [and] webp-pixbuf-loader as well?
> 
> I tend to prefer to wrap viewnior.
I think wrapping is good, but I don't think we can anticipate all the
formats a user might want.  I've attached a patch that allows us to use
"set if unspecified" semantics – not really sure how meaningful those
are – but perhaps we would need a GUIX_-prefixed environment variable
once again.  Barring an upstream change from GDK_PIXBUF_MODULE_FILE to
GDK_PIXBUF_MODULE_PATH anyway.

WDYT?
[0001-guix-wrap-program-Add-logic-for-setting-only-unset-variables.patch (text/x-patch, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#63427; Package guix. (Thu, 16 Jan 2025 07:50:02 GMT) Full text and rfc822 format available.

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

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: Nathan Dehnel <ncdehnel <at> gmail.com>, Josselin Poiret <dev <at> jpoiret.xyz>,
 63427 <at> debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Re: bug#63427: gdk-pixbuf unable to recognize image formats (JPG,
 PNG, etc.)
Date: Thu, 16 Jan 2025 08:50:09 +0100
Liliana’s new escape hatch is nice, and indeed GDK_PIXBUF_MODULE_FILE is
unset in

$ guix shell --pure viewnior webp-pixbuf-loader
$ echo $GDK_PIXBUF_MODULE_FILE

but it rebuilds the world.  A security-relevant (?) upstream
introduction of GDK_PIXBUF_MODULE_PATH also would have Guix rebuild the
world.

Could I, with your agreement, push the viewnior wrapper patch with
(wrap-program viewnior
 `("GDK_PIXBUF_MODULE_FILE" =
in the meantime?  The majority of users will not know search paths
anyway perhaps, and viewnior is just one image viewer.

Regards,
Florian




Information forwarded to bug-guix <at> gnu.org:
bug#63427; Package guix. (Thu, 16 Jan 2025 07:58:01 GMT) Full text and rfc822 format available.

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

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
Cc: Nathan Dehnel <ncdehnel <at> gmail.com>, Josselin Poiret <dev <at> jpoiret.xyz>,
 63427 <at> debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Re: bug#63427: gdk-pixbuf unable to recognize image formats (JPG,
 PNG, etc.)
Date: Thu, 16 Jan 2025 08:57:09 +0100
Am Donnerstag, dem 16.01.2025 um 08:50 +0100 schrieb pelzflorian
(Florian Pelz):
> Liliana’s new escape hatch is nice, and indeed GDK_PIXBUF_MODULE_FILE
> is unset in
> 
> $ guix shell --pure viewnior webp-pixbuf-loader
> $ echo $GDK_PIXBUF_MODULE_FILE
> 
> but it rebuilds the world.  A security-relevant (?) upstream
> introduction of GDK_PIXBUF_MODULE_PATH also would have Guix rebuild
> the world.
> 
> Could I, with your agreement, push the viewnior wrapper patch with
> (wrap-program viewnior
>  `("GDK_PIXBUF_MODULE_FILE" =
> in the meantime?  The majority of users will not know search paths
> anyway perhaps, and viewnior is just one image viewer.
Oh, yeah, for the time being that patch is absolutely fine and it
mirrors what we do with inkscape etc.  I was just adding that we can
add escape hatches whenever we want to do a world rebuild.

Cheers




Reply sent to "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>:
You have taken responsibility. (Thu, 16 Jan 2025 14:37:02 GMT) Full text and rfc822 format available.

Notification sent to Nathan Dehnel <ncdehnel <at> gmail.com>:
bug acknowledged by developer. (Thu, 16 Jan 2025 14:37:02 GMT) Full text and rfc822 format available.

Message #61 received at 63427-done <at> debbugs.gnu.org (full text, mbox):

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: 63427-done <at> debbugs.gnu.org
Cc: Nathan Dehnel <ncdehnel <at> gmail.com>, Josselin Poiret <dev <at> jpoiret.xyz>,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>,
 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Re: bug#63427: gdk-pixbuf unable to recognize image formats (JPG,
 PNG, etc.)
Date: Thu, 16 Jan 2025 15:36:41 +0100
Pushed as 7aae0e2c159b1612b405a372b18f25fbb58f9d82.

Ah yes inkscape’s wrap-program is similar.

I see Maxim responded do this bug here because of related bug
<https://bugs.gnu.org/75523> with foreign distros.  Perhaps discussion
will go on there.

Regards,
Florian




Information forwarded to bug-guix <at> gnu.org:
bug#63427; Package guix. (Fri, 17 Jan 2025 03:20:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: Nathan Dehnel <ncdehnel <at> gmail.com>, Josselin Poiret <dev <at> jpoiret.xyz>,
 "pelzflorian \(Florian Pelz\)" <pelzflorian <at> pelzflorian.de>,
 63427 <at> debbugs.gnu.org
Subject: Re: bug#63427: gdk-pixbuf unable to recognize image formats (JPG,
 PNG, etc.)
Date: Fri, 17 Jan 2025 12:18:50 +0900
Hi!

Liliana Marie Prikler <liliana.prikler <at> gmail.com> writes:

[...]

> I've attached a patch that allows us to use
> "set if unspecified" semantics – not really sure how meaningful those
> are – but perhaps we would need a GUIX_-prefixed environment variable
> once again.  Barring an upstream change from GDK_PIXBUF_MODULE_FILE to
> GDK_PIXBUF_MODULE_PATH anyway.
>
> WDYT?
>
> diff --git a/guix/build/utils.scm b/guix/build/utils.scm
> index 94714bf397..d48b9112b8 100644
> --- a/guix/build/utils.scm
> +++ b/guix/build/utils.scm
> @@ -1393,6 +1393,9 @@ (define* (wrap-program prog #:key (sh (which "bash")) #:rest vars)
>        ((var sep '= rest)
>         (format #f "export ~a=\"~a\""
>                 var (string-join rest sep)))
> +      ((var sep ':- rest)
> +       (format #f "export ~a=\"${~a:-~a}\""
> +               var var (string-join rest sep)))
>        ((var sep 'prefix rest)
>         (format #f "export ~a=\"~a${~a:+~a}$~a\""
>                 var (string-join rest sep) var sep var))
> @@ -1402,6 +1405,9 @@ (define* (wrap-program prog #:key (sh (which "bash")) #:rest vars)
>        ((var '= rest)
>         (format #f "export ~a=\"~a\""
>                 var (string-join rest ":")))
> +      ((var ':- rest)
> +       (format #f "export ~a=\"${~a:-~a}\""
> +               var var (string-join rest ":")))
>        ((var 'prefix rest)
>         (format #f "export ~a=\"~a${~a:+:}$~a\""
>                 var (string-join rest ":") var var))
> @@ -1470,6 +1476,8 @@ (define wrap-script
>          (match-lambda
>            ((var sep '= rest)
>             `(setenv ,var ,(string-join rest sep)))
> +          ((var sep ':- rest)
> +           `(unless (getenv ,var) (setenv ,var ,(string-join rest sep))))
>            ((var sep 'prefix rest)
>             `(let ((current (getenv ,var)))
>                (setenv ,var (if current
> @@ -1484,6 +1492,8 @@ (define wrap-script
>                                 ,(string-join rest sep)))))
>            ((var '= rest)
>             `(setenv ,var ,(string-join rest ":")))
> +          ((var ':- rest)
> +           `(unless (getenv ,var) (setenv ,var ,(string-join rest ":"))))
>            ((var 'prefix rest)
>             `(let ((current (getenv ,var)))
>                (setenv ,var (if current

I like it!  It's something I've wanted in the past.  Perhaps you could
submit it as its own thing, referencing this issue in the commit message
perhaps.

Longer term, we probably work on an upstream true PATH-like solution,
but in the meantime this would be useful to have here, and probably
useful for other single-entry environment variables.

-- 
Thanks,
Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 14 Feb 2025 12:24:14 GMT) Full text and rfc822 format available.

This bug report was last modified 27 days ago.

Previous Next


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