Control: reassign -1 libdnssec6
Control: retitle -1 libdnssec6: Does not link against pthread but uses its
symbols
Hi!
On Fri, 2018-11-30 at 12:03:30 -0500, Daniel Kahn Gillmor wrote:
> Package: dpkg-dev
> Version: 1.19.2
> Severity: normal
> Control: affects -1 libdnssec6
> libdnssec.so.6.0.0 links against pthread, and uses pthread_once.
> Here's a shell transcript which describes the problem:
>
> 0 dkg@alice:~/src/pkg-dns/knot-dns$ dpkg-shlibdeps
> /usr/lib/x86_64-linux-gnu/libdnssec.so.6.0.0
> dpkg-shlibdeps: warning: binaries to analyze should already be installed in
> their package's directory
> dpkg-shlibdeps: warning: symbol pthread_once used by
> /usr/lib/x86_64-linux-gnu/libdnssec.so.6.0.0 found in none of the libraries
> dpkg-shlibdeps: warning: package could avoid a useless dependency if
> /usr/lib/x86_64-linux-gnu/libdnssec.so.6.0.0 was not linked against libm.so.6
> (it uses none of the library's symbols)
> 0 dkg@alice:~/src/pkg-dns/knot-dns$ awk '($1 ~ /\.so/) { lib=$1 } /^
> pthread_once@/{print lib ":" $0 }' /var/lib/dpkg/info/*.symbols
> libpthread.so.0: pthread_once@GLIBC_2.2.5 2.2.5
> libpthread.so.0: pthread_once@GLIBC_2.0 2.0
> libpthread.so.0: pthread_once@GLIBC_2.16 2.16
> libtsan.so.0: pthread_once@Base 4.9
> 0 dkg@alice:~/src/pkg-dns/knot-dns$ ldd
> /usr/lib/x86_64-linux-gnu/libdnssec.so.6.0.0 | grep pthread
> libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
> (0x00007f98bd112000)
> 0 dkg@alice:~/src/pkg-dns/knot-dns$
But it does not really link against libpthread :), it does so only
transitively. ldd is not a very good tool to query this, as it list
all transitive dependencies, use objdump or readelf instead:
$ readelf -d /usr/lib/x86_64-linux-gnu/libdnssec.so.6.0.0 | grep NEEDED
0x0000000000000001 (NEEDED) Shared library: [libgnutls.so.30]
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
or
$ objdump -p /usr/lib/x86_64-linux-gnu/libdnssec.so.6.0.0 | grep NEEDED
NEEDED libgnutls.so.30
NEEDED libm.so.6
NEEDED libc.so.6
So you'd need to check why the library is not linking against pthread,
because of any of the others stop doing so, this one will fail to
link.
Thanks,
Guillem