[Pkg-kde-extras] Debian: quassel build fails with DWZ errors when using LLVM-19 and DWARF-5
Sedat Dilek
sedat.dilek at gmail.com
Fri Nov 1 09:54:41 GMT 2024
Hi,
today is a public holiday in Germany and I have time to play.
[ INTRO - Let me introduce myself ]
By heart and with love - I build my Linux-kernel with LLVM/Clang and
LLVM tools (LLVM "binutils").
10+ years ago I provided quassel-nightly Debian packages for AMD64 for
interested people.
Quassel is an IRC-client based on QT-v5 and written in C++ and most
people using KDE/desktop love it.
[ MR12 ]
By accident I fell over Merge-Request "MR12" in Debian's salsa GITLAB
quassel repository.
"RFC: Build with LLVM 16 and CFI enabled"
Link: https://salsa.debian.org/qt-kde-team/extras/quassel/-/merge_requests/12/diffs?commit_id=b97aeec74b443679c958798ab55e21ea0dbe23fe
[ THE EXPERIMENT ]
After the transition to QT version 5.15.15 finished I was thinking of
testing the MR12 patch.
Link: https://release.debian.org/transitions/html/qtbase-abi-5-15-15.html
[ TRYOUT-1 - Simple Rebuild ]
First, I did a simple rebuild with NO changes (uses GCC toolchain +
GNU/binutils).
[ TRYOUT-2 - MR12 and LLVM-19 ]
Second, I applied MR12 and built successfully with Debian's LLVM/Clang
v19.1.2 (v19.1.3 is on the way).
[ NUMBERS ]
"Numbers talk, bullshit walks." (Linus Torvalds)
$ du -m LATEST*/*dbgsym*.deb | sort -n
4 LATEST.MR12/quassel-core-dbgsym_0.14.0-4~dileks_amd64.deb
5 LATEST.MR12/quassel-client-dbgsym_0.14.0-4~dileks_amd64.deb
8 LATEST.MR12/quassel-dbgsym_0.14.0-4~dileks_amd64.deb
16 LATEST/quassel-core-dbgsym_0.14.0-3~dileks_amd64.deb
33 LATEST/quassel-client-dbgsym_0.14.0-3~dileks_amd64.deb
42 LATEST/quassel-dbgsym_0.14.0-3~dileks_amd64.deb
$ du -k LATEST*/quassel_*amd64.deb | sort -n
1692 LATEST.MR12/quassel_0.14.0-4~dileks_amd64.deb
1868 LATEST/quassel_0.14.0-3~dileks_amd64.deb
6816 LATEST.MR12.dwarf5-nostrip/quassel_0.14.0-5~dileks_amd64.deb
WOW, great numbers!
[ DWARF VERSION 5 ]
Oh, I forgot I am a DWARF-v5 lover (@Nick How it is going with the baby :-))!
>From Christian's MR12 patch:
[ debian/rules ]
export CC=clang
export CXX=clang++
export RANLIB=llvm-ranlib
export AR=llvm-ar
export DEB_CFLAGS_MAINT_APPEND=-gdwarf-4 -flto -fvisibility=hidden
-fsanitize=cfi
export DEB_CXXFLAGS_MAINT_APPEND=-gdwarf-4 -flto -fvisibility=hidden
-fsanitize=cfi
export DEB_LDFLAGS_MAINT_APPEND=-flto -fvisibility=hidden -fsanitize=cfi
^^ Uses DWARF-v4 + Clang-LTO + Clang-CFI
[ TRYOUT-3 - DWARFv5 + nostrip ]
INFO: Substitute -gdwarf-4 with -gdwarf-5
$ LC_ALL=C DEB_BUILD_OPTIONS=nostrip debuild
^^ Work(s) Around - NOSTRIP
[ TRYOUT-4 - DWARFv5 + strip ]
$ LC_ALL=C DEB_BUILD_OPTIONS=strip debuild
...
make[1]: Leaving directory '/home/dileks/src/quassel/quassel-0.14.0'
dh_installlogrotate
dh_icons
dh_perl
dh_link
dh_strip_nondeterminism
dh_compress
dh_fixperms
dh_missing
dh_dwz -a
dwz: debian/quassel-client/usr/bin/quasselclient: Unknown debugging
section .debug_addr
dwz: debian/quassel-core/usr/bin/quasselcore: Unknown debugging
section .debug_addr
dwz: debian/quassel/usr/bin/quassel: Unknown debugging section .debug_addr
dh_dwz: error: dwz -- debian/quassel/usr/bin/quassel returned exit code 1
dh_dwz: error: dwz -- debian/quassel-core/usr/bin/quasselcore returned
exit code 1
dh_dwz: error: dwz -- debian/quassel-client/usr/bin/quasselclient
returned exit code 1
dh_dwz: error: Aborting due to earlier error
make: *** [debian/rules:23: binary] Error 25
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess
returned exit status 2
debuild: fatal error at line 1184:
dpkg-buildpackage -us -uc -ui failed
^^ DWZ ERRORS
Unsure how to solve this.
[ TRYOUT-5 - DWZ + dwarf-5 ]
dwz lists this option:
-5, --dwarf-5 Emit DWARF 5 standardized supplementary object
files instead of GNU extension .debug_altlink.
I tried a dwz-wrapper:
# cd /usr/bin/
# mv dwz dwz.bin
# ln -sf mydwz dwz
[ mydwz ]
#!/bin/bash
dwz.bin --dwarf-5 "$@"
-EOF-
^^ NO SUCCESS - the dwz-wrapper is used!
...
dh_dwz -a
dwz.bin: debian/quassel/usr/bin/quassel: Unknown debugging section .debug_addr
dwz.bin: debian/quassel-client/usr/bin/quasselclient: Unknown
debugging section .debug_addr
dh_dwz: error: dwz -- debian/quassel/usr/bin/quassel returned exit code 1
dh_dwz: error: dwz -- debian/quassel-client/usr/bin/quasselclient
returned exit code 1
dwz.bin: debian/quassel-core/usr/bin/quasselcore: Unknown debugging
section .debug_addr
dh_dwz: error: dwz -- debian/quassel-core/usr/bin/quasselcore returned
exit code 1
dh_dwz: error: Aborting due to earlier error
My Debian system is based on unstable AMD64.
CC LLVM Linux-kernel folks + some Debian folks LLVM, dwz, debhelper,
quassel, QT/KDE and Christian.
Any help appreciated.
Best thanks.
Best regards,
-Sedat-
P.S.: I want to use the FULL LLVM ECO system to build quassel/unstable
AMD64 on Debian.
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Makefile#n473
More information about the pkg-kde-extras
mailing list