Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 946665 - net-libs/xdp-tools: should use llvm-r1 eclass
Summary: net-libs/xdp-tools: should use llvm-r1 eclass
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Holger Hoffstätte
URL:
Whiteboard:
Keywords: LATER
Depends on:
Blocks:
 
Reported: 2024-12-19 10:00 UTC by Holger Hoffstätte
Modified: 2024-12-19 10:40 UTC (History)
4 users (show)

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 Holger Hoffstätte 2024-12-19 10:00:51 UTC
xdp-tools still has a regular clang dependency and really should use llvm-r1.eclass for consistency with other ebuilds.


Reproducible: Always
Comment 1 Holger Hoffstätte 2024-12-19 10:02:19 UTC
Already fixed in my overlay, just waiting for the next bump since it's not critical.
Comment 2 Ionen Wolkens gentoo-dev 2024-12-19 10:05:37 UTC
llvm-r1 is intended for packages linking with libclang/llvm and such, when just calling clang itself in PATH then BDEPEND should be all you need (otherwise we'd have an eclass to use gcc too).
Comment 3 Ionen Wolkens gentoo-dev 2024-12-19 10:10:00 UTC
(In reply to Ionen Wolkens from comment #2)
> llvm-r1 is intended for packages linking with libclang/llvm and such, when
> just calling clang itself in PATH then BDEPEND should be all you need
> (otherwise we'd have an eclass to use gcc too).
Or is this package actually linking with clang libraries? (haven't looked, but assumed not given it's only in BDEPEND).
Comment 4 Holger Hoffstätte 2024-12-19 10:17:54 UTC
(In reply to Ionen Wolkens from comment #3)
> (In reply to Ionen Wolkens from comment #2)
> > llvm-r1 is intended for packages linking with libclang/llvm and such, when
> > just calling clang itself in PATH then BDEPEND should be all you need
> > (otherwise we'd have an eclass to use gcc too).

OK, that makes sense.

> Or is this package actually linking with clang libraries? (haven't looked,
> but assumed not given it's only in BDEPEND).

Just had to check myself, and no - it just links against libbpf, clang/llc is used for compiling bpf programs which are then linked into libxdp or the various utilities.

I could have sworn someone asked me to do this, but apprently not.
All the better!
Comment 5 Holger Hoffstätte 2024-12-19 10:26:32 UTC
(In reply to Holger Hoffstätte from comment #4)
> Just had to check myself, and no - it just links against libbpf, clang/llc
> is used for compiling bpf programs which are then linked into libxdp or the
> various utilities.

More correctly the bpf bits are installed separately and then loaded with libbpf. Still no clang/llvm dep though.
Comment 6 Ionen Wolkens gentoo-dev 2024-12-19 10:31:21 UTC
(In reply to Holger Hoffstätte from comment #4)
> (In reply to Ionen Wolkens from comment #3)
> > (In reply to Ionen Wolkens from comment #2)
> > > llvm-r1 is intended for packages linking with libclang/llvm and such, when
> > > just calling clang itself in PATH then BDEPEND should be all you need
> > > (otherwise we'd have an eclass to use gcc too).
> 
> OK, that makes sense.
> 
> > Or is this package actually linking with clang libraries? (haven't looked,
> > but assumed not given it's only in BDEPEND).
> 
> Just had to check myself, and no - it just links against libbpf, clang/llc
> is used for compiling bpf programs which are then linked into libxdp or the
> various utilities.
> 
> I could have sworn someone asked me to do this, but apprently not.
> All the better!
I'm assuming this needs LLVM_TARGETS="BPF" and *if* someone did ask, maybe it's because it doesn't check for it -- albeit that's a long shot given the LLVM_TARGET is forced (maybe if they were unforcing them and hit a failure, just a guess ;p).

...but that's a case similar to checking for openmp support and llvm-r1 doesn't really fits still (aka it doesn't need to "pin" to llvm slots), for a best effor it should probably depend on llvm-core/clang:*[llvm_targets_BPF] like e.g. libv4l[bpf] though.
Comment 7 Holger Hoffstätte 2024-12-19 10:40:38 UTC
(In reply to Ionen Wolkens from comment #6)
> for a best effor it should probably depend on
> llvm-core/clang:*[llvm_targets_BPF] like e.g. libv4l[bpf] though.

I believe that was what I was actually trying to do, which makes even more sense. :)

Noted and will do for the next bump.
Thanks!