Dear mentors,
I'd appreciate some help with a problem I don't understand.
Bug #1000146 against cppcheck 2.6-1 (in testing and unstable) is about the fact
that /usr/bin/cppcheck seems to require "libc6 >= 2.32" while the Depends: line
in the binary package cppcheck contains "libc6 (>= 2.29)".
Of course I can specify that version requirement manually in the source package,
but shouldn't "Depends: ${shlibs:Depends}, ${misc:Depends} [...]" take care of that?
1. Just running cppcheck with libc6 2.32 (from testing/unstable) works:
$ cppcheck
Cppcheck - A tool for static C/C++ code analysis
[...]
2. Using libc.so.6 from libc6 2.31-13+deb11u2 (from stable) results in
$ LD_PRELOAD=./libc.so.6 cppcheck
cppcheck: ./libc.so.6: version `GLIBC_2.32' not found (required by cppcheck)
cppcheck: ./libc.so.6: version `GLIBC_2.32' not found (required by
/usr/lib/x86_64-linux-gnu/libstdc++.so.6)
cppcheck: ./libc.so.6: version `GLIBC_2.32' not found (required by
/lib/x86_64-linux-gnu/libpthread.so.0)
3. Inspecting the cppcheck binary gives
$ readelf -a /usr/bin/cppcheck | grep "2\.32"
0000004670e0 041e00000005 R_X86_64_COPY 00000000004670e0
__libc_single_threaded@GLIBC_2.32 + 0
1054: 00000000004670e0 1 OBJECT GLOBAL DEFAULT 26 [...]@GLIBC_2.32
(20)
41c: 1 (*global*) 1 (*global*) 14 (GLIBC_2.32) 1 (*global*)
0x0070: Name: GLIBC_2.32 Flags: none Version: 20
Do I interpret that correctly that cppcheck itself requires libc6 >= 2.32 (and
not just one of its dependencies)? Why doesn't that requirement make it into the
Depends: of the binary package?
The problem can be reproduced by building cppcheck 2.6-1 in an unstable chroot.
So it is not just some transient glitch when the package was build for the
archive ~4 weeks ago. Build log for amd64 is at
https://buildd.debian.org/status/fetch.php?pkg=cppcheck&arch=amd64&ver=2.6-1&stamp=1634837839&raw=0
Best regards,
Joachim