#1016936 dwz: Unknown debugging section .debug_addr causes some builds to fail

Package:
dwz
Source:
dwz
Description:
DWARF compression tool
Submitter:
Andreas Beckmann
Date:
2025-04-26 19:18:01 UTC
Severity:
normal
Tags:
#1016936#5
Date:
2022-08-10 06:03:45 UTC
From:
To:
Hi,

assaultcube recently started to FTBFS with a dwz error. Since both
src:assaultcube and src:dwz haven't been changed for a long time and
successfully built previously, I suspect this is related to GCC 12
becoming the default compiler recently.

   dh_dwz -O--sourcedirectory=source/src
dwz: debian/assaultcube/usr/lib/games/assaultcube/ac_client: Unknown debugging section .debug_addr
dwz: debian/assaultcube/usr/lib/games/assaultcube/ac_server: Unknown debugging section .debug_addr
dwz: Too few files for multifile optimization
dh_dwz: error: dwz -mdebian/assaultcube/usr/lib/debug/.dwz/x86_64-linux-gnu/assaultcube.debug -M/usr/lib/debug/.dwz/x86_64-linux-gnu/assaultcube.debug -- debian/assaultcube/usr/lib/games/assaultcube/ac_client debian/assaultcube/usr/lib/games/assaultcube/ac_server returned exit code 1
dh_dwz: error: Aborting due to earlier error
make: *** [debian/rules:9: binary] Error 25

(the full buildlog can be found in #1016935)

(my most recent successful assaultcube build in sid was on July 11)

Andreas

#1016936#12
Date:
2022-09-04 15:18:08 UTC
From:
To:
#1016936#17
Date:
2022-09-08 17:22:36 UTC
From:
To:
Hello,

This error also occurred for me when building PolyMC under Clang, but
not GCC. It seems this problem is common for many Clang builds [1].
Fedora also seems to be having issues with this; Thus, I'm retitling
this bug to be more generic, and adding an upstream tag. I will create a
bug when my Bugzilla account creation request is approved by the admin.

Thanks,
--
Ben Westover

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=997080#41

#1016936#26
Date:
2022-09-09 03:10:41 UTC
From:
To:
OK, so it turns out this error is due to Clang's adoption of DWARFv5 [1]
which dwz doesn't fully support yet [2]. Until that is fixed, the issue
can be worked around by using DWARFv4 by adding `-gdwarf-4` to flags.

#1016936#39
Date:
2023-02-20 12:57:34 UTC
From:
To:
FWIW this kind of errors can also happen with GCC with -gsplit-dwarf,
I just hit it in WebKitGTK:

https://gcc.gnu.org/wiki/DebugFission

Berto

#1016936#50
Date:
2024-11-04 15:12:05 UTC
From:
To:
Default DWARF level in GNU/ld:

/* The maximum level of DWARF DEBUG information we should manufacture.
   This defaults to 3 unless overridden by a command line option.  */
unsigned int dwarf_level = 3;

Link: https://github.com/bminor/binutils-gdb/blob/binutils-2_43_1/gas/as.c#L107

"dwz: Unknown debugging section .debug_addr causes some builds to fail"
Link: https://bugs.debian.org/1016936

IIRC, I looked into dh_dwz and it hardcoded GNU/binutils objcopy.
As a wish it should respect llvm-objcopy when exported as OBJCOPY.

^^ Just for the record.

#1016936#55
Date:
2025-04-26 15:32:58 UTC
From:
To:
Downgrading this from serious because:

- This does not affect the default C and C++ toolchain
- There are workarounds available:
  - Build with -gdwarf-4
  - Disable use of dh_dwz

Ben.

#1016936#62
Date:
2025-04-26 17:23:01 UTC
From:
To:
#1103592 is I think a case that does affect the default C and C++
toolchain.

#1016936#67
Date:
2025-04-26 19:15:32 UTC
From:
To:
I see lots of LLVM in the build log.

Ben.