Build broken with old zstd
Christophe Lyon
christophe.lyon@arm.com
Thu Nov 3 18:10:23 GMT 2022
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
More information about the Binutils
mailing list