From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: utomei@tiscali.it, 61988@debbugs.gnu.org
Subject: bug#61988: error compiling emacs
Date: Tue, 07 Mar 2023 13:03:55 +0800 [thread overview]
Message-ID: <87o7p5p2ys.fsf@yahoo.com> (raw)
In-Reply-To: <83fsah6xk0.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 07 Mar 2023 05:38:07 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Po Lu <luangruo@yahoo.com>
>> Cc: utomei@tiscali.it, 61988@debbugs.gnu.org
>> Date: Tue, 07 Mar 2023 08:34:18 +0800
>>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>> > I'd like to know why requiring libwebpdecoder is essential for the
>> > build to work on the OP's system. It isn't on mine, and if you look
>> > at init_webp_functions, you will see that on Windows we load functions
>> > only from libwebp and libwebpdemux. Why is the third library needed?
>>
>> It is here, because Emacs needs the function ``WebPGetInfo'', and on
>> GNU/Linux systems that function is in libwebpdecoder.so:
>
> Then the unconditional test for libwebpdecoder being installed is not
> TRT. We should instead do that only if that library is required, for
> example by trying to link a program that calls WebPGetInfo without
> libwebpdecoder first.
>
>> and here, I have a pkg-config file named libwebpdecoder.pc
>
> I see that file in the source directory, but it is not installed by
> "make install", and neither is libwebpdecoder library itself.
> Evidently, the way I configured and built libwebp doesn't require that
> library to be installed. And once again, in my case the offending
> function is in libwebpdemux, not in libwebpdecoder.
>
> So the test needs to be rewritten to be safe and correct.
>
>> GNU ld does not allow you to link to symbols in dependencies of shared
>> libraries, so asking for libwebpdemux while using symbols in
>> libwebpdecoder does not work.
>
> I know, and that's not what I suggested. It looks like at least on
> some systems (or maybe with some versions of libwebp) the
> libwebpdecoder library is not installed and not needed. We must
> support such installations; we did until now.
OK, would both you and utomei@tiscali.it please try this?
diff --git a/configure.ac b/configure.ac
index bc7e61048c3..1477e04b7d8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2806,6 +2806,22 @@ AC_DEFUN
WEBP_MODULE="libwebpdemux >= $WEBP_REQUIRED"
EMACS_CHECK_MODULES([WEBP], [$WEBP_MODULE])
+
+ # WebPGetInfo is sometimes not present inside libwebpdemux, so
+ # if it does not link, also check for libwebpdecoder.
+
+ OLD_CFLAGS=$CFLAGS
+ OLD_LIBS=$LIBS
+ CFLAGS="$CFLAGS $WEBP_CFLAGS"
+ LIBS="$LIBS $WEBP_LIBS"
+
+ AC_CHECK_FUNC([WebPGetInfo], [],
+ [WEBP_MODULE="$WEBP_MODULE libwebpdecoder >= $WEBP_REQUIRED"
+ EMACS_CHECK_MODULES([WEBP], [$WEBP_MODULE])])
+
+ CFLAGS=$OLD_CFLAGS
+ LIBS=$OLD_LIBS
+
AC_SUBST([WEBP_CFLAGS])
AC_SUBST([WEBP_LIBS])
fi
next prev parent reply other threads:[~2023-03-07 5:03 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-05 11:23 bug#61988: error compiling emacs Ugo Tomei
2023-03-05 19:41 ` Eli Zaretskii
2023-03-06 9:10 ` Ugo Tomei
2023-03-06 0:20 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-06 9:38 ` Ugo Tomei
2023-03-06 10:35 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-06 12:08 ` Eli Zaretskii
2023-03-06 13:43 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-06 15:38 ` Eli Zaretskii
2023-03-07 0:34 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-07 3:38 ` Eli Zaretskii
2023-03-07 5:03 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-03-07 13:00 ` Eli Zaretskii
2023-03-07 13:36 ` bug#61988: R: " Ugo Tomei
2023-03-07 14:11 ` Eli Zaretskii
2023-03-07 14:34 ` bug#61988: R: " Ugo Tomei
2023-03-07 15:27 ` Eli Zaretskii
2023-03-07 16:21 ` Eli Zaretskii
2023-03-07 16:44 ` bug#61988: R: " Ugo Tomei
2023-03-07 16:59 ` Eli Zaretskii
2023-03-08 0:09 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-08 8:32 ` Ugo Tomei
2023-03-08 9:02 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-08 9:44 ` Ugo Tomei
2023-03-08 10:42 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-08 12:26 ` Ugo Tomei
2023-03-08 12:55 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-08 14:24 ` Eli Zaretskii
2023-09-06 0:01 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o7p5p2ys.fsf@yahoo.com \
--to=bug-gnu-emacs@gnu.org \
--cc=61988@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=luangruo@yahoo.com \
--cc=utomei@tiscali.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).