| Message ID | 20260519114152.903563-1-Harish.Sadineni@windriver.com |
|---|---|
| State | New |
| Headers | show |
| Series | perf: disable BUILD_BPF_SKEL when rust in kernel feature is enabled | expand |
Hi, On Tue May 19, 2026 at 1:41 PM CEST, Harish via lists.openembedded.org Sadineni wrote: > From: Harish Sadineni <Harish.Sadineni@windriver.com> > > Enabling the Rust in-kernel feature pulls in clang-native as a > dependency for the kernel build. During the perf build, the presence of clang > causes all BUILD_BPF_SKEL dependency checks to succeed, which makes perf attempt > to build bpftool as part of its build process and make build to fail. > > Previously, When Rust support was not enabled, BUILD_BPF_SKEL is set 0 due to missing > clang dependency. > > Error: > | make[3]: *** ../bpf/bpftool: No such file or directory. Stop. > > As a workaround currently disabling BUILD_BPF_SKEL to make perf to build. > > Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com> > --- > meta/recipes-kernel/perf/perf.bb | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb > index c3ef25fd99..9fc100e961 100644 > --- a/meta/recipes-kernel/perf/perf.bb > +++ b/meta/recipes-kernel/perf/perf.bb > @@ -438,3 +438,9 @@ perf_fix_sources () { > fi > done > } > + > +python () { > + kernel_features = d.getVar('KERNEL_FEATURES') > + if 'rust' in kernel_features: > + d.appendVar('EXTRA_OEMAKE', ' BUILD_BPF_SKEL=0') > +} I believe this could be done as: EXTRA_OEMAKE += "${@bb.utils.contains('KERNEL_FEATURES', 'rust', 'BUILD_BPF_SKEL=0', '', d)} This is the standard approach done in various places in OE-Core. Unless there's a particular need for an anonymous Python function. And since this is a workaround, a comment in the file explaining the reason for it would be nice, I think, so we keep track of why we are doing this in the first place. Antonin
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index c3ef25fd99..9fc100e961 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb @@ -438,3 +438,9 @@ perf_fix_sources () { fi done } + +python () { + kernel_features = d.getVar('KERNEL_FEATURES') + if 'rust' in kernel_features: + d.appendVar('EXTRA_OEMAKE', ' BUILD_BPF_SKEL=0') +}