GNU bug report logs -
#57420
29.0.50; Failure configuring Emacs with animated WebP support
Previous Next
Reported by: Daniel Martín <mardani29 <at> yahoo.es>
Date: Thu, 25 Aug 2022 22:01:02 UTC
Severity: normal
Found in version 29.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
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 57420 in the body.
You can then email your comments to 57420 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57420
; Package
emacs
.
(Thu, 25 Aug 2022 22:01:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Daniel Martín <mardani29 <at> yahoo.es>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 25 Aug 2022 22:01:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I have a computer that cannot build Emacs since the animated WebP
support was added.
Details of the system:
aarch64-apple-darwin21.1.0, NS appkit-2113.00 Version 12.0.1 (Build
21A559)
Windowing system distributor 'Apple', version 10.3.2113
System Description: macOS 12.4
Library WebP is installed via the Homebrew package manager.
$ pkg-config --libs libwebp
-L/opt/homebrew/Cellar/webp/1.2.2/lib -lwebp
Steps to reproduce the problem:
make -j
[...]
checking for libwebp >= 0.6.0... yes
[...]
ld: library not found for -lwebp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
One workaround I've been using to build Emacs is to configure it
--with-webp=no
I think this is a bug that was introduced when animated WebP support was
added. From commit d82e1a873df381b2c35bc9036da5665468bdfd31:
diff --git a/configure.ac b/configure.ac
index 6b834a2f65..185e4d0862 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2695,6 +2695,9 @@ AC_DEFUN
WEBP_MODULE="libwebp >= $WEBP_REQUIRED"
EMACS_CHECK_MODULES([WEBP], [$WEBP_MODULE])
+ if test "$HAVE_WEBP" = "yes"; then
+ WEBP_LIBS="-lwebp -lwebpdemux"
+ fi
AC_SUBST(WEBP_CFLAGS)
AC_SUBST(WEBP_LIBS)
fi
The problem I see with this part of the patch is that, after you call
EMACS_CHECK_MODULES, the variable WEBP_LIBS is correctly set to
"-L/opt/homebrew/Cellar/webp/1.2.2/lib -lwebp" via pkg-config. However,
it is overriden to contain "-lwebp -lwebpdemux", so the library path got
removed.
If WebP animated support requires -lwebpdemux, I think we could require
the libwebpdemux module instead (part of the libwebp package), whose
linker flags include "-lwebp -lwebpdemux". The following patch fixes
the compilation for me:
diff --git a/configure.ac b/configure.ac
index 6ca3052ea3..4590ed3506 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2773,12 +2773,9 @@ AC_DEFUN
|| test "${HAVE_W32}" = "yes" || test "${HAVE_NS}" = "yes" \
|| test "${HAVE_BE_APP}" = "yes" || test "${HAVE_PGTK}" = "yes"; then
WEBP_REQUIRED=0.6.0
- WEBP_MODULE="libwebp >= $WEBP_REQUIRED"
+ WEBP_MODULE="libwebpdemux >= $WEBP_REQUIRED"
EMACS_CHECK_MODULES([WEBP], [$WEBP_MODULE])
- if test "$HAVE_WEBP" = "yes"; then
- WEBP_LIBS="-lwebp -lwebpdemux"
- fi
AC_SUBST([WEBP_CFLAGS])
AC_SUBST([WEBP_LIBS])
fi
I checked that the built Emacs has WebP support.
What do you think? I'd need an build system expert to verify that this
is TRT in GNU/Linux, Windows, or when pkg-config is not available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57420
; Package
emacs
.
(Thu, 25 Aug 2022 22:51:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 57420 <at> debbugs.gnu.org (full text, mbox):
Daniel Martín via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs <at> gnu.org> writes:
> I checked that the built Emacs has WebP support.
>
> What do you think? I'd need an build system expert to verify that this
> is TRT in GNU/Linux, Windows, or when pkg-config is not available.
FWIW, I tried building with that patch here (Debian GNU/Linux) and the
build doesn't have webp support.
(image-type-available-p 'webp)
=> nil
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57420
; Package
emacs
.
(Thu, 25 Aug 2022 23:13:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 57420 <at> debbugs.gnu.org (full text, mbox):
Stefan Kangas <stefankangas <at> gmail.com> writes:
> Daniel Martín via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <bug-gnu-emacs <at> gnu.org> writes:
>
>> I checked that the built Emacs has WebP support.
>>
>> What do you think? I'd need an build system expert to verify that this
>> is TRT in GNU/Linux, Windows, or when pkg-config is not available.
>
> FWIW, I tried building with that patch here (Debian GNU/Linux) and the
> build doesn't have webp support.
>
> (image-type-available-p 'webp)
> => nil
Interesting. Does this alternative patch work better?
diff --git a/configure.ac b/configure.ac
index 6ca3052ea3..afe71dbfa6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2777,7 +2777,7 @@ AC_DEFUN
EMACS_CHECK_MODULES([WEBP], [$WEBP_MODULE])
if test "$HAVE_WEBP" = "yes"; then
- WEBP_LIBS="-lwebp -lwebpdemux"
+ WEBP_LIBS="$WEBP_LIBS -lwebpdemux"
fi
AC_SUBST([WEBP_CFLAGS])
AC_SUBST([WEBP_LIBS])
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57420
; Package
emacs
.
(Fri, 26 Aug 2022 05:44:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 57420 <at> debbugs.gnu.org (full text, mbox):
> Date: Thu, 25 Aug 2022 23:59:40 +0200
> From: Daniel Martín via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> If WebP animated support requires -lwebpdemux, I think we could require
> the libwebpdemux module instead (part of the libwebp package), whose
> linker flags include "-lwebp -lwebpdemux". The following patch fixes
> the compilation for me:
>
> diff --git a/configure.ac b/configure.ac
> index 6ca3052ea3..4590ed3506 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2773,12 +2773,9 @@ AC_DEFUN
> || test "${HAVE_W32}" = "yes" || test "${HAVE_NS}" = "yes" \
> || test "${HAVE_BE_APP}" = "yes" || test "${HAVE_PGTK}" = "yes"; then
> WEBP_REQUIRED=0.6.0
> - WEBP_MODULE="libwebp >= $WEBP_REQUIRED"
> + WEBP_MODULE="libwebpdemux >= $WEBP_REQUIRED"
>
> EMACS_CHECK_MODULES([WEBP], [$WEBP_MODULE])
> - if test "$HAVE_WEBP" = "yes"; then
> - WEBP_LIBS="-lwebp -lwebpdemux"
> - fi
> AC_SUBST([WEBP_CFLAGS])
> AC_SUBST([WEBP_LIBS])
> fi
>
> I checked that the built Emacs has WebP support.
>
> What do you think?
LGTM, thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57420
; Package
emacs
.
(Fri, 26 Aug 2022 05:52:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 57420 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Thu, 25 Aug 2022 22:50:24 +0000
>
> Daniel Martín via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <bug-gnu-emacs <at> gnu.org> writes:
>
> > I checked that the built Emacs has WebP support.
> >
> > What do you think? I'd need an build system expert to verify that this
> > is TRT in GNU/Linux, Windows, or when pkg-config is not available.
>
> FWIW, I tried building with that patch here (Debian GNU/Linux) and the
> build doesn't have webp support.
>
> (image-type-available-p 'webp)
> => nil
Details, please. Did the configure script decide that WebP is not
available? If so, please show the relevant portion of config.log.
Also, what does the shell command below produce?
$ pkg-config --libs "libwebpdemux >= 0.6.0"
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57420
; Package
emacs
.
(Fri, 26 Aug 2022 11:09:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 57420 <at> debbugs.gnu.org (full text, mbox):
Stefan Kangas <stefankangas <at> gmail.com> writes:
> FWIW, I tried building with that patch here (Debian GNU/Linux) and the
> build doesn't have webp support.
>
> (image-type-available-p 'webp)
> => nil
I tried the same on the current Ubuntu, and that call returns t in the
resulting Emacs.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57420
; Package
emacs
.
(Fri, 26 Aug 2022 20:41:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 57420 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> Details, please. Did the configure script decide that WebP is not
> available? If so, please show the relevant portion of config.log.
> Also, what does the shell command below produce?
>
> $ pkg-config --libs "libwebpdemux >= 0.6.0"
False alarm: It turns out that I was by mistake running the Emacs
executable from the release branch. I've rebuilt with Daniel's original
patch again, and it works as expected.
Sorry for the noise.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57420
; Package
emacs
.
(Sat, 27 Aug 2022 06:38:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 57420 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Fri, 26 Aug 2022 20:40:39 +0000
> Cc: mardani29 <at> yahoo.es, 57420 <at> debbugs.gnu.org
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > Details, please. Did the configure script decide that WebP is not
> > available? If so, please show the relevant portion of config.log.
> > Also, what does the shell command below produce?
> >
> > $ pkg-config --libs "libwebpdemux >= 0.6.0"
>
> False alarm: It turns out that I was by mistake running the Emacs
> executable from the release branch. I've rebuilt with Daniel's original
> patch again, and it works as expected.
Thanks. So I think the original patch by Daniel should be installed.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57420
; Package
emacs
.
(Sat, 27 Aug 2022 13:29:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 57420 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> Thanks. So I think the original patch by Daniel should be installed.
Yup; pushing the fix now.
bug marked as fixed in version 29.1, send any further explanations to
57420 <at> debbugs.gnu.org and Daniel Martín <mardani29 <at> yahoo.es>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 27 Aug 2022 13:30:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 25 Sep 2022 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 328 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.