* bug#57420: 29.0.50; Failure configuring Emacs with animated WebP support
[not found] <m1fshkc7cj.fsf.ref@yahoo.es>
@ 2022-08-25 21:59 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-25 22:50 ` Stefan Kangas
2022-08-26 5:43 ` Eli Zaretskii
0 siblings, 2 replies; 9+ messages in thread
From: Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-25 21:59 UTC (permalink / raw)
To: 57420
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.
^ permalink raw reply related [flat|nested] 9+ messages in thread
* bug#57420: 29.0.50; Failure configuring Emacs with animated WebP support
2022-08-25 21:59 ` bug#57420: 29.0.50; Failure configuring Emacs with animated WebP support Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-25 22:50 ` Stefan Kangas
2022-08-25 23:12 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
` (2 more replies)
2022-08-26 5:43 ` Eli Zaretskii
1 sibling, 3 replies; 9+ messages in thread
From: Stefan Kangas @ 2022-08-25 22:50 UTC (permalink / raw)
To: Daniel Martín, 57420
Daniel Martín via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@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
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#57420: 29.0.50; Failure configuring Emacs with animated WebP support
2022-08-25 22:50 ` Stefan Kangas
@ 2022-08-25 23:12 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-26 5:51 ` Eli Zaretskii
2022-08-26 11:08 ` Lars Ingebrigtsen
2 siblings, 0 replies; 9+ messages in thread
From: Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-25 23:12 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 57420
Stefan Kangas <stefankangas@gmail.com> writes:
> Daniel Martín via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <bug-gnu-emacs@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])
^ permalink raw reply related [flat|nested] 9+ messages in thread
* bug#57420: 29.0.50; Failure configuring Emacs with animated WebP support
2022-08-25 21:59 ` bug#57420: 29.0.50; Failure configuring Emacs with animated WebP support Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-25 22:50 ` Stefan Kangas
@ 2022-08-26 5:43 ` Eli Zaretskii
1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2022-08-26 5:43 UTC (permalink / raw)
To: Daniel Martín; +Cc: 57420
> 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@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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#57420: 29.0.50; Failure configuring Emacs with animated WebP support
2022-08-25 22:50 ` Stefan Kangas
2022-08-25 23:12 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-26 5:51 ` Eli Zaretskii
2022-08-26 20:40 ` Stefan Kangas
2022-08-26 11:08 ` Lars Ingebrigtsen
2 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2022-08-26 5:51 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 57420, mardani29
> From: Stefan Kangas <stefankangas@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@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"
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#57420: 29.0.50; Failure configuring Emacs with animated WebP support
2022-08-25 22:50 ` Stefan Kangas
2022-08-25 23:12 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-26 5:51 ` Eli Zaretskii
@ 2022-08-26 11:08 ` Lars Ingebrigtsen
2 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2022-08-26 11:08 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 57420, Daniel Martín
Stefan Kangas <stefankangas@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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#57420: 29.0.50; Failure configuring Emacs with animated WebP support
2022-08-26 5:51 ` Eli Zaretskii
@ 2022-08-26 20:40 ` Stefan Kangas
2022-08-27 6:37 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Kangas @ 2022-08-26 20:40 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 57420, mardani29
Eli Zaretskii <eliz@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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#57420: 29.0.50; Failure configuring Emacs with animated WebP support
2022-08-26 20:40 ` Stefan Kangas
@ 2022-08-27 6:37 ` Eli Zaretskii
2022-08-27 13:28 ` Lars Ingebrigtsen
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2022-08-27 6:37 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 57420, mardani29
> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Fri, 26 Aug 2022 20:40:39 +0000
> Cc: mardani29@yahoo.es, 57420@debbugs.gnu.org
>
> Eli Zaretskii <eliz@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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#57420: 29.0.50; Failure configuring Emacs with animated WebP support
2022-08-27 6:37 ` Eli Zaretskii
@ 2022-08-27 13:28 ` Lars Ingebrigtsen
0 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2022-08-27 13:28 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: mardani29, Stefan Kangas, 57420
Eli Zaretskii <eliz@gnu.org> writes:
> Thanks. So I think the original patch by Daniel should be installed.
Yup; pushing the fix now.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-08-27 13:28 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <m1fshkc7cj.fsf.ref@yahoo.es>
2022-08-25 21:59 ` bug#57420: 29.0.50; Failure configuring Emacs with animated WebP support Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-25 22:50 ` Stefan Kangas
2022-08-25 23:12 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-26 5:51 ` Eli Zaretskii
2022-08-26 20:40 ` Stefan Kangas
2022-08-27 6:37 ` Eli Zaretskii
2022-08-27 13:28 ` Lars Ingebrigtsen
2022-08-26 11:08 ` Lars Ingebrigtsen
2022-08-26 5:43 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.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.