GDB 15.1: libbacktrace/configure.ac and zstd

Paul Smith psmith@gnu.org
Thu Sep 12 18:21:11 GMT 2024


The libbacktrace/configure.ac file doesn't use pkg-config when checking
for zstd support, and it doesn't inherit the --with-zstd options from
the parent configure, which means it fails unless a simple "-lzstd"
works without any other configuration:

  configure:10978: checking for ZSTD_compress in -lzstd
  configure:11003: x86_64-rl84-linux-gnu-gcc -o conftest -O2 -fPIC -static-libgcc conftest.c -lzstd   >&5
  .../x86_64-unknown-linux-gnu/bin/ld: error: cannot find -lzstd
  /tmp/ccJ5zLA2.o:conftest.c:function main:(.text.startup+0x8): error: undefined reference to 'ZSTD_compress'
  collect2: error: ld returned 1 exit status

In my case, libzstd is in a non-standard location.  pkg-config tells me
I need these linking arguments:

  -L/data/src/zstd/Linux-Release-make/dist/lib -lzstd -pthread


More information about the Gdb mailing list