Package: debhelper Version: 12.2.3 Severity: normal -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hi, After setting "debhelper-compat (= 12)" on golang-golang-x-tools, I encountered the following error which aborted the package build: dwz: Too few files for multifile optimization objcopy: 'debian/golang-golang-x-tools/usr/lib/debug/.dwz/x86_64-linux-gnu/golang-golang-x-tools.debug': No such file dh_dwz: objcopy --compress-debug-sections debian/golang-golang-x-tools/usr/lib/debug/.dwz/x86_64-linux-gnu/golang-golang-x-tools.debug returned exit code 1 Perplexed by this error, I removed the '-q' option from the dwz in my local /usr/bin/dh_dwz, and saw warning messages like this: dwz: debian/golang-golang-x-tools/usr/bin/authtest: .debug_info section not present dwz: debian/golang-golang-x-tools/usr/bin/benchcmp: .debug_info section not present dwz: debian/golang-golang-x-tools/usr/bin/callgraph: .debug_info section not present ... dwz: debian/golang-golang-x-tools/usr/bin/vet: .debug_info section not present It turns out that these Go compiled ELF executables have .zdebug_info rather than .debug_info section, i.e., "DWARF sections are now compressed by default" as stated in the Go 1.11 Release Notes at https://golang.org/doc/go1.11#debugging . And then, since dwz (0.12.20190711-1), "If .debug_info section not present, exit with 0. See also #931792 https://bugs.debian.org/931792, https://sourceware.org/bugzilla/show_bug.cgi?id=24766 and https://sourceware.org/git/?p=dwz.git;a=commit;h=51a7fba9895c0256888fe8996f37c598ca56749a So, I recommend that dh_dwz should have a check added to ensure the multifile actually exists before running objcopy, and if not, dh_dwz probably should print some warnings, then exit gracefully with 0. Anyhow, for golang-golang-x-tools, initially not wanting to disable dh_dwz altogether, I tried the following workaround: override_dh_dwz: dh_dwz || : But then I encountered a second problem: An empty golang-golang-x-tools-dbgsym package containing only /usr/lib/debug/.dwz/x86_64-linux-gnu/ got generated. I realized this was previously fixed in debhelper (11.4.1): * dh_strip: Remove empty /usr/lib/debug directories left over by dh_dwz. Thanks to Ferenc Wágner for reporting the issue. (Closes: #909303) But perhaps these warning messages give a clue: dh_strip: Could not find the BuildID in debian/golang-golang-x-tools/usr/bin/findcall dh_strip: Could not find the BuildID in debian/golang-golang-x-tools/usr/bin/vet ... Looking at https://salsa.debian.org/debian/debhelper/commit/423cfce04719f41d7224d75155c4e7f9a97a10e9, it appears to me that the fix for #909303: doit('rmdir', '-p', '--ignore-fail-on-non-empty', "$tmp/usr/lib/debug"); currently gets to run only if BuildID was found. Sorry, I probably should have filed a second bug report for dh_strip, but these two issues seem related, and I am lazy. :-) Many thanks! Anthony Fok - -- System Information: Debian Release: bullseye/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.19.0-5-amd64 (SMP w/4 CPU cores) Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), LANGUAGE=en_CA.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages debhelper depends on: ii autotools-dev 20180224.1 ii dh-autoreconf 19 ii dh-strip-nondeterminism 1.3.0-1 ii dpkg 1.19.7 ii dpkg-dev 1.19.7 ii dwz 0.12.20190723-1 ii file 1:5.37-5 ii libdpkg-perl 1.19.7 ii man-db 2.8.5-2 ii perl 5.28.1-6 ii po-debconf 1.0.21 debhelper recommends no packages. Versions of packages debhelper suggests: ii dh-make 2.201802 - -- no debconf information -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEFCQhsZrUqVmW+VBy6iUAtBLFms8FAl1Bg84ACgkQ6iUAtBLF ms9KeRAAo0J3nvQ0OGD34JNWPwi5QN2OyidBVok5j+eoMLcE+lnM6+Sj8c7Z6/VV 5JErTBSWLnls5cJC6aY8S/b1SujoKM8Y6OcLAsMQIegvB1AsYFb3Fo7bPdOAfAXn gClmBd5mxc7Z8w3wCXTaqVhIvf8aCm/CUhjBSx1aW6rOzhpK1uFdD416KLuSo1fe 1nFAXbC+JXbhhi9B96lGjrSAgL/ZJeAI1CaArzcmb5e3twd3pxbq6HrbvnXzDP1S //h0E1MLyr9fRO5EEZ5Zmel3FQSDJbMWBrvPdNSryifBRtJj5QVUvhAB76BhycBk aHpVMCRt81jo5hEZo9Q3LB5MsTpCMcwI9BxvtP5VlWGIRmC8aRnTFVL48QJi/ZFf 6VLyE4mx2Ri6vWZ2oW24zDak4YB2VywgBgdjIlBO3WAQTBNOEIDTHdd3vOB4Fna0 FSkSZZgtQKYHSFzX2HCjjw7FqgmgvF/ZMe2YZtY01yP9zNJuBnzilLLQQbi0Tdam VLCOGoHMO9Mau3maeSnIp7IgWgXnI/doVao/Qp5xZEWrPodDUXJVZtSNopp8hEpj xxWKq5oeeQ7CTYOujzOsz+Mc87BYZC838jWZLHTt3ylvJrlOTOqf+ly02RguQsEr wdXMyzF67Kc93UUArG7s2u5SSrP5AYSQL7BN4HyckJ7hW7V20mE= =vRj/ -----END PGP SIGNATURE-----