* Build broken with old zstd
@ 2022-11-03 18:10 Christophe Lyon
2022-11-03 19:22 ` Mark Wielaard
0 siblings, 1 reply; 2+ messages in thread
From: Christophe Lyon @ 2022-11-03 18:10 UTC (permalink / raw)
To: Mark Wielaard, binutils
Hi!
I have noticed that the debian-armhf buildbot on Sourceware
(https://builder.sourceware.org/buildbot/#/builders?tags=binutils)
has been failing to build binutils for quite a long time, with:
../../binutils-gdb/gas/compress-debug.c: In function ‘compress_data’:
../../binutils-gdb/gas/compress-debug.c:62:20: error: implicit
declaration of function ‘ZSTD_compressStream2’; did you mean
‘ZSTD_compressStream’? [-Werror=implicit-function-declaration]
size_t ret = ZSTD_compressStream2 (ctx, &ob, &ib, ZSTD_e_continue);
^~~~~~~~~~~~~~~~~~~~
ZSTD_compressStream
I took me a bit of time to reproduce it, because the build succeeded
with debian stable, I had to switch to oldstable to see the failure
(IIUC that's the version used by the buildbot)
My understanding is that the version of zstd shipped with debian
oldstable is too old for binutils (it does not provide
ZSTD_compressStream2).
I did not see the problem in my ubuntu containers because I do not
install libzstd-dev there, and configure disables the use of zstd.
I am surprised no one has noticed this before, but I see several other
Sourceware binutils builbots are failing on other targets, maybe for the
same reason.
It looks like the right fix is to improve the detection of zstd at
configure time (IIUC we only check if it's present, not its version).
Should I file a PR for someone to look at this?
Thanks,
Christophe
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Build broken with old zstd
2022-11-03 18:10 Build broken with old zstd Christophe Lyon
@ 2022-11-03 19:22 ` Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2022-11-03 19:22 UTC (permalink / raw)
To: Christophe Lyon; +Cc: binutils
Hi Christophe,
On Thu, Nov 03, 2022 at 07:10:23PM +0100, Christophe Lyon wrote:
> I have noticed that the debian-armhf buildbot on Sourceware
> (https://builder.sourceware.org/buildbot/#/builders?tags=binutils)
> has been failing to build binutils for quite a long time, with:
> ../../binutils-gdb/gas/compress-debug.c: In function ‘compress_data’:
> ../../binutils-gdb/gas/compress-debug.c:62:20: error: implicit declaration
> of function ‘ZSTD_compressStream2’; did you mean ‘ZSTD_compressStream’?
> [-Werror=implicit-function-declaration]
> size_t ret = ZSTD_compressStream2 (ctx, &ob, &ib, ZSTD_e_continue);
> ^~~~~~~~~~~~~~~~~~~~
> ZSTD_compressStream
>
>
> I took me a bit of time to reproduce it, because the build succeeded with
> debian stable, I had to switch to oldstable to see the failure (IIUC that's
> the version used by the buildbot)
>
> My understanding is that the version of zstd shipped with debian oldstable
> is too old for binutils (it does not provide ZSTD_compressStream2).
> I did not see the problem in my ubuntu containers because I do not install
> libzstd-dev there, and configure disables the use of zstd.
>
> I am surprised no one has noticed this before, but I see several other
> Sourceware binutils builbots are failing on other targets, maybe for the
> same reason.
>
> It looks like the right fix is to improve the detection of zstd at configure
> time (IIUC we only check if it's present, not its version).
ZSTD_compressStream2 is only available with libzstd >= 1.4.0 (and
debian oldstable only has 1.3.8, so the check should be:
diff --git a/config/zstd.m4 b/config/zstd.m4
index 6da4db68c58..eb34c0f36d7 100644
--- a/config/zstd.m4
+++ b/config/zstd.m4
@@ -12,7 +12,7 @@ AC_ARG_WITH(zstd,
[], [with_zstd=auto])
AS_IF([test "$with_zstd" != no],
- [PKG_CHECK_MODULES(ZSTD, [libzstd], [
+ [PKG_CHECK_MODULES(ZSTD, [libzstd >= 1.4.0], [
AC_DEFINE(HAVE_ZSTD, 1, [Define to 1 if zstd is enabled.])
], [
if test "$with_zstd" = yes; then
But you also need to regenerate all configure files with the correct
autoconf version.
Cheers,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-03 19:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-03 18:10 Build broken with old zstd Christophe Lyon
2022-11-03 19:22 ` Mark Wielaard
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).