Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 919699

Summary: dev-util/bpftool-6.5.7 has uncontrolled dependency on llvm
Product: Gentoo Linux Reporter: Brian Harring <ferringb>
Component: Current packagesAssignee: Jakov Smolić <jsmolic>
Status: RESOLVED FIXED    
Severity: normal CC: holger
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Brian Harring 2023-12-11 02:19:51 UTC
For bpftool's JIT disassembler, it either can use the built in libbfd or use llvm; llvm is preferred and is the default if it's detected at compile time.

For gentoo's compilation of bpftool, there is no explicit dependency on llvm nor manipulation of the build/tools/features/llvm* test's, so the resultant binary may or may not be bound to llvm.

Ironically, the LLVM feature check fails on 6.6 if >=clang-16 ; this is resolved via the patch in perf https://github.com/gentoo/gentoo/blob/master/dev-util/perf/files/perf-6.0-c%2B%2B17.patch .

Alternatively, one can pull what was merged into the kernel: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4fa008a2db484024a5cb52676a1b1534dc82330c

Being that the llvm disassembler is what folks should be using, you should just add a hard dep on clang.  Either way, you also need to fix the detection.
Comment 1 Larry the Git Cow gentoo-dev 2024-02-24 21:30:31 UTC
The bug has been closed via the following commit(s):

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

commit bdfd15b0e299313dd6151e3e71e4274e9c21a2f9
Author:     Jakov Smolić <jsmolic@gentoo.org>
AuthorDate: 2024-02-24 21:28:47 +0000
Commit:     Jakov Smolić <jsmolic@gentoo.org>
CommitDate: 2024-02-24 21:29:09 +0000

    dev-util/bpftool: Fix automagic llvm depencency
    
    Closes: https://bugs.gentoo.org/919699
    Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>

 dev-util/bpftool/{bpftool-6.7.6.ebuild => bpftool-6.7.6-r1.ebuild} | 4 +++-
 dev-util/bpftool/metadata.xml                                      | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)