Hi, On Wed, 2022-12-21 at 15:42 +0100, Mark Wielaard wrote: > > Unfortunately buildbot itself doesn't show the config.log. > Trying to get that... > > configure:6961: checking for library containing ZSTD_compressStream2 > configure:6992: gcc -o conftest -D_FORTIFY_SOURCE=3 -g -O2 > -fsanitize=undefined > -fno-sanitize-recover -fsanitize=address -fno-sanitize- > recover conftest.c -llz > ma -lbz2 >&5 > /usr/bin/ld: /tmp/ccKZnuYA.o: in function `main': > /var/lib/buildbot/workers/wildebeest/elfutils-try-debian- > armhf/build/conftest.c: > 30: undefined reference to `ZSTD_compressStream2' > collect2: error: ld returned 1 exit status > configure:6992: $? = 1 > configure: failed program was: > > /* confdefs.h */ > > #define PACKAGE_NAME "elfutils" > > #define PACKAGE_TARNAME "elfutils" > > #define PACKAGE_VERSION "0.188" > > #define PACKAGE_STRING "elfutils 0.188" > > #define PACKAGE_BUGREPORT "https://sourceware.org/bugzilla" > > #define PACKAGE_URL "http://elfutils.org/" > > #define PACKAGE "elfutils" > > #define VERSION "0.188" > > #define DEFAULT_AR_DETERMINISTIC false > > #define HAVE_VISIBILITY 1 > > #define HAVE_STDATOMIC_H 1 > > #define _FILE_OFFSET_BITS 64 > > #define CHECK_UNDEFINED 1 > > #define USE_ZLIB 1 > > #define USE_BZLIB 1 > > #define USE_LZMA 1 > > /* end confdefs.h. */ > > > > /* Override any GCC internal prototype to avoid an error. > > Use char because int might match the return type of a GCC > > builtin and then its argument prototype would still apply. */ > > #ifdef __cplusplus > > extern "C" > > #endif > > char ZSTD_compressStream2 (); > > int > > main () > > { > > return ZSTD_compressStream2 (); > > ; > > return 0; > > } > > configure:6992: gcc -o conftest -D_FORTIFY_SOURCE=3 -g -O2 > -fsanitize=undefined > -fno-sanitize-recover -fsanitize=address -fno-sanitize- > recover conftest.c -lzs > td -llzma -lbz2 >&5 > configure:6992: $? = 0 > configure:7009: result: -lzstd > > ehe? So it fails and then succeeds anyway? > > Strangely the same happens for the other compression library > checks... > lzma_auto_decoder and BZ2_bzdopen > > I don't fully understand this. Oddly the same seems to happen locally > on my x86_64 box. So maybe the configure macros we have been using > have > always been bad/broken?
No, this is "normal". It first tries without the -l library (which is the failing case) and then with the -l library (which succeeds). What goes wrong is that this debian old stable arm setup has libzstd containing a ZSTD_compressStream2 symbol... 40: 0000d349 264 FUNC GLOBAL DEFAULT 11 ZSTD_compressStream2 But the zstd.h header doesn't expose it... /******************************************************************************* ********* * ADVANCED AND EXPERIMENTAL FUNCTIONS ******************************************************************************* ********* * The definitions in the following section are considered experimental. * They are provided for advanced scenarios. * They should never be used with a dynamic library, as prototypes may change in the future. * Use them only in association with static linking. * ***************************************************************************** **********/ #if defined(ZSTD_STATIC_LINKING_ONLY) && !defined(ZSTD_H_ZSTD_STATIC_LINKING_ONLY) ... grmbl. This is somewhat unfortunate. We need a smarter configure check for this... Cheers, Mark