Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 902197 - sys-devel/dwz-0.15-r2 calls readelf directly
Summary: sys-devel/dwz-0.15-r2 calls readelf directly
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-19 21:25 UTC by Agostino Sarubbo
Modified: 2024-11-06 11:53 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,43.66 KB, text/plain)
2023-03-19 21:25 UTC, Agostino Sarubbo
Details
readelf.patch (readelf.patch,872 bytes, patch)
2024-11-02 21:19 UTC, Marco Rebhan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-03-19 21:25:30 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: sys-devel/dwz-0.15 calls readelf directly.
Discovered on: amd64 (internal ref: ci)

NOTE:
As per QA policy, toolchain tools must not be called directly because they can cause issue in cross-compiling and because is not possible use a different READELF implementation (like llvm-readelf). To reproduce, please use sys-devel/gcc-config[-native-symlinks], sys-devel/binutils-config[-native-symlinks].
Comment 1 Agostino Sarubbo gentoo-dev 2023-03-19 21:25:33 UTC
Created attachment 858413 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2023-03-19 21:25:34 UTC
Error(s) that match a know pattern:


/bin/sh: line 1: readelf: command not found
dwz.c:42:10: fatal error: xxhash.h: No such file or directory
dwz.c:42:10: fatal error: xxhash.h: No such file or directory
Comment 3 Agostino Sarubbo gentoo-dev 2024-09-01 07:33:56 UTC
ci has reproduced this issue with version 0.15-r1 - Updating summary.
Comment 4 Marco Rebhan 2024-11-02 21:19:25 UTC
Created attachment 907733 [details, diff]
readelf.patch

This patch allows compilation with sys-devel/binutils-config[-native-symlinks]. It will not in fact build with llvm-readelf*, so still needs additionally setting READELF="x86_64-pc-linux-gnu-readelf" when building the package to make it actually compile, but it might fix cross compilation completely.

Note there are other occurrences of readelf, in the package tests, that this patch patch doesn't cover, so dwz[test] will probably still not compile, but this at least gets compilation working when "readelf" is not GNU readelf (or the readelf for the correct arch)

* llvm-readelf: error: unknown argument '-w'
Comment 5 Agostino Sarubbo gentoo-dev 2024-11-06 11:53:13 UTC
ci has reproduced this issue with version 0.15-r2 - Updating summary.