* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
@ 2023-05-10 18:50 Nathan Dehnel
2023-05-10 22:24 ` bug#63427: Sharlatan Hellseher
2023-05-11 8:05 ` bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.) Josselin Poiret via Bug reports for GNU Guix
0 siblings, 2 replies; 12+ messages in thread
From: Nathan Dehnel @ 2023-05-10 18:50 UTC (permalink / raw)
To: 63427
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#63427:
2023-05-10 18:50 bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.) Nathan Dehnel
@ 2023-05-10 22:24 ` Sharlatan Hellseher
2023-05-11 8:05 ` bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.) Josselin Poiret via Bug reports for GNU Guix
1 sibling, 0 replies; 12+ messages in thread
From: Sharlatan Hellseher @ 2023-05-10 22:24 UTC (permalink / raw)
To: 63427
Hi,
How to reproduce the issue? May you, please provide some steps please.
--
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-10 18:50 bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.) Nathan Dehnel
2023-05-10 22:24 ` bug#63427: Sharlatan Hellseher
@ 2023-05-11 8:05 ` Josselin Poiret via Bug reports for GNU Guix
2023-05-11 11:04 ` pelzflorian (Florian Pelz)
2023-05-11 19:11 ` Liliana Marie Prikler
1 sibling, 2 replies; 12+ messages in thread
From: Josselin Poiret via Bug reports for GNU Guix @ 2023-05-11 8:05 UTC (permalink / raw)
To: Nathan Dehnel, 63427
[-- Attachment #1: Type: text/plain, Size: 1995 bytes --]
Hi Nathan,
Nathan Dehnel <ncdehnel@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 682 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-11 8:05 ` bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.) Josselin Poiret via Bug reports for GNU Guix
@ 2023-05-11 11:04 ` pelzflorian (Florian Pelz)
2023-05-11 19:11 ` Liliana Marie Prikler
1 sibling, 0 replies; 12+ messages in thread
From: pelzflorian (Florian Pelz) @ 2023-05-11 11:04 UTC (permalink / raw)
To: 63427; +Cc: ncdehnel, dev
Hi all.
Josselin Poiret via Bug reports for GNU Guix <bug-guix@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
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-11 8:05 ` bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.) Josselin Poiret via Bug reports for GNU Guix
2023-05-11 11:04 ` pelzflorian (Florian Pelz)
@ 2023-05-11 19:11 ` Liliana Marie Prikler
2023-05-11 21:22 ` Nathan Dehnel
1 sibling, 1 reply; 12+ messages in thread
From: Liliana Marie Prikler @ 2023-05-11 19:11 UTC (permalink / raw)
To: Josselin Poiret, Nathan Dehnel, 63427
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-11 19:11 ` Liliana Marie Prikler
@ 2023-05-11 21:22 ` Nathan Dehnel
2023-05-12 9:19 ` pelzflorian (Florian Pelz)
0 siblings, 1 reply; 12+ messages in thread
From: Nathan Dehnel @ 2023-05-11 21:22 UTC (permalink / raw)
To: Liliana Marie Prikler; +Cc: Josselin Poiret, 63427
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@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
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-11 21:22 ` Nathan Dehnel
@ 2023-05-12 9:19 ` pelzflorian (Florian Pelz)
2023-05-12 21:21 ` Nathan Dehnel
0 siblings, 1 reply; 12+ messages in thread
From: pelzflorian (Florian Pelz) @ 2023-05-12 9:19 UTC (permalink / raw)
To: Nathan Dehnel; +Cc: Josselin Poiret, Liliana Marie Prikler, 63427
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-12 9:19 ` pelzflorian (Florian Pelz)
@ 2023-05-12 21:21 ` Nathan Dehnel
2023-05-13 10:49 ` pelzflorian (Florian Pelz)
0 siblings, 1 reply; 12+ messages in thread
From: Nathan Dehnel @ 2023-05-12 21:21 UTC (permalink / raw)
To: pelzflorian (Florian Pelz); +Cc: Josselin Poiret, Liliana Marie Prikler, 63427
Yes, that one works
On Fri, May 12, 2023 at 4:27 AM pelzflorian (Florian Pelz)
<pelzflorian@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
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-12 21:21 ` Nathan Dehnel
@ 2023-05-13 10:49 ` pelzflorian (Florian Pelz)
2023-05-13 13:50 ` Liliana Marie Prikler
0 siblings, 1 reply; 12+ messages in thread
From: pelzflorian (Florian Pelz) @ 2023-05-13 10:49 UTC (permalink / raw)
To: Nathan Dehnel; +Cc: Josselin Poiret, Liliana Marie Prikler, 63427
[-- Attachment #1: Type: text/plain, Size: 845 bytes --]
Nathan Dehnel <ncdehnel@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
[-- Attachment #2: viewnior-Support-image-formats-out-of-the-box.patch --]
[-- Type: text/x-patch, Size: 2992 bytes --]
From 29c76710eea6720aa4b5e774a83ce19e577937ac Mon Sep 17 00:00:00 2001
Message-Id: <29c76710eea6720aa4b5e774a83ce19e577937ac.1683974741.git.pelzflorian@pelzflorian.de>
From: Florian Pelz <pelzflorian@pelzflorian.de>
Date: Sat, 13 May 2023 12:33:26 +0200
Subject: [PATCH] gnu: viewnior: Support image formats out of the box.
* gnu/packages/image-viewers.scm (viewnior)
[inputs]: Add 'librsvg-for-system'.
[arguments]: Enable 'glib-or-gtk?' to make available
GDK_PIXBUF_MODULE_FILE. Wrap viewnior to use it instead
of the image loaders installed by the user.
---
gnu/packages/image-viewers.scm | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm
index db7a44d4ff..bbe26aadbe 100644
--- a/gnu/packages/image-viewers.scm
+++ b/gnu/packages/image-viewers.scm
@@ -27,6 +27,7 @@
;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 Tomasz Jeneralczyk <tj@schwi.pl>
;;; Copyright © 2022 Cairn <cairn@pm.me>
+;;; Copyright © 2023 Florian Pelz <pelzflorian@pelzflorian.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -425,12 +426,22 @@ (define-public viewnior
(base32 "14qvx1wajncd5ab0207274cwk32f4ipfnlaci6phmah0cwra2did"))))
(build-system meson-build-system)
(arguments
- '(#:phases (modify-phases %standard-phases
+ '(#:glib-or-gtk? #t
+ #:phases (modify-phases %standard-phases
(add-after 'unpack 'patch-source
(lambda _
;; Don't create 'icon-theme.cache'
(substitute* "meson.build"
- (("meson.add_install_script*") "")))))
+ (("meson.add_install_script*") ""))))
+ (add-after 'glib-or-gtk-wrap 'wrap-pixbuf
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((viewnior (string-append #$output "/bin/viewnior")))
+ (wrap-program viewnior
+ ;; Wrap GDK_PIXBUF_MODULE_FILE so viewnior can be used
+ ;; to view JPG, PNG and SVG, without the user needing
+ ;; to install gdk-pixbuf or librsvg.
+ `("GDK_PIXBUF_MODULE_FILE" =
+ (,(getenv "GDK_PIXBUF_MODULE_FILE"))))))))
#:tests? #f)) ;no tests
(native-inputs
(list gettext-minimal
@@ -440,7 +451,8 @@ (define-public viewnior
(inputs
(list exiv2
gdk-pixbuf
- gtk+-2))
+ gtk+-2
+ (librsvg-for-system)))
(home-page "https://siyanpanayotov.com/project/viewnior")
(synopsis "Simple, fast and elegant image viewer")
(description "Viewnior is an image viewer program. Created to be simple,
base-commit: e3e011a08141058598cc7631aeb52d620a3ccb8c
--
2.39.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-13 10:49 ` pelzflorian (Florian Pelz)
@ 2023-05-13 13:50 ` Liliana Marie Prikler
2023-05-13 18:38 ` pelzflorian (Florian Pelz)
0 siblings, 1 reply; 12+ messages in thread
From: Liliana Marie Prikler @ 2023-05-13 13:50 UTC (permalink / raw)
To: pelzflorian (Florian Pelz), Nathan Dehnel; +Cc: Josselin Poiret, 63427
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-13 13:50 ` Liliana Marie Prikler
@ 2023-05-13 18:38 ` pelzflorian (Florian Pelz)
2023-05-15 5:18 ` Nathan Dehnel
0 siblings, 1 reply; 12+ messages in thread
From: pelzflorian (Florian Pelz) @ 2023-05-13 18:38 UTC (permalink / raw)
To: Liliana Marie Prikler; +Cc: Nathan Dehnel, Josselin Poiret, 63427
[-- Attachment #1: Type: text/plain, Size: 550 bytes --]
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
[-- Attachment #2: viewnior-Support-image-formats-out-of-the-box.patch --]
[-- Type: text/x-patch, Size: 3294 bytes --]
From 6acc7322695a13c326918c4b83a999e324406b21 Mon Sep 17 00:00:00 2001
Message-Id: <6acc7322695a13c326918c4b83a999e324406b21.1684001649.git.pelzflorian@pelzflorian.de>
From: Florian Pelz <pelzflorian@pelzflorian.de>
Date: Sat, 13 May 2023 12:33:26 +0200
Subject: [PATCH] gnu: viewnior: Support image formats out of the box.
* gnu/packages/image-viewers.scm (viewnior)
[inputs]: Add 'librsvg-for-system'.
[arguments]: Enable 'glib-or-gtk?' to make available
GDK_PIXBUF_MODULE_FILE. Wrap viewnior to use it instead
of the image loaders installed by the user.
---
gnu/packages/image-viewers.scm | 29 +++++++++++++++++++++--------
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm
index db7a44d4ff..798a8e50e8 100644
--- a/gnu/packages/image-viewers.scm
+++ b/gnu/packages/image-viewers.scm
@@ -27,6 +27,7 @@
;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 Tomasz Jeneralczyk <tj@schwi.pl>
;;; Copyright © 2022 Cairn <cairn@pm.me>
+;;; Copyright © 2023 Florian Pelz <pelzflorian@pelzflorian.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -425,13 +426,24 @@ (define-public viewnior
(base32 "14qvx1wajncd5ab0207274cwk32f4ipfnlaci6phmah0cwra2did"))))
(build-system meson-build-system)
(arguments
- '(#:phases (modify-phases %standard-phases
- (add-after 'unpack 'patch-source
- (lambda _
- ;; Don't create 'icon-theme.cache'
- (substitute* "meson.build"
- (("meson.add_install_script*") "")))))
- #:tests? #f)) ;no tests
+ (list #:glib-or-gtk? #t
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-source
+ (lambda _
+ ;; Don't create 'icon-theme.cache'
+ (substitute* "meson.build"
+ (("meson.add_install_script*") ""))))
+ (add-after 'glib-or-gtk-wrap 'wrap-pixbuf
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((viewnior (string-append #$output "/bin/viewnior")))
+ (wrap-program viewnior
+ ;; Wrap GDK_PIXBUF_MODULE_FILE so viewnior can be used
+ ;; to view JPG, PNG and SVG, without the user needing
+ ;; to install gdk-pixbuf or librsvg.
+ `("GDK_PIXBUF_MODULE_FILE" =
+ (,(getenv "GDK_PIXBUF_MODULE_FILE"))))))))
+ #:tests? #f)) ;no tests
(native-inputs
(list gettext-minimal
`(,glib "bin") ;glib-genmarshal
@@ -440,7 +452,8 @@ (define-public viewnior
(inputs
(list exiv2
gdk-pixbuf
- gtk+-2))
+ gtk+-2
+ (librsvg-for-system)))
(home-page "https://siyanpanayotov.com/project/viewnior")
(synopsis "Simple, fast and elegant image viewer")
(description "Viewnior is an image viewer program. Created to be simple,
base-commit: e3e011a08141058598cc7631aeb52d620a3ccb8c
--
2.39.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-13 18:38 ` pelzflorian (Florian Pelz)
@ 2023-05-15 5:18 ` Nathan Dehnel
0 siblings, 0 replies; 12+ messages in thread
From: Nathan Dehnel @ 2023-05-15 5:18 UTC (permalink / raw)
To: pelzflorian (Florian Pelz); +Cc: Josselin Poiret, Liliana Marie Prikler, 63427
[-- Attachment #1: Type: text/plain, Size: 723 bytes --]
With another update, the errors went away. Thanks
On Sat, May 13, 2023, 13:38 pelzflorian (Florian Pelz) <
pelzflorian@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
>
[-- Attachment #2: Type: text/html, Size: 1046 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-05-15 5:20 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-10 18:50 bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.) Nathan Dehnel
2023-05-10 22:24 ` bug#63427: Sharlatan Hellseher
2023-05-11 8:05 ` bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.) Josselin Poiret via Bug reports for GNU Guix
2023-05-11 11:04 ` pelzflorian (Florian Pelz)
2023-05-11 19:11 ` Liliana Marie Prikler
2023-05-11 21:22 ` Nathan Dehnel
2023-05-12 9:19 ` pelzflorian (Florian Pelz)
2023-05-12 21:21 ` Nathan Dehnel
2023-05-13 10:49 ` pelzflorian (Florian Pelz)
2023-05-13 13:50 ` Liliana Marie Prikler
2023-05-13 18:38 ` pelzflorian (Florian Pelz)
2023-05-15 5:18 ` Nathan Dehnel
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.