• cppcheck: Incorrect minimum version requirement for Depends: on libc

    From Joachim Reichel@21:1/5 to All on Fri Nov 19 18:40:02 2021
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joachim Reichel@21:1/5 to Joachim Reichel on Tue Nov 23 20:40:02 2021
    Hi,

    On 19.11.21 18:35, Joachim Reichel wrote:
    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)".

    I debugged this a bit further and found that dpkg-shlibdeps does not take certain symbols into account. Details are in bug #1000421.

    Best regards,
    Joachim

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicholas D Steeves@21:1/5 to Joachim Reichel on Wed Nov 24 04:10:01 2021
    Hi Joachim,

    Joachim Reichel <joachim.reichel@posteo.de> writes:

    Hi,

    On 19.11.21 18:35, Joachim Reichel wrote:
    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)".

    I debugged this a bit further and found that dpkg-shlibdeps does not take certain symbols into account. Details are in bug #1000421.


    Nice find!

    Cheers,
    Nicholas

    --=-=-Content-Type: application/pgp-signature; name="signature.asc"

    -----BEGIN PGP SIGNATURE-----

    iQJEBAEBCgAuFiEE4qYmHjkArtfNxmcIWogwR199EGEFAmGdqp8QHHN0ZW5AZGVi aWFuLm9yZwAKCRBaiDBHX30QYTxAD/9CWwV/IHPnRAx0qiFDCpRduDLhrSuua8UP 9Lu0Y2TpV+BUs5LnymkoetDmL5189zPXkFPlMLwqmblBc8VnAHfEZ/TJ7hnwVUin u2nu28oSBKOUuCQQm3M1kV+DGREpL9JexCv6SMVvNqY6nK3Lg4QD0Z4xzgufD6S2 wvqoVuGGhbkII3cNYpcOIxnceg1yV0bPXIRhmfC/uhTeQHvQ6xZ/FPYo2TuvJtge o9KUYunkMAPbc/hzoSKLDyahKrwqRMMOpPqSIeVn6oXLKW9BJG8cO3CMmMjB6hVp /B47WNpL4bzfAkSOTGOcxY0PswfEyG87Ao4SXwUqMuYoiSwT/SCk7I7sn4kiFs7w X5hcq021moRQ5VIRBsPQhYz/onFjxdWXbQ8fmnhRPPFhCOOO4tJP3K9eW7GtOHl4 /sWeZxzZEcTsmjNH0ygzL4ezvN5XjpPdwH9kZ/hzyy5iqE/an0RhEgeKILBqDJMQ J1n1DvMofXX4HxXfoL5L6xtl3on2z14/sqlSmxJzKILL1cuMG5iuTk0MlaHcQftO aEUGYwfAKSnvLGei9Q9gcYt0tHAr9kvdDLwA5La5oDxjPUqemfIdgwjK0bjK4DKN W83lCsp/iukHscrKY0itNC7dqcnHIa2r3H+ASqcPst/dhQq2EBwmUiLTTHZUHe4i Fw8af1QvWw==vVwZ
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)