From: Max Krummenacher <max.krummenac...@toradex.com>

Kernel commit 9eea8fafe33e ("libbpf: fix __arg_ctx type enforcement for
perf_event programs") added with 6.9-rc1 tools/include/uapi/asm/bpf_perf_event.h
which for arc, arm64, loongarch, riscv and s390 includes headers from
the arch/${ARCH}/... directories.

Which results in:

  ERROR: perf-1.0-r0 do_compile: oe_runmake failed
  | In file included from 
1.0/perf-1.0/tools/include/uapi/linux/bpf_perf_event.h:11,
  |                  from libbpf.c:36:
  | perf/1.0/perf-1.0/tools/include/uapi/asm/bpf_perf_event.h:2:10: fatal 
error: ../../arch/arm64/include/uapi/asm/bpf_perf_event.h: No such file or 
directory
  |     2 | #include "../../arch/arm64/include/uapi/asm/bpf_perf_event.h"
  |       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

We copy the uapi/asm directory to make sure the header file is
present.

Signed-off-by: Max Krummenacher <max.krummenac...@toradex.com>
Signed-off-by: Bruce Ashfield <bruce.ashfi...@gmail.com>
---

This is a tweak of the commit from max to only include the uapi/asm
directory.

A second patch will further refine it.

Bruce

 meta/recipes-kernel/perf/perf.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 2c6ab060e3..2f540cd54b 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -129,6 +129,7 @@ EXTRA_OEMAKE += "\
 # honour a JOBS variable.
 EXTRA_OEMAKE:append:task-configure = " JOBS=1"
 
+# include/uapi/asm is for: include/uapi/asm/bpf_perf_event.h
 PERF_SRC ?= "Makefile \
              tools/arch \
              tools/build \
@@ -139,6 +140,7 @@ PERF_SRC ?= "Makefile \
              tools/scripts \
              scripts/ \
              arch/arm64/tools \
+             arch/${ARCH}/include/uapi/asm/ \
              arch/${ARCH}/Makefile \
 "
 
-- 
2.39.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#197972): 
https://lists.openembedded.org/g/openembedded-core/message/197972
Mute This Topic: https://lists.openembedded.org/mt/105337223/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to