ImageMagick’s ‘convert’ fails to delegate to ‘dwebp’

  • Done
  • quality assurance status badge
Details
5 participants
  • Ludovic Courtès
  • Maxim Cournoyer
  • Saku Laesvuori
  • Simon South
  • Wicki Gabriel (wicg)
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
normal
L
L
Ludovic Courtès wrote on 25 Apr 2021 15:38
ImageMagick’s ‘convert’ fails to delegate to ‘dwebp’
(address . bug-guix@gnu.org)
87fszeh4bh.fsf@inria.fr
ImageMagick’s ‘convert’ refers to the ‘dwebp’ program with a leading
space, which prevents conversion to/from webp:

Toggle snippet (15 lines)
$ guix time-machine --commit=2a624253bc55e2a94f6581d6e790303575436c96 -- \
environment -C --ad-hoc strace imagemagick libwebp -- \
strace -f -e execve convert t.webp t.png
execve("/gnu/store/2rmnafvwqvl460qa370gn18yl09dx91h-profile/bin/convert", ["convert", "t.webp", "t.png"], 0x7ffe6637b988 /* 10 vars */) = 0
strace: Process 5 attached
[pid 5] execve("/gnu/store/2rmnafvwqvl460qa370gn18yl09dx91h-profile/bin/ dwebp", [" dwebp", "-pam", "/tmp/magick-FacyU5v0_s0CnpxpMzs0"..., "-o", "/tmp/magick-4R_OusxZBx5fjGrfq0KU"...], 0x7ffd7f3538e8 /* 10 vars */) = -1 ENOENT (No such file or directory)
[pid 5] +++ exited with 1 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=5, si_uid=1000, si_status=1, si_utime=0, si_stime=0} ---
convert: unable to open image `t.webp': No such file or directory @ error/blob.c/OpenBlob/2924.
convert: delegate failed `' dwebp' -pam '%i' -o '%o'' @ error/delegate.c/InvokeDelegate/1970.
convert: unable to open file `/tmp/magick-e8GzrEcauG0mZICNZggy_vG77mtn29lu': No such file or directory @ error/constitute.c/ReadImage/615.
convert: no images defined `t.png' @ error/convert.c/ConvertImageCommand/3229.
+++ exited with 1 +++

Ludo’.
L
L
Ludovic Courtès wrote on 27 Apr 2021 09:30
control message for bug #48018
(address . control@debbugs.gnu.org)
87im486v7o.fsf@gnu.org
tags 48018 + easy
quit
S
S
Saku Laesvuori wrote on 20 Jul 2023 20:40
[PATCH core-updates 2/4] gnu: imagemagick: Fix converting webp images
(address . 64751@debbugs.gnu.org)
20230720184039.12104-1-saku@laesvuori.fi

* gnu/packages/imagemagick.scm (imagemagick)[inputs]: Add libwebp.
---
The comments in the code imply that this could be applied to master, but
`guix refresh` claimed it to have over 3 000 dependents. Go figure.

gnu/packages/imagemagick.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm
index 169dc12f35..55e100a71c 100644
--- a/gnu/packages/imagemagick.scm
+++ b/gnu/packages/imagemagick.scm
@@ -158,6 +158,8 @@ (define-public imagemagick
(base32
"0didbs10i9zb4dgripa851j7fivxb9jar7l3vvxz6i4kn6xvdv7r"))
(patches (search-patches "imagemagick-Fix-tests.patch"))))
+ (inputs (cons `("libwebp" ,libwebp)
+ (package-inputs imagemagick/stable)))
(arguments
(append (package-arguments imagemagick/stable)
'(#:tests? #t)))))
--
2.41.0
W
W
Wicki Gabriel (wicg) wrote on 6 Nov 2023 12:07
reviewed, checked and re-based the previous commit
(name . 48018@debbugs.gnu.org)(address . 48018@debbugs.gnu.org)
ZR0P278MB02687DF80935620198226A02C1AAA@ZR0P278MB0268.CHEP278.PROD.OUTLOOK.COM
I've checked the patch above which works like a charm. I've created a new patch. Please credit the original author before merging.
Attachment: file
From 37faa5cac3545406721cfaaf4b2f97841a889510 Mon Sep 17 00:00:00 2001
Message-ID: <37faa5cac3545406721cfaaf4b2f97841a889510.1699268702.git.wicg@zhaw.ch>
From: Gabriel Wicki <gabriel@erlikon.ch>
Date: Mon, 6 Nov 2023 12:01:47 +0100
Subject: [PATCH] gnu: Fix imagemagick webp related failures.

This fixes #48018, as suggested by Saku Laesvuori on the issue tracker.

* gnu/packages/imagemagick.scm (imagemagick/stable)[inputs]: Add libwebp.

Change-Id: I3c02d0fb6c421f7d865b19af359e20068d00b60a
---
gnu/packages/imagemagick.scm | 1 +
1 file changed, 1 insertion(+)

Toggle diff (16 lines)
diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm
index b407af3588..ac366a378b 100644
--- a/gnu/packages/imagemagick.scm
+++ b/gnu/packages/imagemagick.scm
@@ -124,6 +124,7 @@ (define-public imagemagick/stable
("libtiff" ,libtiff)
("libpng" ,libpng)
("libjpeg" ,libjpeg-turbo)
+ ("libwebp" ,libwebp)
("pango" ,pango)
("freetype" ,freetype)
("bzip2" ,bzip2)

base-commit: d52ee267ee8245a6edfcd137c73d20b036ec08d1
--
2.41.0
M
M
Maxim Cournoyer wrote on 3 Jan 23:20 +0100
(name . Wicki Gabriel (wicg))(address . wicg@zhaw.ch)(name . 48018-done@debbugs.gnu.org)(address . 48018@debbugs.gnu.org)
87o7e23vpj.fsf@gmail.com
Hi,

"Wicki Gabriel (wicg)" <wicg@zhaw.ch> writes:

Toggle quote (3 lines)
> I've checked the patch above which works like a charm. I've created a
> new patch. Please credit the original author before merging.

I've applied it on core-updates, as imagemagick causes a large number of
rebuilds.

--
Thanks,
Maxim
S
S
Simon South wrote on 4 Jan 14:13 +0100
Re: bug#48018: ImageMagick’s ‘convert ’ fails to delegate to ‘dwebp’
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
878r55p7h0.fsf_-_@simonsouth.net
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
Toggle quote (3 lines)
> I've applied it on core-updates, as imagemagick causes a large number
> of rebuilds.

Unfortunately a small bug crept in with commit 62d1806f42: ",name" needs
to be changed to "$name" or building ImageMagick fails with

unquote: expression not valid outside of quasiquote in form (unquote name)

--
Simon South
simon@simonsouth.net
M
M
Maxim Cournoyer wrote on 4 Jan 18:51 +0100
(name . Simon South)(address . simon@simonsouth.net)
874jft2dho.fsf@gmail.com
Hi,

Simon South <simon@simonsouth.net> writes:

Toggle quote (9 lines)
> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>> I've applied it on core-updates, as imagemagick causes a large number
>> of rebuilds.
>
> Unfortunately a small bug crept in with commit 62d1806f42: ",name" needs
> to be changed to "$name" or building ImageMagick fails with
>
> unquote: expression not valid outside of quasiquote in form (unquote name)

Thanks for the heads-up. That's now fixed. Apologies for sloppy QA
:-).

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 22 Jan 00:06 +0100
control message for bug #48018
(address . control@debbugs.gnu.org)
87o7de70d6.fsf@gmail.com
close 48018
quit
?
Your comment

This issue is archived.

To comment on this conversation send an email to 48018@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 48018
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch