Skip to contentSkip to conversation

Recent tarballs missing some files

DISCUSSION Michel Lind 1 participant 3 messages Nov 25, 2024 – Nov 26, 2024 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello all,

Per discussions with acme back at LPC, I'm working on packaging a standalone perf RPM, initially for the CentOS Hyperscale SIG and potentially for Fedora later on.

I noticed that, while perf 6.9.0 builds fine from the source tarball, more recent versions (at least 6.11 and 6.12) fails due to a missing header:

```
In file included from /builddir/build/BUILD/perf-6.12.0/tools/include/uapi/linux/bpf_perf_event.h:11,
                 from libbpf.c:36:
/builddir/build/BUILD/perf-6.12.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"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
```

I can submit a patch to fix this (and any other missing files), if someone could point me to where the script is that generates the perf tarballs.

Thanks,

Signature · 2 lines
 _o) Michel Lind
_( ) identities: https://keyoxide.org/5dce2e7e9c3b1cffd335c1d78b229d2f7ccc04f2
#1 lore raw
Quoted 19 lines · Michel Lind

Hello all,

Per discussions with acme back at LPC, I'm working on packaging a standalone perf RPM, initially for the CentOS Hyperscale SIG and potentially for Fedora later on.

I noticed that, while perf 6.9.0 builds fine from the source tarball, more recent versions (at least 6.11 and 6.12) fails due to a missing header:

```
In file included from /builddir/build/BUILD/perf-6.12.0/tools/include/uapi/linux/bpf_perf_event.h:11,
                 from libbpf.c:36:
/builddir/build/BUILD/perf-6.12.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"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
```
Quoted 4 lines

I can submit a patch to fix this (and any other missing files), if someone could point me to where the script is that generates the perf tarballs.

Update - on digging in this only happens on aarch64 (probably why this was not caught earlier). And it also affects 6.9.0. In all cases the alternatives are either copying in that one header *or* passing NO_LIBBPF=1

Once I know which script to update, the other thing I want to do is make it bundle a copy of the COPYING file, since we ideally have that for standalone distribution

perf now built for Hyperscale experimental and facebook repos - the only difference is the facebook build has Perl support disabled

https://cbs.centos.org/koji/packageinfo?packageID=11475

I'll promote it to an official Hyperscale package once I figure out how to build with the standard optimization flags in addition to the ones perf overrides.

Best regards,

Signature · 2 lines
 _o) Michel Lind
_( ) identities: https://keyoxide.org/5dce2e7e9c3b1cffd335c1d78b229d2f7ccc04f2

A message that is not in the archive (sent off-list or not yet received): CA+JHD91LPXRadmVckNMSf-zMNuJsEO1_pk0JC57XdVQczadwgA@mail.gmail.com

#3 lore raw

Hi Arnaldo,

Quoted 38 lines · Arnaldo Carvalho de Melo
Quoted 24 lines · Michel Lind
Quoted 6 lines · Michel Lind

Hello all,

Per discussions with acme back at LPC, I'm working on packaging a standalone perf RPM, initially for the CentOS Hyperscale SIG and potentially for Fedora later on.

Quoted 6 lines

I noticed that, while perf 6.9.0 builds fine from the source tarball, more recent versions (at least 6.11 and 6.12) fails due to a missing header:

```
In file included from

/builddir/build/BUILD/perf-6.12.0/tools/include/uapi/linux/bpf_perf_event.h:11,

Quoted 2 lines
                 from libbpf.c:36:

/builddir/build/BUILD/perf-6.12.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

Quoted 5 lines
    2 | #include "../../arch/arm64/include/uapi/asm/bpf_perf_event.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated.
```

Quoted 9 lines
Quoted 4 lines

I can submit a patch to fix this (and any other missing files), if someone could point me to where the script is that generates the perf tarballs.

Update - on digging in this only happens on aarch64 (probably why this was not caught earlier). And it also affects 6.9.0. In all cases the alternatives are either copying in that one header *or* passing NO_LIBBPF=1

Maybe the case of adding the missing file to:

Quoted 8 lines

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/tools/perf/MANIFEST

Look at the other csets for explanation.

You could also try building with the system 's libbpf, look at:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/Makefile.perf#n120

Thank you!

Building with the system libbpf might not be an option when building for older Enterprise Linux releases, but I'll add that as an option in the spec for new enough releases.

Best regards,

Signature · 2 lines
 _o) Michel Lind
_( ) identities: https://keyoxide.org/5dce2e7e9c3b1cffd335c1d78b229d2f7ccc04f2