Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 911306 - dev-util/debugedit-5.0-r1 doesn't work with FEATURES="installsources" when compile w/ clang
Summary: dev-util/debugedit-5.0-r1 doesn't work with FEATURES="installsources" when co...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-07-27 07:58 UTC by Zhixu Liu
Modified: 2024-04-07 07:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zhixu Liu 2023-07-27 07:58:10 UTC
for example, when build app-arch/cpio with CC=clang

/usr/bin/debugedit: /var/tmp/portage/app-arch/cpio-2.14/image/bin/gcpio: Unknown DWARF DW_FORM_0x25

which will cause installsources not working. This had been reported in https://sourceware.org/bugzilla/show_bug.cgi?id=28728 , but seems have not been fixed yet?

Reproducible: Always
Comment 1 Arniii 2023-09-17 09:55:53 UTC
make.conf : http://0x0.st/HOcW.conf 
summary : clang profile + lto + O3 + native + debug symbols + splitdebug + compressdebug + installsources

emerge's build log: http://0x0.st/HOAn.log 
 
/usr/bin/debugedit: /var/tmp/portage/x11-libs/libXaw-1.0.15/image/usr/lib64/libXaw7.so.7.0.0: Unknown DWARF DW_FORM_0x25

right now (not) solved by adding -gdwarf-4 -fdebug-default-version=4 as compilation flags for clang.
Comment 2 Larry the Git Cow gentoo-dev 2024-01-28 15:35:21 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b16960beaa13970e77667497eeeccb13c7fba6a9

commit b16960beaa13970e77667497eeeccb13c7fba6a9
Author:     Sv. Lockal <lockalsash@gmail.com>
AuthorDate: 2024-01-28 14:49:52 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-28 15:32:34 +0000

    dev-util/debugedit: fix error "Unknown DWARF DW_FORM_0x25 (DW_FORM_strx1)"
    
    This fixes builds with FEATURES="installsources" when compiled with Clang,
    allowing to set correct sources path with debugedit for binaries, created with Clang.
    The issue was caused by switch from DWARF4 to DWARF5 (by default) in Clang 14.
    The patch is taken from upstream commits and repeats fix from Fedora.
    
    Upstream bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28728
    See Also: https://bugzilla.redhat.com/show_bug.cgi?id=2064052
    Closes: https://bugs.gentoo.org/911306
    Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/35054
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/debugedit/debugedit-5.0-r3.ebuild         |  48 +++
 .../files/debugedit-5.0-dw-form-strx-support.patch | 390 +++++++++++++++++++++
 2 files changed, 438 insertions(+)