On Tue, Nov 26, 2024 at 05:43:18PM -0300, Arnaldo Carvalho de Melo wrote: > Needed to build tools/lib/bpf/ on various arches other than x86_64, > notably arm64 when using the perf tarballs generated by: > > $ make help | grep perf- > perf-tar-src-pkg - Build the perf source tarball with no compression > perf-targz-src-pkg - Build the perf source tarball with gzip compression > perf-tarbz2-src-pkg - Build the perf source tarball with bz2 compression > perf-tarxz-src-pkg - Build the perf source tarball with xz compression > perf-tarzst-src-pkg - Build the perf source tarball with zst compression > $ > > Building with BPF support was opt-in in perf for a long time, and > testing it via the tarball main kernel Makefile targets in an > architecture other than x86_64 was an odd case. > > I had noticed this at some point earlier this year while cross building > perf to some arches, including arm64, but it fell thru the cracks, see > the Link tag below. > > Fix it now by adding those arch/*/include/uapi/asm/bpf_perf_event.h > files to the MANIFEST file used in building the perf source tarball. > FWIW - when testing against the architectures Fedora carry (x86_64, aarch64/arm64, ppc64le, s390x) only the arm64 and s390 headers are needed; see https://git.centos.org/rpms/perf/blob/c9s-sig-hyperscale/f/perf.spec#_120-128 (I would link to my Koji scratch build but Koji has some sort of glitch right now) It's probably safer to just include all headers just in case. Thanks for this patch, it is really instructive in figuring out how perf is put together! Best regards, -- _o) Michel Lind _( ) identities: https://keyoxide.org/5dce2e7e9c3b1cffd335c1d78b229d2f7ccc04f2