]> git.ipfire.org Git - thirdparty/shadow.git/commit
Link correctly with libdl
authorSam James <sam@gentoo.org>
Sun, 21 Jan 2024 14:58:33 +0000 (14:58 +0000)
committerAlejandro Colomar <alx@kernel.org>
Fri, 26 Jan 2024 12:32:08 +0000 (13:32 +0100)
commit7540b0519728e5ca342abfefa4aff46b4b9c0c48
tree650bb863c8e80cf4df41245f550d4f1d8b22fa00
parenteae0b027962c6a6013ff693eeb6db86d81c6f4f6
Link correctly with libdl

This fixes build with glibc-2.33 (newer glibc merged libdl and libpthread
into libc):
```
libtool: link: x86_64-pc-linux-gnu-gcc -isystem /usr/include/bsd -DLIBBSD_OVERLAY -O2 -pipe -Wl,-O1 -o login login.o login_nopam.o  -Wl,--as-needed ../lib/.libs/libshadow.a -lcrypt -lsystemd -lpam -lpam_misc -lbsd
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: ../lib/.libs/libshadow.a(libshadow_la-nss.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /lib64/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
```

In Debian, the needed macro from libtool seems to be in libltdl-dev.

Signed-off-by: Sam James <sam@gentoo.org>
Cc: Iker Pedrosa <ikerpedrosam@gmail.com>
Cherry-picked-from: 0f4e59fd00cf ("Link correctly with libdl")
Link: <https://github.com/shadow-maint/shadow/pull/917>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
configure.ac
lib/Makefile.am
share/containers/debian.dockerfile