Re: Debian: quassel build fails with DWZ errors when using LLVM-19 and DWARF-5
- To: Sami Tolvanen <samitolvanen@google.com>, Kees Cook <kees@kernel.org>, Nathan Chancellor <nathan@kernel.org>, Fangrui Song <i@maskray.me>, doko@debian.org, niels@thykier.net, Christian Göttsche <cgzones@googlemail.com>, scott@kitterman.com, pkg-kde-extras@lists.alioth.debian.org, debian-qt-kde@lists.debian.org, Nick Desaulniers <nick.desaulniers@gmail.com>, Sylvestre Ledru <sylvestre@debian.org>
- Cc: 1016936@bugs.debian.org
- Subject: Re: Debian: quassel build fails with DWZ errors when using LLVM-19 and DWARF-5
- From: Sedat Dilek <sedat.dilek@gmail.com>
- Date: Mon, 4 Nov 2024 16:12:05 +0100
- Message-id: <[🔎] CA+icZUXEYKaOgj_i1PmxGzYL-B6sKRUztg5DGTi9dk_ViVNEpg@mail.gmail.com>
- Reply-to: sedat.dilek@gmail.com
- In-reply-to: <[🔎] CA+icZUXT0Aw0Uj7b0ogEgJognF3F7CdkfrMho5CPBxEq--VtGQ@mail.gmail.com>
- References: <[🔎] CA+icZUUjE_tJax51ohC+cfcj8iLd_2X8beXWMmkeZgq54AqgZQ@mail.gmail.com> <[🔎] CA+icZUXwC3-GM-jvz0LC13r7tEHWbxSD8AJrz7-8uaaOk54j3Q@mail.gmail.com> <[🔎] CA+icZUXT0Aw0Uj7b0ogEgJognF3F7CdkfrMho5CPBxEq--VtGQ@mail.gmail.com>
On Mon, Nov 4, 2024 at 3:39 PM Sedat Dilek <sedat.dilek@gmail.com> wrote:
>
> On Fri, Nov 1, 2024 at 11:34 AM Sedat Dilek <sedat.dilek@gmail.com> wrote:
> >
> > OK.
> >
> > Using dh_strip instead of dh_strip_nondeterminism (default) ...
> >
>
> Hi,
>
> In my latest build I created an OVERRIDE in debian/rules for dh_dwz as
> this seems to have problems with DWARF-v5.
> dh_strip_nondeterminism ... passed
> dh_dwz ... SKIPPED
> dh_strip ... passed
> ^^ Build OK
>
> At 99% when linking the quassel binaries I see /usr/bin/ld -
> GNU/binutils LD linker - is used (via ps -ef).
> This uses DWARF Level 4 as default (gas/as.c file in the sources).
> This is binutils 2.43.1 in Debian/unstable.
> Looks like I have to force the usage of LLD linker somehow.
>
> Link: https://stackoverflow.com/questions/1867745/cmake-use-a-custom-linker
>
> In Linux-kernel we pass -Wa.-dwarf-5 to the assembler.
> Clang (Clang++ ?) uses an Integrated ASsember (IAS).
> Maybe, I need to pass -gwarf-5 plus -Wa.-dwarf-5 to CC and CXX lines?
>
> If someone has an idea, please let me know.
>
> Might be dh_dwz (dwz) is simply BROKEN with DWARF-v5.
>
> Best thanks.
>
> Best regards,
> -Sedat-
[ CC Debian Bug #1016936 ]
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.
-Sedat-
Reply to: