bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/2] perf build: Properly guard libbpf includes
@ 2023-01-06 15:13 Ian Rogers
  2023-01-06 15:13 ` [PATCH v3 2/2] perf build: Fix build error when NO_LIBBPF=1 Ian Rogers
  2023-01-06 15:28 ` [PATCH v3 1/2] perf build: Properly guard libbpf includes Mike Leach
  0 siblings, 2 replies; 20+ messages in thread
From: Ian Rogers @ 2023-01-06 15:13 UTC (permalink / raw)
  To: Mike Leach, linux-perf-users, linux-kernel, bpf, acme, irogers,
	peterz, mingo, mark.rutland, alexander.shishkin, jolsa, namhyung

Including libbpf header files should be guarded by
HAVE_LIBBPF_SUPPORT. In bpf_counter.h, move the skeleton utilities
under HAVE_BPF_SKEL.

Fixes: d6a735ef3277 ("perf bpf_counter: Move common functions to bpf_counter.h")
Reported-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/builtin-trace.c    | 2 ++
 tools/perf/util/bpf_counter.h | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 86e06f136f40..d21fe0f32a6d 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -16,7 +16,9 @@
 
 #include "util/record.h"
 #include <api/fs/tracing_path.h>
+#ifdef HAVE_LIBBPF_SUPPORT
 #include <bpf/bpf.h>
+#endif
 #include "util/bpf_map.h"
 #include "util/rlimit.h"
 #include "builtin.h"
diff --git a/tools/perf/util/bpf_counter.h b/tools/perf/util/bpf_counter.h
index 4dbf26408b69..c6d21c07b14c 100644
--- a/tools/perf/util/bpf_counter.h
+++ b/tools/perf/util/bpf_counter.h
@@ -4,9 +4,12 @@
 
 #include <linux/list.h>
 #include <sys/resource.h>
+
+#ifdef HAVE_LIBBPF_SUPPORT
 #include <bpf/bpf.h>
 #include <bpf/btf.h>
 #include <bpf/libbpf.h>
+#endif
 
 struct evsel;
 struct target;
@@ -87,6 +90,8 @@ static inline void set_max_rlimit(void)
 	setrlimit(RLIMIT_MEMLOCK, &rinf);
 }
 
+#ifdef HAVE_BPF_SKEL
+
 static inline __u32 bpf_link_get_id(int fd)
 {
 	struct bpf_link_info link_info = { .id = 0, };
@@ -127,5 +132,6 @@ static inline int bperf_trigger_reading(int prog_fd, int cpu)
 
 	return bpf_prog_test_run_opts(prog_fd, &opts);
 }
+#endif /* HAVE_BPF_SKEL */
 
 #endif /* __PERF_BPF_COUNTER_H */
-- 
2.39.0.314.g84b9a713c41-goog


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v3 2/2] perf build: Fix build error when NO_LIBBPF=1
  2023-01-06 15:13 [PATCH v3 1/2] perf build: Properly guard libbpf includes Ian Rogers
@ 2023-01-06 15:13 ` Ian Rogers
  2023-01-06 15:28 ` [PATCH v3 1/2] perf build: Properly guard libbpf includes Mike Leach
  1 sibling, 0 replies; 20+ messages in thread
From: Ian Rogers @ 2023-01-06 15:13 UTC (permalink / raw)
  To: Mike Leach, linux-perf-users, linux-kernel, bpf, acme, irogers,
	peterz, mingo, mark.rutland, alexander.shishkin, jolsa, namhyung

The $(LIBBPF) target should only be a dependency of prepare if the
static version of libbpf is needed. Add a new LIBBPF_STATIC variable
that is set by Makefile.config. Use LIBBPF_STATIC to determine whether
the CFLAGS, etc. need updating and for adding $(LIBBPF) as a prepare
dependency.

As Makefile.config isn't loaded for "clean" as a target, always set
LIBBPF_OUTPUT regardless of whether it is needed for $(LIBBPF). This
is done to minimize conditional logic for $(LIBBPF)-clean.

This issue and an original fix was reported by Mike Leach in:
https://lore.kernel.org/lkml/20230105172243.7238-1-mike.leach@linaro.org/

Fixes: 746bd29e348f ("perf build: Use tools/lib headers from install path")
Reported-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/Makefile.config |  2 ++
 tools/perf/Makefile.perf   | 21 ++++++++++++---------
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index c2504c39bdcb..7c00ce0a7464 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -602,6 +602,8 @@ ifndef NO_LIBELF
           dummy := $(error Error: No libbpf devel library found, please install libbpf-devel);
         endif
       else
+        # Libbpf will be built as a static library from tools/lib/bpf.
+	LIBBPF_STATIC := 1
 	CFLAGS += -DHAVE_LIBBPF_BTF__LOAD_FROM_KERNEL_BY_ID
         CFLAGS += -DHAVE_LIBBPF_BPF_PROG_LOAD
         CFLAGS += -DHAVE_LIBBPF_BPF_OBJECT__NEXT_PROGRAM
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 13e7d26e77f0..4e370462e7e1 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -303,10 +303,12 @@ ifneq ($(OUTPUT),)
 else
   LIBBPF_OUTPUT = $(CURDIR)/libbpf
 endif
-LIBBPF_DESTDIR = $(LIBBPF_OUTPUT)
-LIBBPF_INCLUDE = $(LIBBPF_DESTDIR)/include
-LIBBPF = $(LIBBPF_OUTPUT)/libbpf.a
-CFLAGS += -I$(LIBBPF_OUTPUT)/include
+ifdef LIBBPF_STATIC
+  LIBBPF_DESTDIR = $(LIBBPF_OUTPUT)
+  LIBBPF_INCLUDE = $(LIBBPF_DESTDIR)/include
+  LIBBPF = $(LIBBPF_OUTPUT)/libbpf.a
+  CFLAGS += -I$(LIBBPF_OUTPUT)/include
+endif
 
 ifneq ($(OUTPUT),)
   LIBSUBCMD_OUTPUT = $(abspath $(OUTPUT))/libsubcmd
@@ -393,10 +395,8 @@ endif
 export PERL_PATH
 
 PERFLIBS = $(LIBAPI) $(LIBPERF) $(LIBSUBCMD) $(LIBSYMBOL)
-ifndef NO_LIBBPF
-  ifndef LIBBPF_DYNAMIC
-    PERFLIBS += $(LIBBPF)
-  endif
+ifdef LIBBPF_STATIC
+  PERFLIBS += $(LIBBPF)
 endif
 
 # We choose to avoid "if .. else if .. else .. endif endif"
@@ -756,12 +756,15 @@ prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h archheaders $(drm_ioc
 	$(arch_errno_name_array) \
 	$(sync_file_range_arrays) \
 	$(LIBAPI) \
-	$(LIBBPF) \
 	$(LIBPERF) \
 	$(LIBSUBCMD) \
 	$(LIBSYMBOL) \
 	bpf-skel
 
+ifdef LIBBPF_STATIC
+prepare: $(LIBBPF)
+endif
+
 $(OUTPUT)%.o: %.c prepare FORCE
 	$(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@
 
-- 
2.39.0.314.g84b9a713c41-goog


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH v3 1/2] perf build: Properly guard libbpf includes
  2023-01-06 15:13 [PATCH v3 1/2] perf build: Properly guard libbpf includes Ian Rogers
  2023-01-06 15:13 ` [PATCH v3 2/2] perf build: Fix build error when NO_LIBBPF=1 Ian Rogers
@ 2023-01-06 15:28 ` Mike Leach
  2023-01-06 17:25   ` Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 20+ messages in thread
From: Mike Leach @ 2023-01-06 15:28 UTC (permalink / raw)
  To: Ian Rogers
  Cc: linux-perf-users, linux-kernel, bpf, acme, peterz, mingo,
	mark.rutland, alexander.shishkin, jolsa, namhyung

On Fri, 6 Jan 2023 at 15:13, Ian Rogers <irogers@google.com> wrote:
>
> Including libbpf header files should be guarded by
> HAVE_LIBBPF_SUPPORT. In bpf_counter.h, move the skeleton utilities
> under HAVE_BPF_SKEL.
>
> Fixes: d6a735ef3277 ("perf bpf_counter: Move common functions to bpf_counter.h")
> Reported-by: Mike Leach <mike.leach@linaro.org>
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  tools/perf/builtin-trace.c    | 2 ++
>  tools/perf/util/bpf_counter.h | 6 ++++++
>  2 files changed, 8 insertions(+)
>
> diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
> index 86e06f136f40..d21fe0f32a6d 100644
> --- a/tools/perf/builtin-trace.c
> +++ b/tools/perf/builtin-trace.c
> @@ -16,7 +16,9 @@
>
>  #include "util/record.h"
>  #include <api/fs/tracing_path.h>
> +#ifdef HAVE_LIBBPF_SUPPORT
>  #include <bpf/bpf.h>
> +#endif
>  #include "util/bpf_map.h"
>  #include "util/rlimit.h"
>  #include "builtin.h"
> diff --git a/tools/perf/util/bpf_counter.h b/tools/perf/util/bpf_counter.h
> index 4dbf26408b69..c6d21c07b14c 100644
> --- a/tools/perf/util/bpf_counter.h
> +++ b/tools/perf/util/bpf_counter.h
> @@ -4,9 +4,12 @@
>
>  #include <linux/list.h>
>  #include <sys/resource.h>
> +
> +#ifdef HAVE_LIBBPF_SUPPORT
>  #include <bpf/bpf.h>
>  #include <bpf/btf.h>
>  #include <bpf/libbpf.h>
> +#endif
>
>  struct evsel;
>  struct target;
> @@ -87,6 +90,8 @@ static inline void set_max_rlimit(void)
>         setrlimit(RLIMIT_MEMLOCK, &rinf);
>  }
>
> +#ifdef HAVE_BPF_SKEL
> +
>  static inline __u32 bpf_link_get_id(int fd)
>  {
>         struct bpf_link_info link_info = { .id = 0, };
> @@ -127,5 +132,6 @@ static inline int bperf_trigger_reading(int prog_fd, int cpu)
>
>         return bpf_prog_test_run_opts(prog_fd, &opts);
>  }
> +#endif /* HAVE_BPF_SKEL */
>
>  #endif /* __PERF_BPF_COUNTER_H */
> --
> 2.39.0.314.g84b9a713c41-goog
>


This version builds fine too.

Mike
-- 
Mike Leach
Principal Engineer, ARM Ltd.
Manchester Design Centre. UK

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v3 1/2] perf build: Properly guard libbpf includes
  2023-01-06 15:28 ` [PATCH v3 1/2] perf build: Properly guard libbpf includes Mike Leach
@ 2023-01-06 17:25   ` Arnaldo Carvalho de Melo
  2023-01-06 17:53     ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 20+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-01-06 17:25 UTC (permalink / raw)
  To: Mike Leach
  Cc: Ian Rogers, linux-perf-users, linux-kernel, bpf, peterz, mingo,
	mark.rutland, alexander.shishkin, jolsa, namhyung

Em Fri, Jan 06, 2023 at 03:28:03PM +0000, Mike Leach escreveu:
> On Fri, 6 Jan 2023 at 15:13, Ian Rogers <irogers@google.com> wrote:
> >
> > Including libbpf header files should be guarded by
> > HAVE_LIBBPF_SUPPORT. In bpf_counter.h, move the skeleton utilities
> > under HAVE_BPF_SKEL.
> >
> > Fixes: d6a735ef3277 ("perf bpf_counter: Move common functions to bpf_counter.h")
> > Reported-by: Mike Leach <mike.leach@linaro.org>
> > Signed-off-by: Ian Rogers <irogers@google.com>

Thanks, applied.

- Arnaldo

> > ---
> >  tools/perf/builtin-trace.c    | 2 ++
> >  tools/perf/util/bpf_counter.h | 6 ++++++
> >  2 files changed, 8 insertions(+)
> >
> > diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
> > index 86e06f136f40..d21fe0f32a6d 100644
> > --- a/tools/perf/builtin-trace.c
> > +++ b/tools/perf/builtin-trace.c
> > @@ -16,7 +16,9 @@
> >
> >  #include "util/record.h"
> >  #include <api/fs/tracing_path.h>
> > +#ifdef HAVE_LIBBPF_SUPPORT
> >  #include <bpf/bpf.h>
> > +#endif
> >  #include "util/bpf_map.h"
> >  #include "util/rlimit.h"
> >  #include "builtin.h"
> > diff --git a/tools/perf/util/bpf_counter.h b/tools/perf/util/bpf_counter.h
> > index 4dbf26408b69..c6d21c07b14c 100644
> > --- a/tools/perf/util/bpf_counter.h
> > +++ b/tools/perf/util/bpf_counter.h
> > @@ -4,9 +4,12 @@
> >
> >  #include <linux/list.h>
> >  #include <sys/resource.h>
> > +
> > +#ifdef HAVE_LIBBPF_SUPPORT
> >  #include <bpf/bpf.h>
> >  #include <bpf/btf.h>
> >  #include <bpf/libbpf.h>
> > +#endif
> >
> >  struct evsel;
> >  struct target;
> > @@ -87,6 +90,8 @@ static inline void set_max_rlimit(void)
> >         setrlimit(RLIMIT_MEMLOCK, &rinf);
> >  }
> >
> > +#ifdef HAVE_BPF_SKEL
> > +
> >  static inline __u32 bpf_link_get_id(int fd)
> >  {
> >         struct bpf_link_info link_info = { .id = 0, };
> > @@ -127,5 +132,6 @@ static inline int bperf_trigger_reading(int prog_fd, int cpu)
> >
> >         return bpf_prog_test_run_opts(prog_fd, &opts);
> >  }
> > +#endif /* HAVE_BPF_SKEL */
> >
> >  #endif /* __PERF_BPF_COUNTER_H */
> > --
> > 2.39.0.314.g84b9a713c41-goog
> >
> 
> 
> This version builds fine too.
> 
> Mike
> -- 
> Mike Leach
> Principal Engineer, ARM Ltd.
> Manchester Design Centre. UK

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v3 1/2] perf build: Properly guard libbpf includes
  2023-01-06 17:25   ` Arnaldo Carvalho de Melo
@ 2023-01-06 17:53     ` Arnaldo Carvalho de Melo
  2023-01-06 17:55       ` Arnaldo Carvalho de Melo
  2023-01-06 17:57       ` Ian Rogers
  0 siblings, 2 replies; 20+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-01-06 17:53 UTC (permalink / raw)
  To: Mike Leach
  Cc: Ian Rogers, linux-perf-users, linux-kernel, bpf, peterz, mingo,
	mark.rutland, alexander.shishkin, jolsa, namhyung

Em Fri, Jan 06, 2023 at 02:25:05PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Jan 06, 2023 at 03:28:03PM +0000, Mike Leach escreveu:
> > On Fri, 6 Jan 2023 at 15:13, Ian Rogers <irogers@google.com> wrote:
> > >
> > > Including libbpf header files should be guarded by
> > > HAVE_LIBBPF_SUPPORT. In bpf_counter.h, move the skeleton utilities
> > > under HAVE_BPF_SKEL.
> > >
> > > Fixes: d6a735ef3277 ("perf bpf_counter: Move common functions to bpf_counter.h")
> > > Reported-by: Mike Leach <mike.leach@linaro.org>
> > > Signed-off-by: Ian Rogers <irogers@google.com>
> 
> Thanks, applied.

Failing on 'make -C tools/perf build-test', please run it before sending
patches,

- Arnaldo

      make_libbpf_dynamic_O: cd . && make LIBBPF_DYNAMIC=1 FEATURES_DUMP=/var/home/acme/git/perf-urgent/tools/perf/BUILD_TEST_FEATURE_DUMP -j32 O=/tmp/tmp.ZVxz3l2AAH DESTDIR=/tmp/tmp.PDlsV7dzQr
ldd: /tmp/tmp.ZVxz3l2AAH/perf: No such file or directory
cd . && make LIBBPF_DYNAMIC=1 FEATURES_DUMP=/var/home/acme/git/perf-urgent/tools/perf/BUILD_TEST_FEATURE_DUMP -j32 O=/tmp/tmp.ZVxz3l2AAH DESTDIR=/tmp/tmp.PDlsV7dzQr
  BUILD:   Doing 'make -j32' parallel build
  HOSTCC  /tmp/tmp.ZVxz3l2AAH/fixdep.o
  HOSTLD  /tmp/tmp.ZVxz3l2AAH/fixdep-in.o
  LINK    /tmp/tmp.ZVxz3l2AAH/fixdep
Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/perf_regs.h' differs from latest version at 'arch/arm64/include/uapi/asm/perf_regs.h'
diff -u tools/arch/arm64/include/uapi/asm/perf_regs.h arch/arm64/include/uapi/asm/perf_regs.h
Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h'
diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h
Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h'
diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h
Warning: Kernel ABI header at 'tools/arch/arm64/include/asm/cputype.h' differs from latest version at 'arch/arm64/include/asm/cputype.h'
diff -u tools/arch/arm64/include/asm/cputype.h arch/arm64/include/asm/cputype.h
Warning: Kernel ABI header at 'tools/include/linux/build_bug.h' differs from latest version at 'include/linux/build_bug.h'
diff -u tools/include/linux/build_bug.h include/linux/build_bug.h
Warning: Kernel ABI header at 'tools/perf/trace/beauty/include/linux/socket.h' differs from latest version at 'include/linux/socket.h'
diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h
Makefile.config:1147: No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel

  GEN     /tmp/tmp.ZVxz3l2AAH/common-cmds.h
  CC      /tmp/tmp.ZVxz3l2AAH/perf-read-vdso32
  CC      /tmp/tmp.ZVxz3l2AAH/dlfilters/dlfilter-test-api-v0.o
  CC      /tmp/tmp.ZVxz3l2AAH/dlfilters/dlfilter-show-cycles.o
  LINK    /tmp/tmp.ZVxz3l2AAH/dlfilters/dlfilter-show-cycles.so
  LINK    /tmp/tmp.ZVxz3l2AAH/dlfilters/dlfilter-test-api-v0.so
  INSTALL /tmp/tmp.ZVxz3l2AAH/libsubcmd/include/subcmd/exec-cmd.h
  INSTALL /tmp/tmp.ZVxz3l2AAH/libsubcmd/include/subcmd/help.h
  INSTALL /tmp/tmp.ZVxz3l2AAH/libsubcmd/include/subcmd/pager.h
  INSTALL /tmp/tmp.ZVxz3l2AAH/libsubcmd/include/subcmd/parse-options.h
  INSTALL /tmp/tmp.ZVxz3l2AAH/libsubcmd/include/subcmd/run-command.h
  CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/exec-cmd.o
  CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/help.o
  CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/pager.o
  CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/parse-options.o
  CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/run-command.o
  CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/sigchain.o
  CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/subcmd-config.o
  INSTALL libsubcmd_headers
  PERF_VERSION = 6.2.rc2.g449a50dbf82a
  GEN     perf-archive
  GEN     perf-iostat
  INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/bpf_perf.h
  INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/core.h
  INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/cpumap.h
  INSTALL /tmp/tmp.ZVxz3l2AAH/libsymbol/include/symbol/kallsyms.h
  INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/cpu.h
  INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/threadmap.h
  INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/debug.h
  INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/evlist.h
  INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/io.h
  INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/evsel.h
  INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/fd/array.h
  INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/event.h
  INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/fs/fs.h
  INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/mmap.h
  CC      /tmp/tmp.ZVxz3l2AAH/libperf/core.o
  CC      /tmp/tmp.ZVxz3l2AAH/libsymbol/kallsyms.o
  CC      /tmp/tmp.ZVxz3l2AAH/libperf/cpumap.o
  INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/cpumap.h
  CC      /tmp/tmp.ZVxz3l2AAH/libperf/threadmap.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/libapi/fd/
  CC      /tmp/tmp.ZVxz3l2AAH/libperf/evsel.o
  INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/evlist.h
  INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/evsel.h
  CC      /tmp/tmp.ZVxz3l2AAH/libapi/cpu.o
  CC      /tmp/tmp.ZVxz3l2AAH/libperf/evlist.o
  INSTALL libsymbol_headers
  INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/fs/tracing_path.h
  CC      /tmp/tmp.ZVxz3l2AAH/libapi/debug.o
  CC      /tmp/tmp.ZVxz3l2AAH/libperf/mmap.o
  INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/lib.h
  CC      /tmp/tmp.ZVxz3l2AAH/libapi/str_error_r.o
  CC      /tmp/tmp.ZVxz3l2AAH/libperf/zalloc.o
  INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/mmap.h
  MKDIR   /tmp/tmp.ZVxz3l2AAH/libapi/fs/
  CC      /tmp/tmp.ZVxz3l2AAH/libperf/xyarray.o
  CC      /tmp/tmp.ZVxz3l2AAH/libperf/lib.o
  CC      /tmp/tmp.ZVxz3l2AAH/libapi/fd/array.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/libapi/fs/
  MKDIR   /tmp/tmp.ZVxz3l2AAH/libapi/fs/
  INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/threadmap.h
  INSTALL libapi_headers
  INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/xyarray.h
  CC      /tmp/tmp.ZVxz3l2AAH/libapi/fs/fs.o
  CC      /tmp/tmp.ZVxz3l2AAH/libapi/fs/tracing_path.o
  CC      /tmp/tmp.ZVxz3l2AAH/libapi/fs/cgroup.o
  INSTALL libperf_headers
  LD      /tmp/tmp.ZVxz3l2AAH/libapi/fd/libapi-in.o
  LD      /tmp/tmp.ZVxz3l2AAH/libsymbol/libsymbol-in.o
  AR      /tmp/tmp.ZVxz3l2AAH/libsymbol/libsymbol.a
  LD      /tmp/tmp.ZVxz3l2AAH/libapi/fs/libapi-in.o
  LD      /tmp/tmp.ZVxz3l2AAH/libapi/libapi-in.o
  AR      /tmp/tmp.ZVxz3l2AAH/libapi/libapi.a
  LD      /tmp/tmp.ZVxz3l2AAH/libperf/libperf-in.o
  AR      /tmp/tmp.ZVxz3l2AAH/libperf/libperf.a
  GEN     /tmp/tmp.ZVxz3l2AAH/python/perf.cpython-310-x86_64-linux-gnu.so
  LD      /tmp/tmp.ZVxz3l2AAH/libsubcmd/libsubcmd-in.o
  AR      /tmp/tmp.ZVxz3l2AAH/libsubcmd/libsubcmd.a
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-bench.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-annotate.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-config.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-diff.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-evlist.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-ftrace.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-help.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-buildid-list.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-buildid-cache.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-kallsyms.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-list.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-record.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-report.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-stat.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-top.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-script.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-kvm.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-inject.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-mem.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/pmu-events/
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-data.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-version.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-c2c.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-daemon.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-kmem.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-kwork.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-lock.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-sched.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-timechart.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-trace.o
  GEN     /tmp/tmp.ZVxz3l2AAH/pmu-events/pmu-events.c
  CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/clone.o
  CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/fcntl.o
  CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/flock.o
  CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/fsmount.o
  CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/fspick.o
  CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/ioctl.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/bench/
  CC      /tmp/tmp.ZVxz3l2AAH/bench/sched-messaging.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/bench/
  CC      /tmp/tmp.ZVxz3l2AAH/bench/syscall.o
  CC      /tmp/tmp.ZVxz3l2AAH/bench/sched-pipe.o
  CC      /tmp/tmp.ZVxz3l2AAH/bench/mem-functions.o
  CC      /tmp/tmp.ZVxz3l2AAH/bench/futex-hash.o
  CC      /tmp/tmp.ZVxz3l2AAH/bench/futex-wake.o
  CC      /tmp/tmp.ZVxz3l2AAH/bench/futex-wake-parallel.o
  CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/kcmp.o
  CC      /tmp/tmp.ZVxz3l2AAH/bench/futex-requeue.o
  CC      /tmp/tmp.ZVxz3l2AAH/bench/futex-lock-pi.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/tests/
  CC      /tmp/tmp.ZVxz3l2AAH/tests/builtin-test.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/tests/
  CC      /tmp/tmp.ZVxz3l2AAH/tests/builtin-test-list.o
  CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/mount_flags.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/util/
  CC      /tmp/tmp.ZVxz3l2AAH/util/arm64-frame-pointer-unwind-support.o
  CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/move_mount.o
  CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/pkey_alloc.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/common.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/parse-events.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/arch/x86/util/
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/header.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/
  CC      /tmp/tmp.ZVxz3l2AAH/tests/dso-data.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/attr.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/regs_load.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/dwarf-unwind.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/arch/x86/util/
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/tsc.o
  CC      /tmp/tmp.ZVxz3l2AAH/bench/epoll-wait.o
  CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/arch_prctl.o
  CC      /tmp/tmp.ZVxz3l2AAH/bench/epoll-ctl.o
  CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/prctl.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/util/
  CC      /tmp/tmp.ZVxz3l2AAH/util/block-info.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/annotate.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/arch-tests.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/sample-parsing.o
  CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/renameat.o
  CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/sockaddr.o
  CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/socket.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/vmlinux-kallsyms.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/openat-syscall.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/openat-syscall-all-cpus.o
  CC      /tmp/tmp.ZVxz3l2AAH/bench/kallsyms-parse.o
  CC      /tmp/tmp.ZVxz3l2AAH/bench/synthesize.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/
  MKDIR   /tmp/tmp.ZVxz3l2AAH/scripts/perl/Perf-Trace-Util/
  CC      /tmp/tmp.ZVxz3l2AAH/ui/setup.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/pmu.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/kvm-stat.o
  CC      /tmp/tmp.ZVxz3l2AAH/scripts/perl/Perf-Trace-Util/Context.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/perf_regs.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/insn-x86.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/intel-pt-test.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/bp-modify.o
  CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/statx.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/openat-syscall-tp-fields.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/block-range.o
  CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/sync_file_range.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/mmap-basic.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/perf-record.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/topdown.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/machine.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/evsel-roundtrip-name.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/evsel-tp-sched.o
  CC      /tmp/tmp.ZVxz3l2AAH/builtin-probe.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/fdarray.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/pmu.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/event.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/evlist.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/mem-events.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/
  CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/timespec.o
  CC      /tmp/tmp.ZVxz3l2AAH/ui/helpline.o
  CC      /tmp/tmp.ZVxz3l2AAH/ui/progress.o
  CC      /tmp/tmp.ZVxz3l2AAH/bench/find-bit-bench.o
  CC      /tmp/tmp.ZVxz3l2AAH/bench/inject-buildid.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/scripts/python/Perf-Trace-Util/
  CC      /tmp/tmp.ZVxz3l2AAH/ui/util.o
  CC      /tmp/tmp.ZVxz3l2AAH/scripts/python/Perf-Trace-Util/Context.o
  LD      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/perf-in.o
  CC      /tmp/tmp.ZVxz3l2AAH/ui/hist.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/build-id.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/pmu-events.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/cacheline.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/trace/beauty/tracepoints/
  MKDIR   /tmp/tmp.ZVxz3l2AAH/trace/beauty/tracepoints/
  CC      /tmp/tmp.ZVxz3l2AAH/tests/hists_common.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/evsel.o
  CC      /tmp/tmp.ZVxz3l2AAH/bench/evlist-open-close.o
  CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/tracepoints/x86_irq_vectors.o
  CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/tracepoints/x86_msr.o
  CC      /tmp/tmp.ZVxz3l2AAH/bench/breakpoint.o
  CC      /tmp/tmp.ZVxz3l2AAH/bench/mem-memcpy-x86-64-asm.o
  CC      /tmp/tmp.ZVxz3l2AAH/bench/mem-memset-x86-64-asm.o
  CC      /tmp/tmp.ZVxz3l2AAH/bench/numa.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/stdio/
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/iostat.o
  CC      /tmp/tmp.ZVxz3l2AAH/ui/browser.o
  CC      /tmp/tmp.ZVxz3l2AAH/ui/stdio/hist.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/browsers/
  MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/browsers/
  CC      /tmp/tmp.ZVxz3l2AAH/util/config.o
  CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/annotate.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/browsers/
  CC      /tmp/tmp.ZVxz3l2AAH/util/copyfile.o
  CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/hists.o
  CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/map.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/ctype.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/db-export.o
  CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/scripts.o
  CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/header.o
  LD      /tmp/tmp.ZVxz3l2AAH/trace/beauty/tracepoints/perf-in.o
  CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/res_sample.o
  LD      /tmp/tmp.ZVxz3l2AAH/trace/beauty/perf-in.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/tui/
  CC      /tmp/tmp.ZVxz3l2AAH/ui/tui/setup.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/hists_link.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/hists_filter.o
  CC      /tmp/tmp.ZVxz3l2AAH/perf.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/dwarf-regs.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/tui/
  CC      /tmp/tmp.ZVxz3l2AAH/ui/tui/util.o
  CC      /tmp/tmp.ZVxz3l2AAH/ui/tui/helpline.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/unwind-libunwind.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/auxtrace.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/env.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/hists_output.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/hists_cumulate.o
  LD      /tmp/tmp.ZVxz3l2AAH/scripts/perl/Perf-Trace-Util/perf-in.o
  CC      /tmp/tmp.ZVxz3l2AAH/ui/tui/progress.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/python-use.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/bp_signal.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/bp_signal_overflow.o
  LD      /tmp/tmp.ZVxz3l2AAH/scripts/python/Perf-Trace-Util/perf-in.o
  LD      /tmp/tmp.ZVxz3l2AAH/scripts/perf-in.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/bp_account.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/event.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/evlist.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/wp.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/task-exit.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/sw-clock.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/archinsn.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/intel-pt.o
  CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/intel-bts.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/mmap-thread-lookup.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/thread-maps-share.o
  LD      /tmp/tmp.ZVxz3l2AAH/ui/tui/perf-in.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/evlist-hybrid.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/sideband_evlist.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/switch-tracking.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/evsel.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/keep-tracking.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/code-reading.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/evsel_fprintf.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/sample-parsing.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/parse-no-sample-id-all.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/kmod-path.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/perf_event_attr_fprintf.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/evswitch.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/find_bit.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/get_current_dir_name.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/thread-map.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/levenshtein.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/llvm-utils.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/llvm.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/mmap.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/memswap.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/bpf.o
  BISON   /tmp/tmp.ZVxz3l2AAH/util/parse-events-bison.c
  CC      /tmp/tmp.ZVxz3l2AAH/tests/topology.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/mem.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/parse-events-hybrid.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/print-events.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/tracepoint.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/cpumap.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/stat.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/perf_regs.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/event_update.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/event-times.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/path.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/expr.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/print_binary.o
  LD      /tmp/tmp.ZVxz3l2AAH/bench/perf-in.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/rlimit.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/backward-ring-buffer.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/argv_split.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/rbtree.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/libstring.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/bitmap.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/hweight.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/smt.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/strbuf.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/sdt.o
  LD      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/perf-in.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/is_printable_array.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/string.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/strlist.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/bitmap.o
  LD      /tmp/tmp.ZVxz3l2AAH/arch/x86/perf-in.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/strfilter.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/perf-hooks.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/clang.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/unit_number__scnprintf.o
  LD      /tmp/tmp.ZVxz3l2AAH/arch/perf-in.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/mem2node.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/maps.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/time-utils-test.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/genelf.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/api-io.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/demangle-java-test.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/top.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/demangle-ocaml-test.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/usage.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/pfm.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/dso.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/dsos.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/parse-metric.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/symbol.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/symbol_fprintf.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/pe-file-parsing.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/color.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/color_config.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/expand-cgroup.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/perf-time-to-tsc.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/dlfilter-test.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/metricgroup.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/header.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/callchain.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/values.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/sigtrap.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/debug.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/fncache.o
  CC      /tmp/tmp.ZVxz3l2AAH/pmu-events/pmu-events.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/machine.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/event_groups.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/dwarf-unwind.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/tests/workloads/
  CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/noploop.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/tests/workloads/
  CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/thloop.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/map.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/leafloop.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/maps.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/llvm-src-base.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/pstack.o
  LD      /tmp/tmp.ZVxz3l2AAH/ui/browsers/perf-in.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/session.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/sample-raw.o
  LD      /tmp/tmp.ZVxz3l2AAH/ui/perf-in.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/llvm-src-kbuild.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/s390-sample-raw.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/llvm-src-prologue.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/sqrtloop.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/llvm-src-relocation.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/brstack.o
  CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/datasym.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/amd-sample-raw.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/syscalltbl.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/ordered-events.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/namespaces.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/comm.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/thread.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/thread_map.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/parse-events-bison.o
  BISON   /tmp/tmp.ZVxz3l2AAH/util/pmu-bison.c
  CC      /tmp/tmp.ZVxz3l2AAH/util/pmus.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/pmu-hybrid.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/svghelper.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/trace-event-info.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/trace-event-scripting.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/trace-event.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/trace-event-parse.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/trace-event-read.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/sort.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/hist.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/util.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/cpumap.o
  LD      /tmp/tmp.ZVxz3l2AAH/tests/workloads/perf-in.o
  LD      /tmp/tmp.ZVxz3l2AAH/tests/perf-in.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/affinity.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/cputopo.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/cgroup.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/target.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/rblist.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/intlist.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/vdso.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/counts.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/stat.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/stat-shadow.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/stat-display.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/perf_api_probe.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/record.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/srcline.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/srccode.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/synthetic-events.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/data.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/tsc.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/cloexec.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/call-path.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/rwsem.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/thread-stack.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/spark.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/topdown.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/iostat.o
  LD      /tmp/tmp.ZVxz3l2AAH/pmu-events/pmu-events-in.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/auxtrace.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/stream.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/
  CC      /tmp/tmp.ZVxz3l2AAH/util/intel-pt.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/util/arm-spe-decoder/
  MKDIR   /tmp/tmp.ZVxz3l2AAH/util/arm-spe-decoder/
  MKDIR   /tmp/tmp.ZVxz3l2AAH/util/scripting-engines/
  MKDIR   /tmp/tmp.ZVxz3l2AAH/util/hisi-ptt-decoder/
  CC      /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/intel-pt-pkt-decoder.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/arm-spe-decoder/arm-spe-decoder.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/scripting-engines/trace-event-perl.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/arm-spe-decoder/arm-spe-pkt-decoder.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.o
  MKDIR   /tmp/tmp.ZVxz3l2AAH/util/scripting-engines/
  MKDIR   /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/
  CC      /tmp/tmp.ZVxz3l2AAH/util/intel-bts.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/intel-pt-log.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/scripting-engines/trace-event-python.o
  GEN     /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/inat-tables.c
  CC      /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/intel-pt-decoder.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/arm-spe.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/hisi-ptt.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/s390-cpumsf.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/cs-etm-base.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/parse-branch-options.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/dump-insn.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/parse-regs-options.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/intel-pt-insn-decoder.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/parse-sublevel-options.o
  LD      /tmp/tmp.ZVxz3l2AAH/util/hisi-ptt-decoder/perf-in.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/term.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/help-unknown-cmd.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/dlfilter.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/mem-events.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/vsprintf.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/units.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/time-utils.o
  LD      /tmp/tmp.ZVxz3l2AAH/util/arm-spe-decoder/perf-in.o
  BISON   /tmp/tmp.ZVxz3l2AAH/util/expr-bison.c
  CC      /tmp/tmp.ZVxz3l2AAH/util/branch.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/mem2node.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/clockid.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/list_sort.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/mutex.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/bpf-loader.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/bpf_map.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/bpf-prologue.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/symbol-elf.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/probe-file.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/probe-event.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/hashmap.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/probe-finder.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/dwarf-aux.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/dwarf-regs.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/unwind-libunwind-local.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/unwind-libunwind.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/data-convert-bt.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/data-convert-json.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/zlib.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/lzma.o
  CC      /tmp/tmp.ZVxz3l2AAH/util/zstd.o
util/bpf-loader.c:36:5: error: no previous prototype for ‘bpf_program__set_insns’ [-Werror=missing-prototypes]
   36 | int bpf_program__set_insns(struct bpf_program *prog __maybe_unused,
      |     ^~~~~~~~~~~~~~~~~~~~~~
util/bpf-loader.c:46:47: error: ‘struct libbpf_prog_handler_opts’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
   46 |                                  const struct libbpf_prog_handler_opts *opts __maybe_unused)
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~
util/bpf-loader.c:43:5: error: no previous prototype for ‘libbpf_register_prog_handler’ [-Werror=missing-prototypes]
   43 | int libbpf_register_prog_handler(const char *sec __maybe_unused,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/bpf/libbpf.h:20,
                 from util/bpf-loader.c:10:
util/bpf-loader.c: In function ‘libbpf_init’:
util/bpf-loader.c:179:21: error: variable ‘handler_opts’ has initializer but incomplete type
  179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~
util/bpf-loader.c:179:9: error: invalid application of ‘sizeof’ to incomplete type ‘struct libbpf_prog_handler_opts’
  179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
      |         ^~~~~~~~~~~
util/bpf-loader.c:179:9: error: ‘struct libbpf_prog_handler_opts’ has no member named ‘sz’
  179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
      |         ^~~~~~~~~~~
util/bpf-loader.c:179:9: error: invalid application of ‘sizeof’ to incomplete type ‘struct libbpf_prog_handler_opts’
  179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
      |         ^~~~~~~~~~~
util/bpf-loader.c:179:9: error: excess elements in struct initializer [-Werror]
  179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
      |         ^~~~~~~~~~~
util/bpf-loader.c:179:9: note: (near initialization for ‘(anonymous)’)
util/bpf-loader.c:180:18: error: ‘struct libbpf_prog_handler_opts’ has no member named ‘prog_prepare_load_fn’
  180 |                 .prog_prepare_load_fn = libbpf_prog_prepare_load_fn,
      |                  ^~~~~~~~~~~~~~~~~~~~
util/bpf-loader.c:180:41: error: excess elements in struct initializer [-Werror]
  180 |                 .prog_prepare_load_fn = libbpf_prog_prepare_load_fn,
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
util/bpf-loader.c:180:41: note: (near initialization for ‘(anonymous)’)
util/bpf-loader.c:179:9: error: invalid use of undefined type ‘struct libbpf_prog_handler_opts’
  179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
      |         ^~~~~~~~~~~
util/bpf-loader.c:179:47: error: storage size of ‘handler_opts’ isn’t known
  179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
      |                                               ^~~~~~~~~~~~
cc1: all warnings being treated as errors
make[6]: *** [/var/home/acme/git/perf-urgent/tools/build/Makefile.build:97: /tmp/tmp.ZVxz3l2AAH/util/bpf-loader.o] Error 1
make[6]: *** Waiting for unfinished jobs....
  LD      /tmp/tmp.ZVxz3l2AAH/util/scripting-engines/perf-in.o
  LD      /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/perf-in.o
make[5]: *** [/var/home/acme/git/perf-urgent/tools/build/Makefile.build:139: util] Error 2
make[4]: *** [Makefile.perf:673: /tmp/tmp.ZVxz3l2AAH/perf-in.o] Error 2
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [Makefile.perf:236: sub-make] Error 2
make[2]: *** [Makefile:70: all] Error 2
make[1]: *** [tests/make:337: make_libbpf_dynamic_O] Error 1
make: *** [Makefile:103: build-test] Error 2
make: Leaving directory '/var/home/acme/git/perf-urgent/tools/perf'

real	4m10.450s
user	40m3.640s
sys	9m30.945s
⬢[acme@toolbox perf-urgent]$



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v3 1/2] perf build: Properly guard libbpf includes
  2023-01-06 17:53     ` Arnaldo Carvalho de Melo
@ 2023-01-06 17:55       ` Arnaldo Carvalho de Melo
  2023-01-06 19:06         ` Ian Rogers
  2023-01-06 17:57       ` Ian Rogers
  1 sibling, 1 reply; 20+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-01-06 17:55 UTC (permalink / raw)
  To: Mike Leach
  Cc: Ian Rogers, linux-perf-users, linux-kernel, bpf, peterz, mingo,
	mark.rutland, alexander.shishkin, jolsa, namhyung

Em Fri, Jan 06, 2023 at 02:53:44PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Jan 06, 2023 at 02:25:05PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Fri, Jan 06, 2023 at 03:28:03PM +0000, Mike Leach escreveu:
> > > On Fri, 6 Jan 2023 at 15:13, Ian Rogers <irogers@google.com> wrote:
> > > >
> > > > Including libbpf header files should be guarded by
> > > > HAVE_LIBBPF_SUPPORT. In bpf_counter.h, move the skeleton utilities
> > > > under HAVE_BPF_SKEL.
> > > >
> > > > Fixes: d6a735ef3277 ("perf bpf_counter: Move common functions to bpf_counter.h")
> > > > Reported-by: Mike Leach <mike.leach@linaro.org>
> > > > Signed-off-by: Ian Rogers <irogers@google.com>
> > 
> > Thanks, applied.
> 
> Failing on 'make -C tools/perf build-test', please run it before sending
> patches,

Its one of the two patches, I just removed the last one to try without
it.
 
> - Arnaldo
> 
>       make_libbpf_dynamic_O: cd . && make LIBBPF_DYNAMIC=1 FEATURES_DUMP=/var/home/acme/git/perf-urgent/tools/perf/BUILD_TEST_FEATURE_DUMP -j32 O=/tmp/tmp.ZVxz3l2AAH DESTDIR=/tmp/tmp.PDlsV7dzQr
> ldd: /tmp/tmp.ZVxz3l2AAH/perf: No such file or directory
> cd . && make LIBBPF_DYNAMIC=1 FEATURES_DUMP=/var/home/acme/git/perf-urgent/tools/perf/BUILD_TEST_FEATURE_DUMP -j32 O=/tmp/tmp.ZVxz3l2AAH DESTDIR=/tmp/tmp.PDlsV7dzQr
>   BUILD:   Doing 'make -j32' parallel build
>   HOSTCC  /tmp/tmp.ZVxz3l2AAH/fixdep.o
>   HOSTLD  /tmp/tmp.ZVxz3l2AAH/fixdep-in.o
>   LINK    /tmp/tmp.ZVxz3l2AAH/fixdep
> Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
> diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
> Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/perf_regs.h' differs from latest version at 'arch/arm64/include/uapi/asm/perf_regs.h'
> diff -u tools/arch/arm64/include/uapi/asm/perf_regs.h arch/arm64/include/uapi/asm/perf_regs.h
> Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h'
> diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h
> Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h'
> diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h
> Warning: Kernel ABI header at 'tools/arch/arm64/include/asm/cputype.h' differs from latest version at 'arch/arm64/include/asm/cputype.h'
> diff -u tools/arch/arm64/include/asm/cputype.h arch/arm64/include/asm/cputype.h
> Warning: Kernel ABI header at 'tools/include/linux/build_bug.h' differs from latest version at 'include/linux/build_bug.h'
> diff -u tools/include/linux/build_bug.h include/linux/build_bug.h
> Warning: Kernel ABI header at 'tools/perf/trace/beauty/include/linux/socket.h' differs from latest version at 'include/linux/socket.h'
> diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h
> Makefile.config:1147: No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel
> 
>   GEN     /tmp/tmp.ZVxz3l2AAH/common-cmds.h
>   CC      /tmp/tmp.ZVxz3l2AAH/perf-read-vdso32
>   CC      /tmp/tmp.ZVxz3l2AAH/dlfilters/dlfilter-test-api-v0.o
>   CC      /tmp/tmp.ZVxz3l2AAH/dlfilters/dlfilter-show-cycles.o
>   LINK    /tmp/tmp.ZVxz3l2AAH/dlfilters/dlfilter-show-cycles.so
>   LINK    /tmp/tmp.ZVxz3l2AAH/dlfilters/dlfilter-test-api-v0.so
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libsubcmd/include/subcmd/exec-cmd.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libsubcmd/include/subcmd/help.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libsubcmd/include/subcmd/pager.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libsubcmd/include/subcmd/parse-options.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libsubcmd/include/subcmd/run-command.h
>   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/exec-cmd.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/help.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/pager.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/parse-options.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/run-command.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/sigchain.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/subcmd-config.o
>   INSTALL libsubcmd_headers
>   PERF_VERSION = 6.2.rc2.g449a50dbf82a
>   GEN     perf-archive
>   GEN     perf-iostat
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/bpf_perf.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/core.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/cpumap.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libsymbol/include/symbol/kallsyms.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/cpu.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/threadmap.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/debug.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/evlist.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/io.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/evsel.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/fd/array.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/event.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/fs/fs.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/mmap.h
>   CC      /tmp/tmp.ZVxz3l2AAH/libperf/core.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libsymbol/kallsyms.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libperf/cpumap.o
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/cpumap.h
>   CC      /tmp/tmp.ZVxz3l2AAH/libperf/threadmap.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/libapi/fd/
>   CC      /tmp/tmp.ZVxz3l2AAH/libperf/evsel.o
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/evlist.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/evsel.h
>   CC      /tmp/tmp.ZVxz3l2AAH/libapi/cpu.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libperf/evlist.o
>   INSTALL libsymbol_headers
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/fs/tracing_path.h
>   CC      /tmp/tmp.ZVxz3l2AAH/libapi/debug.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libperf/mmap.o
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/lib.h
>   CC      /tmp/tmp.ZVxz3l2AAH/libapi/str_error_r.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libperf/zalloc.o
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/mmap.h
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/libapi/fs/
>   CC      /tmp/tmp.ZVxz3l2AAH/libperf/xyarray.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libperf/lib.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libapi/fd/array.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/libapi/fs/
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/libapi/fs/
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/threadmap.h
>   INSTALL libapi_headers
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/xyarray.h
>   CC      /tmp/tmp.ZVxz3l2AAH/libapi/fs/fs.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libapi/fs/tracing_path.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libapi/fs/cgroup.o
>   INSTALL libperf_headers
>   LD      /tmp/tmp.ZVxz3l2AAH/libapi/fd/libapi-in.o
>   LD      /tmp/tmp.ZVxz3l2AAH/libsymbol/libsymbol-in.o
>   AR      /tmp/tmp.ZVxz3l2AAH/libsymbol/libsymbol.a
>   LD      /tmp/tmp.ZVxz3l2AAH/libapi/fs/libapi-in.o
>   LD      /tmp/tmp.ZVxz3l2AAH/libapi/libapi-in.o
>   AR      /tmp/tmp.ZVxz3l2AAH/libapi/libapi.a
>   LD      /tmp/tmp.ZVxz3l2AAH/libperf/libperf-in.o
>   AR      /tmp/tmp.ZVxz3l2AAH/libperf/libperf.a
>   GEN     /tmp/tmp.ZVxz3l2AAH/python/perf.cpython-310-x86_64-linux-gnu.so
>   LD      /tmp/tmp.ZVxz3l2AAH/libsubcmd/libsubcmd-in.o
>   AR      /tmp/tmp.ZVxz3l2AAH/libsubcmd/libsubcmd.a
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-bench.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-annotate.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-config.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-diff.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-evlist.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-ftrace.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-help.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-buildid-list.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-buildid-cache.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-kallsyms.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-list.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-record.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-report.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-stat.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-top.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-script.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-kvm.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-inject.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-mem.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/pmu-events/
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-data.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-version.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-c2c.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-daemon.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-kmem.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-kwork.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-lock.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-sched.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-timechart.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-trace.o
>   GEN     /tmp/tmp.ZVxz3l2AAH/pmu-events/pmu-events.c
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/clone.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/fcntl.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/flock.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/fsmount.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/fspick.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/ioctl.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/bench/
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/sched-messaging.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/bench/
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/syscall.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/sched-pipe.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/mem-functions.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/futex-hash.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/futex-wake.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/futex-wake-parallel.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/kcmp.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/futex-requeue.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/futex-lock-pi.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/tests/
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/builtin-test.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/tests/
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/builtin-test-list.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/mount_flags.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/
>   CC      /tmp/tmp.ZVxz3l2AAH/util/arm64-frame-pointer-unwind-support.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/move_mount.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/pkey_alloc.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/common.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/parse-events.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/arch/x86/util/
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/header.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/dso-data.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/attr.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/regs_load.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/dwarf-unwind.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/arch/x86/util/
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/tsc.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/epoll-wait.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/arch_prctl.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/epoll-ctl.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/prctl.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/
>   CC      /tmp/tmp.ZVxz3l2AAH/util/block-info.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/annotate.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/arch-tests.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/sample-parsing.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/renameat.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/sockaddr.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/socket.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/vmlinux-kallsyms.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/openat-syscall.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/openat-syscall-all-cpus.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/kallsyms-parse.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/synthesize.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/scripts/perl/Perf-Trace-Util/
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/setup.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/pmu.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/kvm-stat.o
>   CC      /tmp/tmp.ZVxz3l2AAH/scripts/perl/Perf-Trace-Util/Context.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/perf_regs.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/insn-x86.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/intel-pt-test.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/bp-modify.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/statx.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/openat-syscall-tp-fields.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/block-range.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/sync_file_range.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/mmap-basic.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/perf-record.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/topdown.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/machine.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/evsel-roundtrip-name.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/evsel-tp-sched.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-probe.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/fdarray.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/pmu.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/event.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/evlist.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/mem-events.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/timespec.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/helpline.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/progress.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/find-bit-bench.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/inject-buildid.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/scripts/python/Perf-Trace-Util/
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/util.o
>   CC      /tmp/tmp.ZVxz3l2AAH/scripts/python/Perf-Trace-Util/Context.o
>   LD      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/hist.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/build-id.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/pmu-events.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/cacheline.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/trace/beauty/tracepoints/
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/trace/beauty/tracepoints/
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/hists_common.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/evsel.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/evlist-open-close.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/tracepoints/x86_irq_vectors.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/tracepoints/x86_msr.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/breakpoint.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/mem-memcpy-x86-64-asm.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/mem-memset-x86-64-asm.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/numa.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/stdio/
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/iostat.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/browser.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/stdio/hist.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/browsers/
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/browsers/
>   CC      /tmp/tmp.ZVxz3l2AAH/util/config.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/annotate.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/browsers/
>   CC      /tmp/tmp.ZVxz3l2AAH/util/copyfile.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/hists.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/map.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/ctype.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/db-export.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/scripts.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/header.o
>   LD      /tmp/tmp.ZVxz3l2AAH/trace/beauty/tracepoints/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/res_sample.o
>   LD      /tmp/tmp.ZVxz3l2AAH/trace/beauty/perf-in.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/tui/
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/tui/setup.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/hists_link.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/hists_filter.o
>   CC      /tmp/tmp.ZVxz3l2AAH/perf.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/dwarf-regs.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/tui/
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/tui/util.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/tui/helpline.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/unwind-libunwind.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/auxtrace.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/env.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/hists_output.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/hists_cumulate.o
>   LD      /tmp/tmp.ZVxz3l2AAH/scripts/perl/Perf-Trace-Util/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/tui/progress.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/python-use.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/bp_signal.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/bp_signal_overflow.o
>   LD      /tmp/tmp.ZVxz3l2AAH/scripts/python/Perf-Trace-Util/perf-in.o
>   LD      /tmp/tmp.ZVxz3l2AAH/scripts/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/bp_account.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/event.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/evlist.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/wp.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/task-exit.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/sw-clock.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/archinsn.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/intel-pt.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/intel-bts.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/mmap-thread-lookup.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/thread-maps-share.o
>   LD      /tmp/tmp.ZVxz3l2AAH/ui/tui/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/evlist-hybrid.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/sideband_evlist.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/switch-tracking.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/evsel.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/keep-tracking.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/code-reading.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/evsel_fprintf.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/sample-parsing.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/parse-no-sample-id-all.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/kmod-path.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/perf_event_attr_fprintf.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/evswitch.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/find_bit.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/get_current_dir_name.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/thread-map.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/levenshtein.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/llvm-utils.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/llvm.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/mmap.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/memswap.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/bpf.o
>   BISON   /tmp/tmp.ZVxz3l2AAH/util/parse-events-bison.c
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/topology.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/mem.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/parse-events-hybrid.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/print-events.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/tracepoint.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/cpumap.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/stat.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/perf_regs.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/event_update.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/event-times.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/path.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/expr.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/print_binary.o
>   LD      /tmp/tmp.ZVxz3l2AAH/bench/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/rlimit.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/backward-ring-buffer.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/argv_split.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/rbtree.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/libstring.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/bitmap.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/hweight.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/smt.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/strbuf.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/sdt.o
>   LD      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/is_printable_array.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/string.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/strlist.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/bitmap.o
>   LD      /tmp/tmp.ZVxz3l2AAH/arch/x86/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/strfilter.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/perf-hooks.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/clang.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/unit_number__scnprintf.o
>   LD      /tmp/tmp.ZVxz3l2AAH/arch/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/mem2node.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/maps.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/time-utils-test.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/genelf.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/api-io.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/demangle-java-test.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/top.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/demangle-ocaml-test.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/usage.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/pfm.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/dso.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/dsos.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/parse-metric.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/symbol.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/symbol_fprintf.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/pe-file-parsing.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/color.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/color_config.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/expand-cgroup.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/perf-time-to-tsc.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/dlfilter-test.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/metricgroup.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/header.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/callchain.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/values.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/sigtrap.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/debug.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/fncache.o
>   CC      /tmp/tmp.ZVxz3l2AAH/pmu-events/pmu-events.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/machine.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/event_groups.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/dwarf-unwind.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/tests/workloads/
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/noploop.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/tests/workloads/
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/thloop.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/map.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/leafloop.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/maps.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/llvm-src-base.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/pstack.o
>   LD      /tmp/tmp.ZVxz3l2AAH/ui/browsers/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/session.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/sample-raw.o
>   LD      /tmp/tmp.ZVxz3l2AAH/ui/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/llvm-src-kbuild.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/s390-sample-raw.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/llvm-src-prologue.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/sqrtloop.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/llvm-src-relocation.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/brstack.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/datasym.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/amd-sample-raw.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/syscalltbl.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/ordered-events.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/namespaces.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/comm.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/thread.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/thread_map.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/parse-events-bison.o
>   BISON   /tmp/tmp.ZVxz3l2AAH/util/pmu-bison.c
>   CC      /tmp/tmp.ZVxz3l2AAH/util/pmus.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/pmu-hybrid.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/svghelper.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/trace-event-info.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/trace-event-scripting.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/trace-event.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/trace-event-parse.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/trace-event-read.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/sort.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/hist.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/util.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/cpumap.o
>   LD      /tmp/tmp.ZVxz3l2AAH/tests/workloads/perf-in.o
>   LD      /tmp/tmp.ZVxz3l2AAH/tests/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/affinity.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/cputopo.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/cgroup.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/target.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/rblist.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/intlist.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/vdso.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/counts.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/stat.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/stat-shadow.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/stat-display.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/perf_api_probe.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/record.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/srcline.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/srccode.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/synthetic-events.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/data.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/tsc.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/cloexec.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/call-path.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/rwsem.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/thread-stack.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/spark.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/topdown.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/iostat.o
>   LD      /tmp/tmp.ZVxz3l2AAH/pmu-events/pmu-events-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/auxtrace.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/stream.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/
>   CC      /tmp/tmp.ZVxz3l2AAH/util/intel-pt.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/arm-spe-decoder/
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/arm-spe-decoder/
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/scripting-engines/
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/hisi-ptt-decoder/
>   CC      /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/intel-pt-pkt-decoder.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/arm-spe-decoder/arm-spe-decoder.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/scripting-engines/trace-event-perl.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/arm-spe-decoder/arm-spe-pkt-decoder.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/scripting-engines/
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/
>   CC      /tmp/tmp.ZVxz3l2AAH/util/intel-bts.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/intel-pt-log.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/scripting-engines/trace-event-python.o
>   GEN     /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/inat-tables.c
>   CC      /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/intel-pt-decoder.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/arm-spe.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/hisi-ptt.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/s390-cpumsf.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/cs-etm-base.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/parse-branch-options.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/dump-insn.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/parse-regs-options.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/intel-pt-insn-decoder.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/parse-sublevel-options.o
>   LD      /tmp/tmp.ZVxz3l2AAH/util/hisi-ptt-decoder/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/term.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/help-unknown-cmd.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/dlfilter.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/mem-events.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/vsprintf.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/units.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/time-utils.o
>   LD      /tmp/tmp.ZVxz3l2AAH/util/arm-spe-decoder/perf-in.o
>   BISON   /tmp/tmp.ZVxz3l2AAH/util/expr-bison.c
>   CC      /tmp/tmp.ZVxz3l2AAH/util/branch.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/mem2node.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/clockid.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/list_sort.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/mutex.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/bpf-loader.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/bpf_map.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/bpf-prologue.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/symbol-elf.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/probe-file.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/probe-event.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/hashmap.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/probe-finder.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/dwarf-aux.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/dwarf-regs.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/unwind-libunwind-local.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/unwind-libunwind.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/data-convert-bt.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/data-convert-json.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/zlib.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/lzma.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/zstd.o
> util/bpf-loader.c:36:5: error: no previous prototype for ‘bpf_program__set_insns’ [-Werror=missing-prototypes]
>    36 | int bpf_program__set_insns(struct bpf_program *prog __maybe_unused,
>       |     ^~~~~~~~~~~~~~~~~~~~~~
> util/bpf-loader.c:46:47: error: ‘struct libbpf_prog_handler_opts’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
>    46 |                                  const struct libbpf_prog_handler_opts *opts __maybe_unused)
>       |                                               ^~~~~~~~~~~~~~~~~~~~~~~~
> util/bpf-loader.c:43:5: error: no previous prototype for ‘libbpf_register_prog_handler’ [-Werror=missing-prototypes]
>    43 | int libbpf_register_prog_handler(const char *sec __maybe_unused,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from /usr/include/bpf/libbpf.h:20,
>                  from util/bpf-loader.c:10:
> util/bpf-loader.c: In function ‘libbpf_init’:
> util/bpf-loader.c:179:21: error: variable ‘handler_opts’ has initializer but incomplete type
>   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~
> util/bpf-loader.c:179:9: error: invalid application of ‘sizeof’ to incomplete type ‘struct libbpf_prog_handler_opts’
>   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
>       |         ^~~~~~~~~~~
> util/bpf-loader.c:179:9: error: ‘struct libbpf_prog_handler_opts’ has no member named ‘sz’
>   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
>       |         ^~~~~~~~~~~
> util/bpf-loader.c:179:9: error: invalid application of ‘sizeof’ to incomplete type ‘struct libbpf_prog_handler_opts’
>   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
>       |         ^~~~~~~~~~~
> util/bpf-loader.c:179:9: error: excess elements in struct initializer [-Werror]
>   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
>       |         ^~~~~~~~~~~
> util/bpf-loader.c:179:9: note: (near initialization for ‘(anonymous)’)
> util/bpf-loader.c:180:18: error: ‘struct libbpf_prog_handler_opts’ has no member named ‘prog_prepare_load_fn’
>   180 |                 .prog_prepare_load_fn = libbpf_prog_prepare_load_fn,
>       |                  ^~~~~~~~~~~~~~~~~~~~
> util/bpf-loader.c:180:41: error: excess elements in struct initializer [-Werror]
>   180 |                 .prog_prepare_load_fn = libbpf_prog_prepare_load_fn,
>       |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> util/bpf-loader.c:180:41: note: (near initialization for ‘(anonymous)’)
> util/bpf-loader.c:179:9: error: invalid use of undefined type ‘struct libbpf_prog_handler_opts’
>   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
>       |         ^~~~~~~~~~~
> util/bpf-loader.c:179:47: error: storage size of ‘handler_opts’ isn’t known
>   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
>       |                                               ^~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[6]: *** [/var/home/acme/git/perf-urgent/tools/build/Makefile.build:97: /tmp/tmp.ZVxz3l2AAH/util/bpf-loader.o] Error 1
> make[6]: *** Waiting for unfinished jobs....
>   LD      /tmp/tmp.ZVxz3l2AAH/util/scripting-engines/perf-in.o
>   LD      /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/perf-in.o
> make[5]: *** [/var/home/acme/git/perf-urgent/tools/build/Makefile.build:139: util] Error 2
> make[4]: *** [Makefile.perf:673: /tmp/tmp.ZVxz3l2AAH/perf-in.o] Error 2
> make[4]: *** Waiting for unfinished jobs....
> make[3]: *** [Makefile.perf:236: sub-make] Error 2
> make[2]: *** [Makefile:70: all] Error 2
> make[1]: *** [tests/make:337: make_libbpf_dynamic_O] Error 1
> make: *** [Makefile:103: build-test] Error 2
> make: Leaving directory '/var/home/acme/git/perf-urgent/tools/perf'
> 
> real	4m10.450s
> user	40m3.640s
> sys	9m30.945s
> ⬢[acme@toolbox perf-urgent]$
> 

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v3 1/2] perf build: Properly guard libbpf includes
  2023-01-06 17:53     ` Arnaldo Carvalho de Melo
  2023-01-06 17:55       ` Arnaldo Carvalho de Melo
@ 2023-01-06 17:57       ` Ian Rogers
  1 sibling, 0 replies; 20+ messages in thread
From: Ian Rogers @ 2023-01-06 17:57 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Mike Leach, linux-perf-users, linux-kernel, bpf, peterz, mingo,
	mark.rutland, alexander.shishkin, jolsa, namhyung

On Fri, Jan 6, 2023 at 9:53 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>
> Em Fri, Jan 06, 2023 at 02:25:05PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Fri, Jan 06, 2023 at 03:28:03PM +0000, Mike Leach escreveu:
> > > On Fri, 6 Jan 2023 at 15:13, Ian Rogers <irogers@google.com> wrote:
> > > >
> > > > Including libbpf header files should be guarded by
> > > > HAVE_LIBBPF_SUPPORT. In bpf_counter.h, move the skeleton utilities
> > > > under HAVE_BPF_SKEL.
> > > >
> > > > Fixes: d6a735ef3277 ("perf bpf_counter: Move common functions to bpf_counter.h")
> > > > Reported-by: Mike Leach <mike.leach@linaro.org>
> > > > Signed-off-by: Ian Rogers <irogers@google.com>
> >
> > Thanks, applied.
>
> Failing on 'make -C tools/perf build-test', please run it before sending
> patches,
>
> - Arnaldo
>
>       make_libbpf_dynamic_O: cd . && make LIBBPF_DYNAMIC=1 FEATURES_DUMP=/var/home/acme/git/perf-urgent/tools/perf/BUILD_TEST_FEATURE_DUMP -j32 O=/tmp/tmp.ZVxz3l2AAH DESTDIR=/tmp/tmp.PDlsV7dzQr
> ldd: /tmp/tmp.ZVxz3l2AAH/perf: No such file or directory
> cd . && make LIBBPF_DYNAMIC=1 FEATURES_DUMP=/var/home/acme/git/perf-urgent/tools/perf/BUILD_TEST_FEATURE_DUMP -j32 O=/tmp/tmp.ZVxz3l2AAH DESTDIR=/tmp/tmp.PDlsV7dzQr
>   BUILD:   Doing 'make -j32' parallel build
>   HOSTCC  /tmp/tmp.ZVxz3l2AAH/fixdep.o
>   HOSTLD  /tmp/tmp.ZVxz3l2AAH/fixdep-in.o
>   LINK    /tmp/tmp.ZVxz3l2AAH/fixdep
> Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
> diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
> Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/perf_regs.h' differs from latest version at 'arch/arm64/include/uapi/asm/perf_regs.h'
> diff -u tools/arch/arm64/include/uapi/asm/perf_regs.h arch/arm64/include/uapi/asm/perf_regs.h
> Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h'
> diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h
> Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h'
> diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h
> Warning: Kernel ABI header at 'tools/arch/arm64/include/asm/cputype.h' differs from latest version at 'arch/arm64/include/asm/cputype.h'
> diff -u tools/arch/arm64/include/asm/cputype.h arch/arm64/include/asm/cputype.h
> Warning: Kernel ABI header at 'tools/include/linux/build_bug.h' differs from latest version at 'include/linux/build_bug.h'
> diff -u tools/include/linux/build_bug.h include/linux/build_bug.h
> Warning: Kernel ABI header at 'tools/perf/trace/beauty/include/linux/socket.h' differs from latest version at 'include/linux/socket.h'
> diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h
> Makefile.config:1147: No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel
>
>   GEN     /tmp/tmp.ZVxz3l2AAH/common-cmds.h
>   CC      /tmp/tmp.ZVxz3l2AAH/perf-read-vdso32
>   CC      /tmp/tmp.ZVxz3l2AAH/dlfilters/dlfilter-test-api-v0.o
>   CC      /tmp/tmp.ZVxz3l2AAH/dlfilters/dlfilter-show-cycles.o
>   LINK    /tmp/tmp.ZVxz3l2AAH/dlfilters/dlfilter-show-cycles.so
>   LINK    /tmp/tmp.ZVxz3l2AAH/dlfilters/dlfilter-test-api-v0.so
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libsubcmd/include/subcmd/exec-cmd.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libsubcmd/include/subcmd/help.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libsubcmd/include/subcmd/pager.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libsubcmd/include/subcmd/parse-options.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libsubcmd/include/subcmd/run-command.h
>   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/exec-cmd.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/help.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/pager.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/parse-options.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/run-command.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/sigchain.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/subcmd-config.o
>   INSTALL libsubcmd_headers
>   PERF_VERSION = 6.2.rc2.g449a50dbf82a
>   GEN     perf-archive
>   GEN     perf-iostat
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/bpf_perf.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/core.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/cpumap.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libsymbol/include/symbol/kallsyms.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/cpu.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/threadmap.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/debug.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/evlist.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/io.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/evsel.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/fd/array.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/event.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/fs/fs.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/mmap.h
>   CC      /tmp/tmp.ZVxz3l2AAH/libperf/core.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libsymbol/kallsyms.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libperf/cpumap.o
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/cpumap.h
>   CC      /tmp/tmp.ZVxz3l2AAH/libperf/threadmap.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/libapi/fd/
>   CC      /tmp/tmp.ZVxz3l2AAH/libperf/evsel.o
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/evlist.h
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/evsel.h
>   CC      /tmp/tmp.ZVxz3l2AAH/libapi/cpu.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libperf/evlist.o
>   INSTALL libsymbol_headers
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/fs/tracing_path.h
>   CC      /tmp/tmp.ZVxz3l2AAH/libapi/debug.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libperf/mmap.o
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/lib.h
>   CC      /tmp/tmp.ZVxz3l2AAH/libapi/str_error_r.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libperf/zalloc.o
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/mmap.h
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/libapi/fs/
>   CC      /tmp/tmp.ZVxz3l2AAH/libperf/xyarray.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libperf/lib.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libapi/fd/array.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/libapi/fs/
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/libapi/fs/
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/threadmap.h
>   INSTALL libapi_headers
>   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/xyarray.h
>   CC      /tmp/tmp.ZVxz3l2AAH/libapi/fs/fs.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libapi/fs/tracing_path.o
>   CC      /tmp/tmp.ZVxz3l2AAH/libapi/fs/cgroup.o
>   INSTALL libperf_headers
>   LD      /tmp/tmp.ZVxz3l2AAH/libapi/fd/libapi-in.o
>   LD      /tmp/tmp.ZVxz3l2AAH/libsymbol/libsymbol-in.o
>   AR      /tmp/tmp.ZVxz3l2AAH/libsymbol/libsymbol.a
>   LD      /tmp/tmp.ZVxz3l2AAH/libapi/fs/libapi-in.o
>   LD      /tmp/tmp.ZVxz3l2AAH/libapi/libapi-in.o
>   AR      /tmp/tmp.ZVxz3l2AAH/libapi/libapi.a
>   LD      /tmp/tmp.ZVxz3l2AAH/libperf/libperf-in.o
>   AR      /tmp/tmp.ZVxz3l2AAH/libperf/libperf.a
>   GEN     /tmp/tmp.ZVxz3l2AAH/python/perf.cpython-310-x86_64-linux-gnu.so
>   LD      /tmp/tmp.ZVxz3l2AAH/libsubcmd/libsubcmd-in.o
>   AR      /tmp/tmp.ZVxz3l2AAH/libsubcmd/libsubcmd.a
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-bench.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-annotate.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-config.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-diff.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-evlist.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-ftrace.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-help.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-buildid-list.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-buildid-cache.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-kallsyms.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-list.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-record.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-report.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-stat.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-top.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-script.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-kvm.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-inject.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-mem.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/pmu-events/
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-data.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-version.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-c2c.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-daemon.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-kmem.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-kwork.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-lock.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-sched.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-timechart.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-trace.o
>   GEN     /tmp/tmp.ZVxz3l2AAH/pmu-events/pmu-events.c
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/clone.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/fcntl.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/flock.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/fsmount.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/fspick.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/ioctl.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/bench/
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/sched-messaging.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/bench/
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/syscall.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/sched-pipe.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/mem-functions.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/futex-hash.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/futex-wake.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/futex-wake-parallel.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/kcmp.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/futex-requeue.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/futex-lock-pi.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/tests/
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/builtin-test.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/tests/
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/builtin-test-list.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/mount_flags.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/
>   CC      /tmp/tmp.ZVxz3l2AAH/util/arm64-frame-pointer-unwind-support.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/move_mount.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/pkey_alloc.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/common.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/parse-events.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/arch/x86/util/
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/header.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/dso-data.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/attr.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/regs_load.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/dwarf-unwind.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/arch/x86/util/
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/tsc.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/epoll-wait.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/arch_prctl.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/epoll-ctl.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/prctl.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/
>   CC      /tmp/tmp.ZVxz3l2AAH/util/block-info.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/annotate.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/arch-tests.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/sample-parsing.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/renameat.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/sockaddr.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/socket.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/vmlinux-kallsyms.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/openat-syscall.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/openat-syscall-all-cpus.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/kallsyms-parse.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/synthesize.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/scripts/perl/Perf-Trace-Util/
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/setup.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/pmu.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/kvm-stat.o
>   CC      /tmp/tmp.ZVxz3l2AAH/scripts/perl/Perf-Trace-Util/Context.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/perf_regs.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/insn-x86.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/intel-pt-test.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/bp-modify.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/statx.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/openat-syscall-tp-fields.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/block-range.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/sync_file_range.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/mmap-basic.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/perf-record.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/topdown.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/machine.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/evsel-roundtrip-name.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/evsel-tp-sched.o
>   CC      /tmp/tmp.ZVxz3l2AAH/builtin-probe.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/fdarray.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/pmu.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/event.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/evlist.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/mem-events.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/timespec.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/helpline.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/progress.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/find-bit-bench.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/inject-buildid.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/scripts/python/Perf-Trace-Util/
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/util.o
>   CC      /tmp/tmp.ZVxz3l2AAH/scripts/python/Perf-Trace-Util/Context.o
>   LD      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/hist.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/build-id.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/pmu-events.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/cacheline.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/trace/beauty/tracepoints/
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/trace/beauty/tracepoints/
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/hists_common.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/evsel.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/evlist-open-close.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/tracepoints/x86_irq_vectors.o
>   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/tracepoints/x86_msr.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/breakpoint.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/mem-memcpy-x86-64-asm.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/mem-memset-x86-64-asm.o
>   CC      /tmp/tmp.ZVxz3l2AAH/bench/numa.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/stdio/
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/iostat.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/browser.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/stdio/hist.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/browsers/
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/browsers/
>   CC      /tmp/tmp.ZVxz3l2AAH/util/config.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/annotate.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/browsers/
>   CC      /tmp/tmp.ZVxz3l2AAH/util/copyfile.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/hists.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/map.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/ctype.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/db-export.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/scripts.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/header.o
>   LD      /tmp/tmp.ZVxz3l2AAH/trace/beauty/tracepoints/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/res_sample.o
>   LD      /tmp/tmp.ZVxz3l2AAH/trace/beauty/perf-in.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/tui/
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/tui/setup.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/hists_link.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/hists_filter.o
>   CC      /tmp/tmp.ZVxz3l2AAH/perf.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/dwarf-regs.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/tui/
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/tui/util.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/tui/helpline.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/unwind-libunwind.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/auxtrace.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/env.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/hists_output.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/hists_cumulate.o
>   LD      /tmp/tmp.ZVxz3l2AAH/scripts/perl/Perf-Trace-Util/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/ui/tui/progress.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/python-use.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/bp_signal.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/bp_signal_overflow.o
>   LD      /tmp/tmp.ZVxz3l2AAH/scripts/python/Perf-Trace-Util/perf-in.o
>   LD      /tmp/tmp.ZVxz3l2AAH/scripts/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/bp_account.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/event.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/evlist.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/wp.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/task-exit.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/sw-clock.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/archinsn.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/intel-pt.o
>   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/intel-bts.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/mmap-thread-lookup.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/thread-maps-share.o
>   LD      /tmp/tmp.ZVxz3l2AAH/ui/tui/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/evlist-hybrid.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/sideband_evlist.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/switch-tracking.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/evsel.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/keep-tracking.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/code-reading.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/evsel_fprintf.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/sample-parsing.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/parse-no-sample-id-all.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/kmod-path.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/perf_event_attr_fprintf.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/evswitch.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/find_bit.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/get_current_dir_name.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/thread-map.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/levenshtein.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/llvm-utils.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/llvm.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/mmap.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/memswap.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/bpf.o
>   BISON   /tmp/tmp.ZVxz3l2AAH/util/parse-events-bison.c
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/topology.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/mem.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/parse-events-hybrid.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/print-events.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/tracepoint.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/cpumap.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/stat.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/perf_regs.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/event_update.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/event-times.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/path.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/expr.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/print_binary.o
>   LD      /tmp/tmp.ZVxz3l2AAH/bench/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/rlimit.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/backward-ring-buffer.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/argv_split.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/rbtree.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/libstring.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/bitmap.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/hweight.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/smt.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/strbuf.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/sdt.o
>   LD      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/is_printable_array.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/string.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/strlist.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/bitmap.o
>   LD      /tmp/tmp.ZVxz3l2AAH/arch/x86/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/strfilter.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/perf-hooks.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/clang.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/unit_number__scnprintf.o
>   LD      /tmp/tmp.ZVxz3l2AAH/arch/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/mem2node.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/maps.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/time-utils-test.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/genelf.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/api-io.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/demangle-java-test.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/top.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/demangle-ocaml-test.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/usage.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/pfm.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/dso.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/dsos.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/parse-metric.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/symbol.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/symbol_fprintf.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/pe-file-parsing.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/color.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/color_config.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/expand-cgroup.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/perf-time-to-tsc.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/dlfilter-test.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/metricgroup.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/header.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/callchain.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/values.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/sigtrap.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/debug.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/fncache.o
>   CC      /tmp/tmp.ZVxz3l2AAH/pmu-events/pmu-events.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/machine.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/event_groups.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/dwarf-unwind.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/tests/workloads/
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/noploop.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/tests/workloads/
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/thloop.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/map.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/leafloop.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/maps.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/llvm-src-base.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/pstack.o
>   LD      /tmp/tmp.ZVxz3l2AAH/ui/browsers/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/session.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/sample-raw.o
>   LD      /tmp/tmp.ZVxz3l2AAH/ui/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/llvm-src-kbuild.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/s390-sample-raw.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/llvm-src-prologue.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/sqrtloop.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/llvm-src-relocation.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/brstack.o
>   CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/datasym.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/amd-sample-raw.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/syscalltbl.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/ordered-events.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/namespaces.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/comm.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/thread.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/thread_map.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/parse-events-bison.o
>   BISON   /tmp/tmp.ZVxz3l2AAH/util/pmu-bison.c
>   CC      /tmp/tmp.ZVxz3l2AAH/util/pmus.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/pmu-hybrid.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/svghelper.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/trace-event-info.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/trace-event-scripting.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/trace-event.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/trace-event-parse.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/trace-event-read.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/sort.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/hist.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/util.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/cpumap.o
>   LD      /tmp/tmp.ZVxz3l2AAH/tests/workloads/perf-in.o
>   LD      /tmp/tmp.ZVxz3l2AAH/tests/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/affinity.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/cputopo.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/cgroup.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/target.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/rblist.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/intlist.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/vdso.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/counts.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/stat.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/stat-shadow.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/stat-display.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/perf_api_probe.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/record.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/srcline.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/srccode.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/synthetic-events.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/data.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/tsc.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/cloexec.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/call-path.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/rwsem.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/thread-stack.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/spark.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/topdown.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/iostat.o
>   LD      /tmp/tmp.ZVxz3l2AAH/pmu-events/pmu-events-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/auxtrace.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/stream.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/
>   CC      /tmp/tmp.ZVxz3l2AAH/util/intel-pt.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/arm-spe-decoder/
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/arm-spe-decoder/
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/scripting-engines/
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/hisi-ptt-decoder/
>   CC      /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/intel-pt-pkt-decoder.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/arm-spe-decoder/arm-spe-decoder.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/scripting-engines/trace-event-perl.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/arm-spe-decoder/arm-spe-pkt-decoder.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.o
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/scripting-engines/
>   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/
>   CC      /tmp/tmp.ZVxz3l2AAH/util/intel-bts.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/intel-pt-log.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/scripting-engines/trace-event-python.o
>   GEN     /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/inat-tables.c
>   CC      /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/intel-pt-decoder.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/arm-spe.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/hisi-ptt.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/s390-cpumsf.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/cs-etm-base.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/parse-branch-options.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/dump-insn.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/parse-regs-options.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/intel-pt-insn-decoder.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/parse-sublevel-options.o
>   LD      /tmp/tmp.ZVxz3l2AAH/util/hisi-ptt-decoder/perf-in.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/term.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/help-unknown-cmd.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/dlfilter.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/mem-events.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/vsprintf.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/units.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/time-utils.o
>   LD      /tmp/tmp.ZVxz3l2AAH/util/arm-spe-decoder/perf-in.o
>   BISON   /tmp/tmp.ZVxz3l2AAH/util/expr-bison.c
>   CC      /tmp/tmp.ZVxz3l2AAH/util/branch.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/mem2node.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/clockid.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/list_sort.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/mutex.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/bpf-loader.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/bpf_map.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/bpf-prologue.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/symbol-elf.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/probe-file.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/probe-event.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/hashmap.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/probe-finder.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/dwarf-aux.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/dwarf-regs.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/unwind-libunwind-local.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/unwind-libunwind.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/data-convert-bt.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/data-convert-json.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/zlib.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/lzma.o
>   CC      /tmp/tmp.ZVxz3l2AAH/util/zstd.o
> util/bpf-loader.c:36:5: error: no previous prototype for ‘bpf_program__set_insns’ [-Werror=missing-prototypes]
>    36 | int bpf_program__set_insns(struct bpf_program *prog __maybe_unused,
>       |     ^~~~~~~~~~~~~~~~~~~~~~

*sigh* yet more unconditionalized use of libbpf. I suspect from the
file this is more of a Makefile than a #define issue. I'll investigate
and spin a v4.

Thanks,
Ian

> util/bpf-loader.c:46:47: error: ‘struct libbpf_prog_handler_opts’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
>    46 |                                  const struct libbpf_prog_handler_opts *opts __maybe_unused)
>       |                                               ^~~~~~~~~~~~~~~~~~~~~~~~
> util/bpf-loader.c:43:5: error: no previous prototype for ‘libbpf_register_prog_handler’ [-Werror=missing-prototypes]
>    43 | int libbpf_register_prog_handler(const char *sec __maybe_unused,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from /usr/include/bpf/libbpf.h:20,
>                  from util/bpf-loader.c:10:
> util/bpf-loader.c: In function ‘libbpf_init’:
> util/bpf-loader.c:179:21: error: variable ‘handler_opts’ has initializer but incomplete type
>   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~
> util/bpf-loader.c:179:9: error: invalid application of ‘sizeof’ to incomplete type ‘struct libbpf_prog_handler_opts’
>   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
>       |         ^~~~~~~~~~~
> util/bpf-loader.c:179:9: error: ‘struct libbpf_prog_handler_opts’ has no member named ‘sz’
>   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
>       |         ^~~~~~~~~~~
> util/bpf-loader.c:179:9: error: invalid application of ‘sizeof’ to incomplete type ‘struct libbpf_prog_handler_opts’
>   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
>       |         ^~~~~~~~~~~
> util/bpf-loader.c:179:9: error: excess elements in struct initializer [-Werror]
>   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
>       |         ^~~~~~~~~~~
> util/bpf-loader.c:179:9: note: (near initialization for ‘(anonymous)’)
> util/bpf-loader.c:180:18: error: ‘struct libbpf_prog_handler_opts’ has no member named ‘prog_prepare_load_fn’
>   180 |                 .prog_prepare_load_fn = libbpf_prog_prepare_load_fn,
>       |                  ^~~~~~~~~~~~~~~~~~~~
> util/bpf-loader.c:180:41: error: excess elements in struct initializer [-Werror]
>   180 |                 .prog_prepare_load_fn = libbpf_prog_prepare_load_fn,
>       |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> util/bpf-loader.c:180:41: note: (near initialization for ‘(anonymous)’)
> util/bpf-loader.c:179:9: error: invalid use of undefined type ‘struct libbpf_prog_handler_opts’
>   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
>       |         ^~~~~~~~~~~
> util/bpf-loader.c:179:47: error: storage size of ‘handler_opts’ isn’t known
>   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
>       |                                               ^~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[6]: *** [/var/home/acme/git/perf-urgent/tools/build/Makefile.build:97: /tmp/tmp.ZVxz3l2AAH/util/bpf-loader.o] Error 1
> make[6]: *** Waiting for unfinished jobs....
>   LD      /tmp/tmp.ZVxz3l2AAH/util/scripting-engines/perf-in.o
>   LD      /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/perf-in.o
> make[5]: *** [/var/home/acme/git/perf-urgent/tools/build/Makefile.build:139: util] Error 2
> make[4]: *** [Makefile.perf:673: /tmp/tmp.ZVxz3l2AAH/perf-in.o] Error 2
> make[4]: *** Waiting for unfinished jobs....
> make[3]: *** [Makefile.perf:236: sub-make] Error 2
> make[2]: *** [Makefile:70: all] Error 2
> make[1]: *** [tests/make:337: make_libbpf_dynamic_O] Error 1
> make: *** [Makefile:103: build-test] Error 2
> make: Leaving directory '/var/home/acme/git/perf-urgent/tools/perf'
>
> real    4m10.450s
> user    40m3.640s
> sys     9m30.945s
> ⬢[acme@toolbox perf-urgent]$
>
>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v3 1/2] perf build: Properly guard libbpf includes
  2023-01-06 17:55       ` Arnaldo Carvalho de Melo
@ 2023-01-06 19:06         ` Ian Rogers
  2023-01-09 15:12           ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Rogers @ 2023-01-06 19:06 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Mike Leach, linux-perf-users, linux-kernel, bpf, peterz, mingo,
	mark.rutland, alexander.shishkin, jolsa, namhyung

On Fri, Jan 6, 2023 at 9:55 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>
> Em Fri, Jan 06, 2023 at 02:53:44PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Fri, Jan 06, 2023 at 02:25:05PM -0300, Arnaldo Carvalho de Melo escreveu:
> > > Em Fri, Jan 06, 2023 at 03:28:03PM +0000, Mike Leach escreveu:
> > > > On Fri, 6 Jan 2023 at 15:13, Ian Rogers <irogers@google.com> wrote:
> > > > >
> > > > > Including libbpf header files should be guarded by
> > > > > HAVE_LIBBPF_SUPPORT. In bpf_counter.h, move the skeleton utilities
> > > > > under HAVE_BPF_SKEL.
> > > > >
> > > > > Fixes: d6a735ef3277 ("perf bpf_counter: Move common functions to bpf_counter.h")
> > > > > Reported-by: Mike Leach <mike.leach@linaro.org>
> > > > > Signed-off-by: Ian Rogers <irogers@google.com>
> > >
> > > Thanks, applied.
> >
> > Failing on 'make -C tools/perf build-test', please run it before sending
> > patches,
>
> Its one of the two patches, I just removed the last one to try without
> it.
>
> > - Arnaldo
> >
> >       make_libbpf_dynamic_O: cd . && make LIBBPF_DYNAMIC=1 FEATURES_DUMP=/var/home/acme/git/perf-urgent/tools/perf/BUILD_TEST_FEATURE_DUMP -j32 O=/tmp/tmp.ZVxz3l2AAH DESTDIR=/tmp/tmp.PDlsV7dzQr
> > ldd: /tmp/tmp.ZVxz3l2AAH/perf: No such file or directory
> > cd . && make LIBBPF_DYNAMIC=1 FEATURES_DUMP=/var/home/acme/git/perf-urgent/tools/perf/BUILD_TEST_FEATURE_DUMP -j32 O=/tmp/tmp.ZVxz3l2AAH DESTDIR=/tmp/tmp.PDlsV7dzQr
> >   BUILD:   Doing 'make -j32' parallel build
> >   HOSTCC  /tmp/tmp.ZVxz3l2AAH/fixdep.o
> >   HOSTLD  /tmp/tmp.ZVxz3l2AAH/fixdep-in.o
> >   LINK    /tmp/tmp.ZVxz3l2AAH/fixdep
> > Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
> > diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
> > Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/perf_regs.h' differs from latest version at 'arch/arm64/include/uapi/asm/perf_regs.h'
> > diff -u tools/arch/arm64/include/uapi/asm/perf_regs.h arch/arm64/include/uapi/asm/perf_regs.h
> > Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h'
> > diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h
> > Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h'
> > diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h
> > Warning: Kernel ABI header at 'tools/arch/arm64/include/asm/cputype.h' differs from latest version at 'arch/arm64/include/asm/cputype.h'
> > diff -u tools/arch/arm64/include/asm/cputype.h arch/arm64/include/asm/cputype.h
> > Warning: Kernel ABI header at 'tools/include/linux/build_bug.h' differs from latest version at 'include/linux/build_bug.h'
> > diff -u tools/include/linux/build_bug.h include/linux/build_bug.h
> > Warning: Kernel ABI header at 'tools/perf/trace/beauty/include/linux/socket.h' differs from latest version at 'include/linux/socket.h'
> > diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h
> > Makefile.config:1147: No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel
> >
> >   GEN     /tmp/tmp.ZVxz3l2AAH/common-cmds.h
> >   CC      /tmp/tmp.ZVxz3l2AAH/perf-read-vdso32
> >   CC      /tmp/tmp.ZVxz3l2AAH/dlfilters/dlfilter-test-api-v0.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/dlfilters/dlfilter-show-cycles.o
> >   LINK    /tmp/tmp.ZVxz3l2AAH/dlfilters/dlfilter-show-cycles.so
> >   LINK    /tmp/tmp.ZVxz3l2AAH/dlfilters/dlfilter-test-api-v0.so
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libsubcmd/include/subcmd/exec-cmd.h
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libsubcmd/include/subcmd/help.h
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libsubcmd/include/subcmd/pager.h
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libsubcmd/include/subcmd/parse-options.h
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libsubcmd/include/subcmd/run-command.h
> >   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/exec-cmd.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/help.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/pager.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/parse-options.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/run-command.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/sigchain.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/libsubcmd/subcmd-config.o
> >   INSTALL libsubcmd_headers
> >   PERF_VERSION = 6.2.rc2.g449a50dbf82a
> >   GEN     perf-archive
> >   GEN     perf-iostat
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/bpf_perf.h
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/core.h
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/cpumap.h
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libsymbol/include/symbol/kallsyms.h
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/cpu.h
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/threadmap.h
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/debug.h
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/evlist.h
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/io.h
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/evsel.h
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/fd/array.h
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/event.h
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/fs/fs.h
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/perf/mmap.h
> >   CC      /tmp/tmp.ZVxz3l2AAH/libperf/core.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/libsymbol/kallsyms.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/libperf/cpumap.o
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/cpumap.h
> >   CC      /tmp/tmp.ZVxz3l2AAH/libperf/threadmap.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/libapi/fd/
> >   CC      /tmp/tmp.ZVxz3l2AAH/libperf/evsel.o
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/evlist.h
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/evsel.h
> >   CC      /tmp/tmp.ZVxz3l2AAH/libapi/cpu.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/libperf/evlist.o
> >   INSTALL libsymbol_headers
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libapi/include/api/fs/tracing_path.h
> >   CC      /tmp/tmp.ZVxz3l2AAH/libapi/debug.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/libperf/mmap.o
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/lib.h
> >   CC      /tmp/tmp.ZVxz3l2AAH/libapi/str_error_r.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/libperf/zalloc.o
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/mmap.h
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/libapi/fs/
> >   CC      /tmp/tmp.ZVxz3l2AAH/libperf/xyarray.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/libperf/lib.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/libapi/fd/array.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/libapi/fs/
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/libapi/fs/
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/threadmap.h
> >   INSTALL libapi_headers
> >   INSTALL /tmp/tmp.ZVxz3l2AAH/libperf/include/internal/xyarray.h
> >   CC      /tmp/tmp.ZVxz3l2AAH/libapi/fs/fs.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/libapi/fs/tracing_path.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/libapi/fs/cgroup.o
> >   INSTALL libperf_headers
> >   LD      /tmp/tmp.ZVxz3l2AAH/libapi/fd/libapi-in.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/libsymbol/libsymbol-in.o
> >   AR      /tmp/tmp.ZVxz3l2AAH/libsymbol/libsymbol.a
> >   LD      /tmp/tmp.ZVxz3l2AAH/libapi/fs/libapi-in.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/libapi/libapi-in.o
> >   AR      /tmp/tmp.ZVxz3l2AAH/libapi/libapi.a
> >   LD      /tmp/tmp.ZVxz3l2AAH/libperf/libperf-in.o
> >   AR      /tmp/tmp.ZVxz3l2AAH/libperf/libperf.a
> >   GEN     /tmp/tmp.ZVxz3l2AAH/python/perf.cpython-310-x86_64-linux-gnu.so
> >   LD      /tmp/tmp.ZVxz3l2AAH/libsubcmd/libsubcmd-in.o
> >   AR      /tmp/tmp.ZVxz3l2AAH/libsubcmd/libsubcmd.a
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-bench.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-annotate.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-config.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-diff.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-evlist.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-ftrace.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-help.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-buildid-list.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-buildid-cache.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-kallsyms.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-list.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-record.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-report.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-stat.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-top.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-script.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-kvm.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-inject.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-mem.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/pmu-events/
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-data.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-version.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-c2c.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-daemon.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-kmem.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-kwork.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-lock.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-sched.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-timechart.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-trace.o
> >   GEN     /tmp/tmp.ZVxz3l2AAH/pmu-events/pmu-events.c
> >   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/clone.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/fcntl.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/flock.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/fsmount.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/fspick.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/ioctl.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/bench/
> >   CC      /tmp/tmp.ZVxz3l2AAH/bench/sched-messaging.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/bench/
> >   CC      /tmp/tmp.ZVxz3l2AAH/bench/syscall.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/bench/sched-pipe.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/bench/mem-functions.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/bench/futex-hash.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/bench/futex-wake.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/bench/futex-wake-parallel.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/kcmp.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/bench/futex-requeue.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/bench/futex-lock-pi.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/tests/
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/builtin-test.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/tests/
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/builtin-test-list.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/mount_flags.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/arm64-frame-pointer-unwind-support.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/move_mount.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/pkey_alloc.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/common.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/parse-events.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/arch/x86/util/
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/header.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/dso-data.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/attr.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/regs_load.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/dwarf-unwind.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/arch/x86/util/
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/tsc.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/bench/epoll-wait.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/arch_prctl.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/bench/epoll-ctl.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/prctl.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/block-info.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/annotate.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/arch-tests.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/sample-parsing.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/renameat.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/sockaddr.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/socket.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/vmlinux-kallsyms.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/openat-syscall.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/openat-syscall-all-cpus.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/bench/kallsyms-parse.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/bench/synthesize.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/scripts/perl/Perf-Trace-Util/
> >   CC      /tmp/tmp.ZVxz3l2AAH/ui/setup.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/pmu.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/kvm-stat.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/scripts/perl/Perf-Trace-Util/Context.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/perf_regs.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/insn-x86.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/intel-pt-test.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/bp-modify.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/statx.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/openat-syscall-tp-fields.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/block-range.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/sync_file_range.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/mmap-basic.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/perf-record.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/topdown.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/machine.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/evsel-roundtrip-name.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/evsel-tp-sched.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/builtin-probe.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/fdarray.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/pmu.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/event.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/evlist.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/mem-events.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/
> >   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/timespec.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/ui/helpline.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/ui/progress.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/bench/find-bit-bench.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/bench/inject-buildid.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/scripts/python/Perf-Trace-Util/
> >   CC      /tmp/tmp.ZVxz3l2AAH/ui/util.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/scripts/python/Perf-Trace-Util/Context.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/arch/x86/tests/perf-in.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/ui/hist.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/build-id.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/pmu-events.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/cacheline.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/trace/beauty/tracepoints/
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/trace/beauty/tracepoints/
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/hists_common.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/evsel.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/bench/evlist-open-close.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/tracepoints/x86_irq_vectors.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/trace/beauty/tracepoints/x86_msr.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/bench/breakpoint.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/bench/mem-memcpy-x86-64-asm.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/bench/mem-memset-x86-64-asm.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/bench/numa.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/stdio/
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/iostat.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/ui/browser.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/ui/stdio/hist.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/browsers/
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/browsers/
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/config.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/annotate.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/browsers/
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/copyfile.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/hists.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/map.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/ctype.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/db-export.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/scripts.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/header.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/trace/beauty/tracepoints/perf-in.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/ui/browsers/res_sample.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/trace/beauty/perf-in.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/tui/
> >   CC      /tmp/tmp.ZVxz3l2AAH/ui/tui/setup.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/hists_link.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/hists_filter.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/perf.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/dwarf-regs.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/ui/tui/
> >   CC      /tmp/tmp.ZVxz3l2AAH/ui/tui/util.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/ui/tui/helpline.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/unwind-libunwind.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/auxtrace.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/env.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/hists_output.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/hists_cumulate.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/scripts/perl/Perf-Trace-Util/perf-in.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/ui/tui/progress.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/python-use.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/bp_signal.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/bp_signal_overflow.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/scripts/python/Perf-Trace-Util/perf-in.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/scripts/perf-in.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/bp_account.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/event.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/evlist.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/wp.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/task-exit.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/sw-clock.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/archinsn.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/intel-pt.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/intel-bts.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/mmap-thread-lookup.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/thread-maps-share.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/ui/tui/perf-in.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/evlist-hybrid.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/sideband_evlist.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/switch-tracking.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/evsel.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/keep-tracking.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/code-reading.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/evsel_fprintf.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/sample-parsing.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/parse-no-sample-id-all.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/kmod-path.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/perf_event_attr_fprintf.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/evswitch.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/find_bit.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/get_current_dir_name.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/thread-map.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/levenshtein.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/llvm-utils.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/llvm.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/mmap.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/memswap.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/bpf.o
> >   BISON   /tmp/tmp.ZVxz3l2AAH/util/parse-events-bison.c
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/topology.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/mem.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/parse-events-hybrid.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/print-events.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/tracepoint.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/cpumap.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/stat.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/perf_regs.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/event_update.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/event-times.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/path.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/expr.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/print_binary.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/bench/perf-in.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/rlimit.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/backward-ring-buffer.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/argv_split.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/rbtree.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/libstring.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/bitmap.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/hweight.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/smt.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/strbuf.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/sdt.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/arch/x86/util/perf-in.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/is_printable_array.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/string.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/strlist.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/bitmap.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/arch/x86/perf-in.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/strfilter.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/perf-hooks.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/clang.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/unit_number__scnprintf.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/arch/perf-in.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/mem2node.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/maps.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/time-utils-test.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/genelf.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/api-io.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/demangle-java-test.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/top.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/demangle-ocaml-test.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/usage.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/pfm.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/dso.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/dsos.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/parse-metric.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/symbol.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/symbol_fprintf.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/pe-file-parsing.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/color.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/color_config.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/expand-cgroup.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/perf-time-to-tsc.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/dlfilter-test.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/metricgroup.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/header.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/callchain.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/values.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/sigtrap.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/debug.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/fncache.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/pmu-events/pmu-events.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/machine.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/event_groups.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/dwarf-unwind.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/tests/workloads/
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/noploop.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/tests/workloads/
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/thloop.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/map.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/leafloop.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/maps.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/llvm-src-base.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/pstack.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/ui/browsers/perf-in.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/session.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/sample-raw.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/ui/perf-in.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/llvm-src-kbuild.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/s390-sample-raw.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/llvm-src-prologue.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/sqrtloop.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/llvm-src-relocation.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/brstack.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/tests/workloads/datasym.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/amd-sample-raw.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/syscalltbl.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/ordered-events.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/namespaces.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/comm.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/thread.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/thread_map.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/parse-events-bison.o
> >   BISON   /tmp/tmp.ZVxz3l2AAH/util/pmu-bison.c
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/pmus.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/pmu-hybrid.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/svghelper.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/trace-event-info.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/trace-event-scripting.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/trace-event.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/trace-event-parse.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/trace-event-read.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/sort.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/hist.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/util.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/cpumap.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/tests/workloads/perf-in.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/tests/perf-in.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/affinity.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/cputopo.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/cgroup.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/target.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/rblist.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/intlist.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/vdso.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/counts.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/stat.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/stat-shadow.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/stat-display.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/perf_api_probe.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/record.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/srcline.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/srccode.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/synthetic-events.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/data.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/tsc.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/cloexec.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/call-path.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/rwsem.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/thread-stack.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/spark.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/topdown.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/iostat.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/pmu-events/pmu-events-in.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/auxtrace.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/stream.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/intel-pt.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/arm-spe-decoder/
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/arm-spe-decoder/
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/scripting-engines/
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/hisi-ptt-decoder/
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/intel-pt-pkt-decoder.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/arm-spe-decoder/arm-spe-decoder.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/scripting-engines/trace-event-perl.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/arm-spe-decoder/arm-spe-pkt-decoder.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.o
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/scripting-engines/
> >   MKDIR   /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/intel-bts.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/intel-pt-log.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/scripting-engines/trace-event-python.o
> >   GEN     /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/inat-tables.c
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/intel-pt-decoder.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/arm-spe.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/hisi-ptt.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/s390-cpumsf.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/cs-etm-base.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/parse-branch-options.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/dump-insn.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/parse-regs-options.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/intel-pt-insn-decoder.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/parse-sublevel-options.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/util/hisi-ptt-decoder/perf-in.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/term.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/help-unknown-cmd.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/dlfilter.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/mem-events.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/vsprintf.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/units.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/time-utils.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/util/arm-spe-decoder/perf-in.o
> >   BISON   /tmp/tmp.ZVxz3l2AAH/util/expr-bison.c
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/branch.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/mem2node.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/clockid.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/list_sort.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/mutex.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/bpf-loader.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/bpf_map.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/bpf-prologue.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/symbol-elf.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/probe-file.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/probe-event.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/hashmap.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/probe-finder.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/dwarf-aux.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/dwarf-regs.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/unwind-libunwind-local.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/unwind-libunwind.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/data-convert-bt.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/data-convert-json.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/zlib.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/lzma.o
> >   CC      /tmp/tmp.ZVxz3l2AAH/util/zstd.o
> > util/bpf-loader.c:36:5: error: no previous prototype for ‘bpf_program__set_insns’ [-Werror=missing-prototypes]
> >    36 | int bpf_program__set_insns(struct bpf_program *prog __maybe_unused,
> >       |     ^~~~~~~~~~~~~~~~~~~~~~
> > util/bpf-loader.c:46:47: error: ‘struct libbpf_prog_handler_opts’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
> >    46 |                                  const struct libbpf_prog_handler_opts *opts __maybe_unused)
> >       |                                               ^~~~~~~~~~~~~~~~~~~~~~~~
> > util/bpf-loader.c:43:5: error: no previous prototype for ‘libbpf_register_prog_handler’ [-Werror=missing-prototypes]
> >    43 | int libbpf_register_prog_handler(const char *sec __maybe_unused,
> >       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > In file included from /usr/include/bpf/libbpf.h:20,
> >                  from util/bpf-loader.c:10:
> > util/bpf-loader.c: In function ‘libbpf_init’:
> > util/bpf-loader.c:179:21: error: variable ‘handler_opts’ has initializer but incomplete type
> >   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
> >       |                     ^~~~~~~~~~~~~~~~~~~~~~~~
> > util/bpf-loader.c:179:9: error: invalid application of ‘sizeof’ to incomplete type ‘struct libbpf_prog_handler_opts’
> >   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
> >       |         ^~~~~~~~~~~
> > util/bpf-loader.c:179:9: error: ‘struct libbpf_prog_handler_opts’ has no member named ‘sz’
> >   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
> >       |         ^~~~~~~~~~~
> > util/bpf-loader.c:179:9: error: invalid application of ‘sizeof’ to incomplete type ‘struct libbpf_prog_handler_opts’
> >   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
> >       |         ^~~~~~~~~~~
> > util/bpf-loader.c:179:9: error: excess elements in struct initializer [-Werror]
> >   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
> >       |         ^~~~~~~~~~~
> > util/bpf-loader.c:179:9: note: (near initialization for ‘(anonymous)’)
> > util/bpf-loader.c:180:18: error: ‘struct libbpf_prog_handler_opts’ has no member named ‘prog_prepare_load_fn’
> >   180 |                 .prog_prepare_load_fn = libbpf_prog_prepare_load_fn,
> >       |                  ^~~~~~~~~~~~~~~~~~~~
> > util/bpf-loader.c:180:41: error: excess elements in struct initializer [-Werror]
> >   180 |                 .prog_prepare_load_fn = libbpf_prog_prepare_load_fn,
> >       |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> > util/bpf-loader.c:180:41: note: (near initialization for ‘(anonymous)’)
> > util/bpf-loader.c:179:9: error: invalid use of undefined type ‘struct libbpf_prog_handler_opts’
> >   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
> >       |         ^~~~~~~~~~~
> > util/bpf-loader.c:179:47: error: storage size of ‘handler_opts’ isn’t known
> >   179 |         LIBBPF_OPTS(libbpf_prog_handler_opts, handler_opts,
> >       |                                               ^~~~~~~~~~~~
> > cc1: all warnings being treated as errors
> > make[6]: *** [/var/home/acme/git/perf-urgent/tools/build/Makefile.build:97: /tmp/tmp.ZVxz3l2AAH/util/bpf-loader.o] Error 1
> > make[6]: *** Waiting for unfinished jobs....
> >   LD      /tmp/tmp.ZVxz3l2AAH/util/scripting-engines/perf-in.o
> >   LD      /tmp/tmp.ZVxz3l2AAH/util/intel-pt-decoder/perf-in.o
> > make[5]: *** [/var/home/acme/git/perf-urgent/tools/build/Makefile.build:139: util] Error 2
> > make[4]: *** [Makefile.perf:673: /tmp/tmp.ZVxz3l2AAH/perf-in.o] Error 2
> > make[4]: *** Waiting for unfinished jobs....
> > make[3]: *** [Makefile.perf:236: sub-make] Error 2
> > make[2]: *** [Makefile:70: all] Error 2
> > make[1]: *** [tests/make:337: make_libbpf_dynamic_O] Error 1
> > make: *** [Makefile:103: build-test] Error 2
> > make: Leaving directory '/var/home/acme/git/perf-urgent/tools/perf'
> >
> > real  4m10.450s
> > user  40m3.640s
> > sys   9m30.945s
> > ⬢[acme@toolbox perf-urgent]$
> >

So trying to get build-test working on my Debian derived distro is a
PITA with broken feature detection for options I don't normally use.
I'll try to fix this.

In any case I think I've spotted what is really happening here and it
isn't a failure but a feature :-D The build is specifying
LIBBPF_DYNAMIC=1 which means you get the libbpf headers from
/usr/include. I think the build is trying to do this on a system with
an old libbpf and hence getting the failures above. Previously, even
though we wanted the dynamic headers we still had a -I, this time for
the install_headers version. Now you really are using the system
version and it is broken. This means a few things:
- the libbpf feature test should fail if code like above is going to fail,
- we may want to contemplate supporting older libbpfs (I'd rather not),
- does build-test have a way to skip known issues like this?

Thanks,
Ian

> --
>
> - Arnaldo

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v3 1/2] perf build: Properly guard libbpf includes
  2023-01-06 19:06         ` Ian Rogers
@ 2023-01-09 15:12           ` Arnaldo Carvalho de Melo
  2023-01-09 18:10             ` Jiri Olsa
  0 siblings, 1 reply; 20+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-01-09 15:12 UTC (permalink / raw)
  To: Ian Rogers, Jiri Olsa
  Cc: Mike Leach, linux-perf-users, linux-kernel, bpf, peterz, mingo,
	mark.rutland, alexander.shishkin, jolsa, namhyung

Em Fri, Jan 06, 2023 at 11:06:46AM -0800, Ian Rogers escreveu:
> So trying to get build-test working on my Debian derived distro is a
> PITA with broken feature detection for options I don't normally use.

Its really difficult to have perf building with so many dependent
libraries, mowing out some should be in order.

> I'll try to fix this.

Thanks.
 
> In any case I think I've spotted what is really happening here and it
> isn't a failure but a feature :-D The build is specifying

I get it.

> LIBBPF_DYNAMIC=1 which means you get the libbpf headers from
> /usr/include. I think the build is trying to do this on a system with
> an old libbpf and hence getting the failures above. Previously, even
> though we wanted the dynamic headers we still had a -I, this time for
> the install_headers version. Now you really are using the system
> version and it is broken. This means a few things:
> - the libbpf feature test should fail if code like above is going to fail,

Agreed.

> - we may want to contemplate supporting older libbpfs (I'd rather not),

I'd rather require everybody to be up to the latest trends, but I really
don't think that is a reasonable expectation.

> - does build-test have a way to skip known issues like this?

Unsure, Jiri?

But yeah, previous experiences with Andrii were that we can do not too
costly feature checks, not using .c programs that would fail if some
required feature wasn't present but instead would just do some grep on a
header and if some "smell" wasn't scent, just fail the cap query.

- Arnaldo

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v3 1/2] perf build: Properly guard libbpf includes
  2023-01-09 15:12           ` Arnaldo Carvalho de Melo
@ 2023-01-09 18:10             ` Jiri Olsa
  2023-01-09 18:37               ` Ian Rogers
  0 siblings, 1 reply; 20+ messages in thread
From: Jiri Olsa @ 2023-01-09 18:10 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ian Rogers, Mike Leach, linux-perf-users, linux-kernel, bpf,
	peterz, mingo, mark.rutland, alexander.shishkin, namhyung

On Mon, Jan 09, 2023 at 12:12:15PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Jan 06, 2023 at 11:06:46AM -0800, Ian Rogers escreveu:
> > So trying to get build-test working on my Debian derived distro is a
> > PITA with broken feature detection for options I don't normally use.
> 
> Its really difficult to have perf building with so many dependent
> libraries, mowing out some should be in order.
> 
> > I'll try to fix this.
> 
> Thanks.
>  
> > In any case I think I've spotted what is really happening here and it
> > isn't a failure but a feature :-D The build is specifying
> 
> I get it.
> 
> > LIBBPF_DYNAMIC=1 which means you get the libbpf headers from
> > /usr/include. I think the build is trying to do this on a system with
> > an old libbpf and hence getting the failures above. Previously, even
> > though we wanted the dynamic headers we still had a -I, this time for
> > the install_headers version. Now you really are using the system
> > version and it is broken. This means a few things:
> > - the libbpf feature test should fail if code like above is going to fail,
> 
> Agreed.
> 
> > - we may want to contemplate supporting older libbpfs (I'd rather not),
> 
> I'd rather require everybody to be up to the latest trends, but I really
> don't think that is a reasonable expectation.
> 
> > - does build-test have a way to skip known issues like this?
> 
> Unsure, Jiri?

I don't think so it just triggers the build, it's up to the features check
to disable the feature if the library is not compatible with perf code

could we add that specific libbpf call to the libbpf feature check?

jirka

> 
> But yeah, previous experiences with Andrii were that we can do not too
> costly feature checks, not using .c programs that would fail if some
> required feature wasn't present but instead would just do some grep on a
> header and if some "smell" wasn't scent, just fail the cap query.
> 
> - Arnaldo

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v3 1/2] perf build: Properly guard libbpf includes
  2023-01-09 18:10             ` Jiri Olsa
@ 2023-01-09 18:37               ` Ian Rogers
  2023-01-09 19:29                 ` Ian Rogers
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Rogers @ 2023-01-09 18:37 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Arnaldo Carvalho de Melo, Mike Leach, linux-perf-users,
	linux-kernel, bpf, peterz, mingo, mark.rutland,
	alexander.shishkin, namhyung

On Mon, Jan 9, 2023 at 10:10 AM Jiri Olsa <olsajiri@gmail.com> wrote:
>
> On Mon, Jan 09, 2023 at 12:12:15PM -0300, Arnaldo Carvalho de Melo wrote:
> > Em Fri, Jan 06, 2023 at 11:06:46AM -0800, Ian Rogers escreveu:
> > > So trying to get build-test working on my Debian derived distro is a
> > > PITA with broken feature detection for options I don't normally use.
> >
> > Its really difficult to have perf building with so many dependent
> > libraries, mowing out some should be in order.
> >
> > > I'll try to fix this.
> >
> > Thanks.
> >
> > > In any case I think I've spotted what is really happening here and it
> > > isn't a failure but a feature :-D The build is specifying
> >
> > I get it.
> >
> > > LIBBPF_DYNAMIC=1 which means you get the libbpf headers from
> > > /usr/include. I think the build is trying to do this on a system with
> > > an old libbpf and hence getting the failures above. Previously, even
> > > though we wanted the dynamic headers we still had a -I, this time for
> > > the install_headers version. Now you really are using the system
> > > version and it is broken. This means a few things:
> > > - the libbpf feature test should fail if code like above is going to fail,
> >
> > Agreed.
> >
> > > - we may want to contemplate supporting older libbpfs (I'd rather not),
> >
> > I'd rather require everybody to be up to the latest trends, but I really
> > don't think that is a reasonable expectation.
> >
> > > - does build-test have a way to skip known issues like this?
> >
> > Unsure, Jiri?
>
> I don't think so it just triggers the build, it's up to the features check
> to disable the feature if the library is not compatible with perf code
>
> could we add that specific libbpf call to the libbpf feature check?

Looking at the failure closer, the failing code is code inside a
feature check trying to workaround the feature not being present. We
need to do something like:

```
diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
index 6e9b06cf06ee..a1c3cc230273 100644
--- a/tools/perf/util/bpf-loader.c
+++ b/tools/perf/util/bpf-loader.c
@@ -33,17 +33,18 @@
#include <internal/xyarray.h>

#ifndef HAVE_LIBBPF_BPF_PROGRAM__SET_INSNS
-int bpf_program__set_insns(struct bpf_program *prog __maybe_unused,
-                          struct bpf_insn *new_insns __maybe_unused,
size_t new_insn_cnt __maybe_un
used)
+static int bpf_program__set_insns(struct bpf_program *prog __maybe_unused,
+                                 struct bpf_insn *new_insns __maybe_unused,
+                                 size_t new_insn_cnt __maybe_unused)
{
       pr_err("%s: not support, update libbpf\n", __func__);
       return -ENOTSUP;
}

-int libbpf_register_prog_handler(const char *sec __maybe_unused,
-                                 enum bpf_prog_type prog_type __maybe_unused,
-                                 enum bpf_attach_type exp_attach_type
__maybe_unused,
-                                 const struct
libbpf_prog_handler_opts *opts __maybe_unused)
+static int libbpf_register_prog_handler(const char *sec __maybe_unused,
+                                       enum bpf_prog_type prog_type
__maybe_unused,
+                                       enum bpf_attach_type
exp_attach_type __maybe_unused,
+                                       const void *opts __maybe_unused)
{
       pr_err("%s: not support, update libbpf\n", __func__);
       return -ENOTSUP;
```

There are some other fixes necessary too. I'll try to write the fuller
patch but I have no means for testing except for undefining
HAVE_LIBBPF_BPF_PROGRAM__SET_INSNS.

Thanks,
Ian

> jirka
>
> >
> > But yeah, previous experiences with Andrii were that we can do not too
> > costly feature checks, not using .c programs that would fail if some
> > required feature wasn't present but instead would just do some grep on a
> > header and if some "smell" wasn't scent, just fail the cap query.
> >
> > - Arnaldo

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH v3 1/2] perf build: Properly guard libbpf includes
  2023-01-09 18:37               ` Ian Rogers
@ 2023-01-09 19:29                 ` Ian Rogers
  2023-01-09 19:34                   ` Ian Rogers
  2023-01-10 14:31                   ` Arnaldo Carvalho de Melo
  0 siblings, 2 replies; 20+ messages in thread
From: Ian Rogers @ 2023-01-09 19:29 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Arnaldo Carvalho de Melo, Mike Leach, linux-perf-users,
	linux-kernel, bpf, peterz, mingo, mark.rutland,
	alexander.shishkin, namhyung

On Mon, Jan 9, 2023 at 10:37 AM Ian Rogers <irogers@google.com> wrote:
>
> On Mon, Jan 9, 2023 at 10:10 AM Jiri Olsa <olsajiri@gmail.com> wrote:
> >
> > On Mon, Jan 09, 2023 at 12:12:15PM -0300, Arnaldo Carvalho de Melo wrote:
> > > Em Fri, Jan 06, 2023 at 11:06:46AM -0800, Ian Rogers escreveu:
> > > > So trying to get build-test working on my Debian derived distro is a
> > > > PITA with broken feature detection for options I don't normally use.
> > >
> > > Its really difficult to have perf building with so many dependent
> > > libraries, mowing out some should be in order.
> > >
> > > > I'll try to fix this.
> > >
> > > Thanks.
> > >
> > > > In any case I think I've spotted what is really happening here and it
> > > > isn't a failure but a feature :-D The build is specifying
> > >
> > > I get it.
> > >
> > > > LIBBPF_DYNAMIC=1 which means you get the libbpf headers from
> > > > /usr/include. I think the build is trying to do this on a system with
> > > > an old libbpf and hence getting the failures above. Previously, even
> > > > though we wanted the dynamic headers we still had a -I, this time for
> > > > the install_headers version. Now you really are using the system
> > > > version and it is broken. This means a few things:
> > > > - the libbpf feature test should fail if code like above is going to fail,
> > >
> > > Agreed.
> > >
> > > > - we may want to contemplate supporting older libbpfs (I'd rather not),
> > >
> > > I'd rather require everybody to be up to the latest trends, but I really
> > > don't think that is a reasonable expectation.
> > >
> > > > - does build-test have a way to skip known issues like this?
> > >
> > > Unsure, Jiri?
> >
> > I don't think so it just triggers the build, it's up to the features check
> > to disable the feature if the library is not compatible with perf code
> >
> > could we add that specific libbpf call to the libbpf feature check?
>
> Looking at the failure closer, the failing code is code inside a
> feature check trying to workaround the feature not being present. We
> need to do something like:
>
> ```
> diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
> index 6e9b06cf06ee..a1c3cc230273 100644
> --- a/tools/perf/util/bpf-loader.c
> +++ b/tools/perf/util/bpf-loader.c
> @@ -33,17 +33,18 @@
> #include <internal/xyarray.h>
>
> #ifndef HAVE_LIBBPF_BPF_PROGRAM__SET_INSNS
> -int bpf_program__set_insns(struct bpf_program *prog __maybe_unused,
> -                          struct bpf_insn *new_insns __maybe_unused,
> size_t new_insn_cnt __maybe_un
> used)
> +static int bpf_program__set_insns(struct bpf_program *prog __maybe_unused,
> +                                 struct bpf_insn *new_insns __maybe_unused,
> +                                 size_t new_insn_cnt __maybe_unused)
> {
>        pr_err("%s: not support, update libbpf\n", __func__);
>        return -ENOTSUP;
> }
>
> -int libbpf_register_prog_handler(const char *sec __maybe_unused,
> -                                 enum bpf_prog_type prog_type __maybe_unused,
> -                                 enum bpf_attach_type exp_attach_type
> __maybe_unused,
> -                                 const struct
> libbpf_prog_handler_opts *opts __maybe_unused)
> +static int libbpf_register_prog_handler(const char *sec __maybe_unused,
> +                                       enum bpf_prog_type prog_type
> __maybe_unused,
> +                                       enum bpf_attach_type
> exp_attach_type __maybe_unused,
> +                                       const void *opts __maybe_unused)
> {
>        pr_err("%s: not support, update libbpf\n", __func__);
>        return -ENOTSUP;
> ```
>
> There are some other fixes necessary too. I'll try to write the fuller
> patch but I have no means for testing except for undefining
> HAVE_LIBBPF_BPF_PROGRAM__SET_INSNS.
>
> Thanks,
> Ian

So libbpf_prog_handler_opts is missing in the failing build, this
points to a libbpf before 0.8. I'm somewhat concerned that to work
around these linkage problems we're adding runtime errors - we may
build but the functionality is totally crippled. Is it worth
maintaining these broken builds or to just upfront fail the feature
test?

We can also switch the feature tests for LIBBPF_MAJOR_VERSION and
LIBBPF_MINOR_VERSION checks. This would have the property of letting
us tie the error messages to what version of libbpf is assumed.

In this case we could have a feature test for the libbpf version and
if the version is before libbpf 0.8 fail the feature check. A quick
way to do this is:
```
diff --git a/tools/build/feature/test-libbpf.c
b/tools/build/feature/test-libbpf.c
index a508756cf4cc..dadd8186b71d 100644
--- a/tools/build/feature/test-libbpf.c
+++ b/tools/build/feature/test-libbpf.c
@@ -1,6 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
#include <bpf/libbpf.h>

+#if (LIBBPF_MAJOR_VERSION == 0) && (LIBBPF_MINOR_VERSION < 8)
+#error At least libbpf 0.8 is assumed for Linux tools.
+#endif
+
int main(void)
{
       return bpf_object__open("test") ? 0 : -1;
```

Thanks,
Ian

> > jirka
> >
> > >
> > > But yeah, previous experiences with Andrii were that we can do not too
> > > costly feature checks, not using .c programs that would fail if some
> > > required feature wasn't present but instead would just do some grep on a
> > > header and if some "smell" wasn't scent, just fail the cap query.
> > >
> > > - Arnaldo

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH v3 1/2] perf build: Properly guard libbpf includes
  2023-01-09 19:29                 ` Ian Rogers
@ 2023-01-09 19:34                   ` Ian Rogers
  2023-01-09 20:40                     ` Ian Rogers
  2023-01-10 11:19                     ` Jiri Olsa
  2023-01-10 14:31                   ` Arnaldo Carvalho de Melo
  1 sibling, 2 replies; 20+ messages in thread
From: Ian Rogers @ 2023-01-09 19:34 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Arnaldo Carvalho de Melo, Mike Leach, linux-perf-users,
	linux-kernel, bpf, peterz, mingo, mark.rutland,
	alexander.shishkin, namhyung

On Mon, Jan 9, 2023 at 11:29 AM Ian Rogers <irogers@google.com> wrote:
>
> On Mon, Jan 9, 2023 at 10:37 AM Ian Rogers <irogers@google.com> wrote:
> >
> > On Mon, Jan 9, 2023 at 10:10 AM Jiri Olsa <olsajiri@gmail.com> wrote:
> > >
> > > On Mon, Jan 09, 2023 at 12:12:15PM -0300, Arnaldo Carvalho de Melo wrote:
> > > > Em Fri, Jan 06, 2023 at 11:06:46AM -0800, Ian Rogers escreveu:
> > > > > So trying to get build-test working on my Debian derived distro is a
> > > > > PITA with broken feature detection for options I don't normally use.
> > > >
> > > > Its really difficult to have perf building with so many dependent
> > > > libraries, mowing out some should be in order.
> > > >
> > > > > I'll try to fix this.
> > > >
> > > > Thanks.
> > > >
> > > > > In any case I think I've spotted what is really happening here and it
> > > > > isn't a failure but a feature :-D The build is specifying
> > > >
> > > > I get it.
> > > >
> > > > > LIBBPF_DYNAMIC=1 which means you get the libbpf headers from
> > > > > /usr/include. I think the build is trying to do this on a system with
> > > > > an old libbpf and hence getting the failures above. Previously, even
> > > > > though we wanted the dynamic headers we still had a -I, this time for
> > > > > the install_headers version. Now you really are using the system
> > > > > version and it is broken. This means a few things:
> > > > > - the libbpf feature test should fail if code like above is going to fail,
> > > >
> > > > Agreed.
> > > >
> > > > > - we may want to contemplate supporting older libbpfs (I'd rather not),
> > > >
> > > > I'd rather require everybody to be up to the latest trends, but I really
> > > > don't think that is a reasonable expectation.
> > > >
> > > > > - does build-test have a way to skip known issues like this?
> > > >
> > > > Unsure, Jiri?
> > >
> > > I don't think so it just triggers the build, it's up to the features check
> > > to disable the feature if the library is not compatible with perf code
> > >
> > > could we add that specific libbpf call to the libbpf feature check?
> >
> > Looking at the failure closer, the failing code is code inside a
> > feature check trying to workaround the feature not being present. We
> > need to do something like:
> >
> > ```
> > diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
> > index 6e9b06cf06ee..a1c3cc230273 100644
> > --- a/tools/perf/util/bpf-loader.c
> > +++ b/tools/perf/util/bpf-loader.c
> > @@ -33,17 +33,18 @@
> > #include <internal/xyarray.h>
> >
> > #ifndef HAVE_LIBBPF_BPF_PROGRAM__SET_INSNS
> > -int bpf_program__set_insns(struct bpf_program *prog __maybe_unused,
> > -                          struct bpf_insn *new_insns __maybe_unused,
> > size_t new_insn_cnt __maybe_un
> > used)
> > +static int bpf_program__set_insns(struct bpf_program *prog __maybe_unused,
> > +                                 struct bpf_insn *new_insns __maybe_unused,
> > +                                 size_t new_insn_cnt __maybe_unused)
> > {
> >        pr_err("%s: not support, update libbpf\n", __func__);
> >        return -ENOTSUP;
> > }
> >
> > -int libbpf_register_prog_handler(const char *sec __maybe_unused,
> > -                                 enum bpf_prog_type prog_type __maybe_unused,
> > -                                 enum bpf_attach_type exp_attach_type
> > __maybe_unused,
> > -                                 const struct
> > libbpf_prog_handler_opts *opts __maybe_unused)
> > +static int libbpf_register_prog_handler(const char *sec __maybe_unused,
> > +                                       enum bpf_prog_type prog_type
> > __maybe_unused,
> > +                                       enum bpf_attach_type
> > exp_attach_type __maybe_unused,
> > +                                       const void *opts __maybe_unused)
> > {
> >        pr_err("%s: not support, update libbpf\n", __func__);
> >        return -ENOTSUP;
> > ```
> >
> > There are some other fixes necessary too. I'll try to write the fuller
> > patch but I have no means for testing except for undefining
> > HAVE_LIBBPF_BPF_PROGRAM__SET_INSNS.
> >
> > Thanks,
> > Ian
>
> So libbpf_prog_handler_opts is missing in the failing build, this
> points to a libbpf before 0.8. I'm somewhat concerned that to work
> around these linkage problems we're adding runtime errors - we may
> build but the functionality is totally crippled. Is it worth
> maintaining these broken builds or to just upfront fail the feature
> test?
>
> We can also switch the feature tests for LIBBPF_MAJOR_VERSION and
> LIBBPF_MINOR_VERSION checks. This would have the property of letting
> us tie the error messages to what version of libbpf is assumed.
>
> In this case we could have a feature test for the libbpf version and
> if the version is before libbpf 0.8 fail the feature check. A quick
> way to do this is:
> ```
> diff --git a/tools/build/feature/test-libbpf.c
> b/tools/build/feature/test-libbpf.c
> index a508756cf4cc..dadd8186b71d 100644
> --- a/tools/build/feature/test-libbpf.c
> +++ b/tools/build/feature/test-libbpf.c
> @@ -1,6 +1,10 @@
> // SPDX-License-Identifier: GPL-2.0
> #include <bpf/libbpf.h>
>
> +#if (LIBBPF_MAJOR_VERSION == 0) && (LIBBPF_MINOR_VERSION < 8)
> +#error At least libbpf 0.8 is assumed for Linux tools.
> +#endif
> +
> int main(void)
> {
>        return bpf_object__open("test") ? 0 : -1;
> ```
>
> Thanks,
> Ian

Oh, just to note. While failing the feature test is disappointing for
a libbpf that isn't very old, we have the newer libbpf to statically
build in. Developers won't be impacted due to the static route. If you
are a distro maintainer, you should just update your libbpf. So we
could just bump the API assumption to 1.0 as I believe that'd have the
advantage of removing feature tests, workarounds, untested code (like
what broke here), etc.

What do you think?

Thanks,
Ian

> > > jirka
> > >
> > > >
> > > > But yeah, previous experiences with Andrii were that we can do not too
> > > > costly feature checks, not using .c programs that would fail if some
> > > > required feature wasn't present but instead would just do some grep on a
> > > > header and if some "smell" wasn't scent, just fail the cap query.
> > > >
> > > > - Arnaldo

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v3 1/2] perf build: Properly guard libbpf includes
  2023-01-09 19:34                   ` Ian Rogers
@ 2023-01-09 20:40                     ` Ian Rogers
  2023-01-10 11:19                     ` Jiri Olsa
  1 sibling, 0 replies; 20+ messages in thread
From: Ian Rogers @ 2023-01-09 20:40 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Arnaldo Carvalho de Melo, Mike Leach, linux-perf-users,
	linux-kernel, bpf, peterz, mingo, mark.rutland,
	alexander.shishkin, namhyung

On Mon, Jan 9, 2023 at 11:34 AM Ian Rogers <irogers@google.com> wrote:
>
> On Mon, Jan 9, 2023 at 11:29 AM Ian Rogers <irogers@google.com> wrote:
> >
> > On Mon, Jan 9, 2023 at 10:37 AM Ian Rogers <irogers@google.com> wrote:
> > >
> > > On Mon, Jan 9, 2023 at 10:10 AM Jiri Olsa <olsajiri@gmail.com> wrote:
> > > >
> > > > On Mon, Jan 09, 2023 at 12:12:15PM -0300, Arnaldo Carvalho de Melo wrote:
> > > > > Em Fri, Jan 06, 2023 at 11:06:46AM -0800, Ian Rogers escreveu:
> > > > > > So trying to get build-test working on my Debian derived distro is a
> > > > > > PITA with broken feature detection for options I don't normally use.
> > > > >
> > > > > Its really difficult to have perf building with so many dependent
> > > > > libraries, mowing out some should be in order.
> > > > >
> > > > > > I'll try to fix this.
> > > > >
> > > > > Thanks.
> > > > >
> > > > > > In any case I think I've spotted what is really happening here and it
> > > > > > isn't a failure but a feature :-D The build is specifying
> > > > >
> > > > > I get it.
> > > > >
> > > > > > LIBBPF_DYNAMIC=1 which means you get the libbpf headers from
> > > > > > /usr/include. I think the build is trying to do this on a system with
> > > > > > an old libbpf and hence getting the failures above. Previously, even
> > > > > > though we wanted the dynamic headers we still had a -I, this time for
> > > > > > the install_headers version. Now you really are using the system
> > > > > > version and it is broken. This means a few things:
> > > > > > - the libbpf feature test should fail if code like above is going to fail,
> > > > >
> > > > > Agreed.
> > > > >
> > > > > > - we may want to contemplate supporting older libbpfs (I'd rather not),
> > > > >
> > > > > I'd rather require everybody to be up to the latest trends, but I really
> > > > > don't think that is a reasonable expectation.
> > > > >
> > > > > > - does build-test have a way to skip known issues like this?
> > > > >
> > > > > Unsure, Jiri?
> > > >
> > > > I don't think so it just triggers the build, it's up to the features check
> > > > to disable the feature if the library is not compatible with perf code
> > > >
> > > > could we add that specific libbpf call to the libbpf feature check?
> > >
> > > Looking at the failure closer, the failing code is code inside a
> > > feature check trying to workaround the feature not being present. We
> > > need to do something like:
> > >
> > > ```
> > > diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
> > > index 6e9b06cf06ee..a1c3cc230273 100644
> > > --- a/tools/perf/util/bpf-loader.c
> > > +++ b/tools/perf/util/bpf-loader.c
> > > @@ -33,17 +33,18 @@
> > > #include <internal/xyarray.h>
> > >
> > > #ifndef HAVE_LIBBPF_BPF_PROGRAM__SET_INSNS
> > > -int bpf_program__set_insns(struct bpf_program *prog __maybe_unused,
> > > -                          struct bpf_insn *new_insns __maybe_unused,
> > > size_t new_insn_cnt __maybe_un
> > > used)
> > > +static int bpf_program__set_insns(struct bpf_program *prog __maybe_unused,
> > > +                                 struct bpf_insn *new_insns __maybe_unused,
> > > +                                 size_t new_insn_cnt __maybe_unused)
> > > {
> > >        pr_err("%s: not support, update libbpf\n", __func__);
> > >        return -ENOTSUP;
> > > }
> > >
> > > -int libbpf_register_prog_handler(const char *sec __maybe_unused,
> > > -                                 enum bpf_prog_type prog_type __maybe_unused,
> > > -                                 enum bpf_attach_type exp_attach_type
> > > __maybe_unused,
> > > -                                 const struct
> > > libbpf_prog_handler_opts *opts __maybe_unused)
> > > +static int libbpf_register_prog_handler(const char *sec __maybe_unused,
> > > +                                       enum bpf_prog_type prog_type
> > > __maybe_unused,
> > > +                                       enum bpf_attach_type
> > > exp_attach_type __maybe_unused,
> > > +                                       const void *opts __maybe_unused)
> > > {
> > >        pr_err("%s: not support, update libbpf\n", __func__);
> > >        return -ENOTSUP;
> > > ```
> > >
> > > There are some other fixes necessary too. I'll try to write the fuller
> > > patch but I have no means for testing except for undefining
> > > HAVE_LIBBPF_BPF_PROGRAM__SET_INSNS.
> > >
> > > Thanks,
> > > Ian
> >
> > So libbpf_prog_handler_opts is missing in the failing build, this
> > points to a libbpf before 0.8. I'm somewhat concerned that to work
> > around these linkage problems we're adding runtime errors - we may
> > build but the functionality is totally crippled. Is it worth
> > maintaining these broken builds or to just upfront fail the feature
> > test?
> >
> > We can also switch the feature tests for LIBBPF_MAJOR_VERSION and
> > LIBBPF_MINOR_VERSION checks. This would have the property of letting
> > us tie the error messages to what version of libbpf is assumed.
> >
> > In this case we could have a feature test for the libbpf version and
> > if the version is before libbpf 0.8 fail the feature check. A quick
> > way to do this is:
> > ```
> > diff --git a/tools/build/feature/test-libbpf.c
> > b/tools/build/feature/test-libbpf.c
> > index a508756cf4cc..dadd8186b71d 100644
> > --- a/tools/build/feature/test-libbpf.c
> > +++ b/tools/build/feature/test-libbpf.c
> > @@ -1,6 +1,10 @@
> > // SPDX-License-Identifier: GPL-2.0
> > #include <bpf/libbpf.h>
> >
> > +#if (LIBBPF_MAJOR_VERSION == 0) && (LIBBPF_MINOR_VERSION < 8)
> > +#error At least libbpf 0.8 is assumed for Linux tools.
> > +#endif
> > +
> > int main(void)
> > {
> >        return bpf_object__open("test") ? 0 : -1;
> > ```
> >
> > Thanks,
> > Ian
>
> Oh, just to note. While failing the feature test is disappointing for
> a libbpf that isn't very old, we have the newer libbpf to statically
> build in. Developers won't be impacted due to the static route. If you
> are a distro maintainer, you should just update your libbpf. So we
> could just bump the API assumption to 1.0 as I believe that'd have the
> advantage of removing feature tests, workarounds, untested code (like
> what broke here), etc.
>
> What do you think?
>
> Thanks,
> Ian

The removal of pre-libbpf 1.0 support is in:
https://lore.kernel.org/lkml/20230109203424.1157561-1-irogers@google.com/
So my proposal is that for 6.2 these two patches are sufficient. In
perf/core (to be in 6.3) it makes sense to add both sets of patches to
fix the build issue reported here. The problem with that is that some
build tests will fail for 6.2 if they are testing libbpf dynamic with
a libbpf earlier than 1.0. If that is an issue then cherry-picking the
first or all of the pre-libbpf 1.0 removal patches should address it.

Thanks,
Ian

> > > > jirka
> > > >
> > > > >
> > > > > But yeah, previous experiences with Andrii were that we can do not too
> > > > > costly feature checks, not using .c programs that would fail if some
> > > > > required feature wasn't present but instead would just do some grep on a
> > > > > header and if some "smell" wasn't scent, just fail the cap query.
> > > > >
> > > > > - Arnaldo

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v3 1/2] perf build: Properly guard libbpf includes
  2023-01-09 19:34                   ` Ian Rogers
  2023-01-09 20:40                     ` Ian Rogers
@ 2023-01-10 11:19                     ` Jiri Olsa
  2023-01-10 13:35                       ` Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 20+ messages in thread
From: Jiri Olsa @ 2023-01-10 11:19 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Jiri Olsa, Arnaldo Carvalho de Melo, Mike Leach,
	linux-perf-users, linux-kernel, bpf, peterz, mingo, mark.rutland,
	alexander.shishkin, namhyung

On Mon, Jan 09, 2023 at 11:34:44AM -0800, Ian Rogers wrote:
> On Mon, Jan 9, 2023 at 11:29 AM Ian Rogers <irogers@google.com> wrote:
> >
> > On Mon, Jan 9, 2023 at 10:37 AM Ian Rogers <irogers@google.com> wrote:
> > >
> > > On Mon, Jan 9, 2023 at 10:10 AM Jiri Olsa <olsajiri@gmail.com> wrote:
> > > >
> > > > On Mon, Jan 09, 2023 at 12:12:15PM -0300, Arnaldo Carvalho de Melo wrote:
> > > > > Em Fri, Jan 06, 2023 at 11:06:46AM -0800, Ian Rogers escreveu:
> > > > > > So trying to get build-test working on my Debian derived distro is a
> > > > > > PITA with broken feature detection for options I don't normally use.
> > > > >
> > > > > Its really difficult to have perf building with so many dependent
> > > > > libraries, mowing out some should be in order.
> > > > >
> > > > > > I'll try to fix this.
> > > > >
> > > > > Thanks.
> > > > >
> > > > > > In any case I think I've spotted what is really happening here and it
> > > > > > isn't a failure but a feature :-D The build is specifying
> > > > >
> > > > > I get it.
> > > > >
> > > > > > LIBBPF_DYNAMIC=1 which means you get the libbpf headers from
> > > > > > /usr/include. I think the build is trying to do this on a system with
> > > > > > an old libbpf and hence getting the failures above. Previously, even
> > > > > > though we wanted the dynamic headers we still had a -I, this time for
> > > > > > the install_headers version. Now you really are using the system
> > > > > > version and it is broken. This means a few things:
> > > > > > - the libbpf feature test should fail if code like above is going to fail,
> > > > >
> > > > > Agreed.
> > > > >
> > > > > > - we may want to contemplate supporting older libbpfs (I'd rather not),
> > > > >
> > > > > I'd rather require everybody to be up to the latest trends, but I really
> > > > > don't think that is a reasonable expectation.
> > > > >
> > > > > > - does build-test have a way to skip known issues like this?
> > > > >
> > > > > Unsure, Jiri?
> > > >
> > > > I don't think so it just triggers the build, it's up to the features check
> > > > to disable the feature if the library is not compatible with perf code
> > > >
> > > > could we add that specific libbpf call to the libbpf feature check?
> > >
> > > Looking at the failure closer, the failing code is code inside a
> > > feature check trying to workaround the feature not being present. We
> > > need to do something like:
> > >
> > > ```
> > > diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
> > > index 6e9b06cf06ee..a1c3cc230273 100644
> > > --- a/tools/perf/util/bpf-loader.c
> > > +++ b/tools/perf/util/bpf-loader.c
> > > @@ -33,17 +33,18 @@
> > > #include <internal/xyarray.h>
> > >
> > > #ifndef HAVE_LIBBPF_BPF_PROGRAM__SET_INSNS
> > > -int bpf_program__set_insns(struct bpf_program *prog __maybe_unused,
> > > -                          struct bpf_insn *new_insns __maybe_unused,
> > > size_t new_insn_cnt __maybe_un
> > > used)
> > > +static int bpf_program__set_insns(struct bpf_program *prog __maybe_unused,
> > > +                                 struct bpf_insn *new_insns __maybe_unused,
> > > +                                 size_t new_insn_cnt __maybe_unused)
> > > {
> > >        pr_err("%s: not support, update libbpf\n", __func__);
> > >        return -ENOTSUP;
> > > }
> > >
> > > -int libbpf_register_prog_handler(const char *sec __maybe_unused,
> > > -                                 enum bpf_prog_type prog_type __maybe_unused,
> > > -                                 enum bpf_attach_type exp_attach_type
> > > __maybe_unused,
> > > -                                 const struct
> > > libbpf_prog_handler_opts *opts __maybe_unused)
> > > +static int libbpf_register_prog_handler(const char *sec __maybe_unused,
> > > +                                       enum bpf_prog_type prog_type
> > > __maybe_unused,
> > > +                                       enum bpf_attach_type
> > > exp_attach_type __maybe_unused,
> > > +                                       const void *opts __maybe_unused)
> > > {
> > >        pr_err("%s: not support, update libbpf\n", __func__);
> > >        return -ENOTSUP;
> > > ```
> > >
> > > There are some other fixes necessary too. I'll try to write the fuller
> > > patch but I have no means for testing except for undefining
> > > HAVE_LIBBPF_BPF_PROGRAM__SET_INSNS.
> > >
> > > Thanks,
> > > Ian
> >
> > So libbpf_prog_handler_opts is missing in the failing build, this
> > points to a libbpf before 0.8. I'm somewhat concerned that to work
> > around these linkage problems we're adding runtime errors - we may
> > build but the functionality is totally crippled. Is it worth
> > maintaining these broken builds or to just upfront fail the feature
> > test?
> >
> > We can also switch the feature tests for LIBBPF_MAJOR_VERSION and
> > LIBBPF_MINOR_VERSION checks. This would have the property of letting
> > us tie the error messages to what version of libbpf is assumed.
> >
> > In this case we could have a feature test for the libbpf version and
> > if the version is before libbpf 0.8 fail the feature check. A quick
> > way to do this is:
> > ```
> > diff --git a/tools/build/feature/test-libbpf.c
> > b/tools/build/feature/test-libbpf.c
> > index a508756cf4cc..dadd8186b71d 100644
> > --- a/tools/build/feature/test-libbpf.c
> > +++ b/tools/build/feature/test-libbpf.c
> > @@ -1,6 +1,10 @@
> > // SPDX-License-Identifier: GPL-2.0
> > #include <bpf/libbpf.h>
> >
> > +#if (LIBBPF_MAJOR_VERSION == 0) && (LIBBPF_MINOR_VERSION < 8)
> > +#error At least libbpf 0.8 is assumed for Linux tools.
> > +#endif
> > +
> > int main(void)
> > {
> >        return bpf_object__open("test") ? 0 : -1;
> > ```
> >
> > Thanks,
> > Ian
> 
> Oh, just to note. While failing the feature test is disappointing for
> a libbpf that isn't very old, we have the newer libbpf to statically
> build in. Developers won't be impacted due to the static route. If you
> are a distro maintainer, you should just update your libbpf. So we
> could just bump the API assumption to 1.0 as I believe that'd have the
> advantage of removing feature tests, workarounds, untested code (like
> what broke here), etc.
> 
> What do you think?

yes, seems good.. fedora has libbpf 1.0 already so should not be problem
there at least ;-)

thanks,
jirka

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v3 1/2] perf build: Properly guard libbpf includes
  2023-01-10 11:19                     ` Jiri Olsa
@ 2023-01-10 13:35                       ` Arnaldo Carvalho de Melo
  2023-01-10 13:39                         ` Jiri Olsa
  0 siblings, 1 reply; 20+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-01-10 13:35 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Ian Rogers, Mike Leach, linux-perf-users, linux-kernel, bpf,
	peterz, mingo, mark.rutland, alexander.shishkin, namhyung

Em Tue, Jan 10, 2023 at 12:19:53PM +0100, Jiri Olsa escreveu:
> On Mon, Jan 09, 2023 at 11:34:44AM -0800, Ian Rogers wrote:
> > Oh, just to note. While failing the feature test is disappointing for
> > a libbpf that isn't very old, we have the newer libbpf to statically
> > build in. Developers won't be impacted due to the static route. If you
> > are a distro maintainer, you should just update your libbpf. So we
> > could just bump the API assumption to 1.0 as I believe that'd have the
> > advantage of removing feature tests, workarounds, untested code (like
> > what broke here), etc.

> > What do you think?
 
> yes, seems good.. fedora has libbpf 1.0 already so should not be problem
> there at least ;-)

So, I already pushed 1/2 to perf/urgent, can I stick an Acked-by: jolsa
to the second?

- Arnaldo

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v3 1/2] perf build: Properly guard libbpf includes
  2023-01-10 13:35                       ` Arnaldo Carvalho de Melo
@ 2023-01-10 13:39                         ` Jiri Olsa
  0 siblings, 0 replies; 20+ messages in thread
From: Jiri Olsa @ 2023-01-10 13:39 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, Ian Rogers, Mike Leach, linux-perf-users,
	linux-kernel, bpf, peterz, mingo, mark.rutland,
	alexander.shishkin, namhyung

On Tue, Jan 10, 2023 at 10:35:19AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Tue, Jan 10, 2023 at 12:19:53PM +0100, Jiri Olsa escreveu:
> > On Mon, Jan 09, 2023 at 11:34:44AM -0800, Ian Rogers wrote:
> > > Oh, just to note. While failing the feature test is disappointing for
> > > a libbpf that isn't very old, we have the newer libbpf to statically
> > > build in. Developers won't be impacted due to the static route. If you
> > > are a distro maintainer, you should just update your libbpf. So we
> > > could just bump the API assumption to 1.0 as I believe that'd have the
> > > advantage of removing feature tests, workarounds, untested code (like
> > > what broke here), etc.
> 
> > > What do you think?
>  
> > yes, seems good.. fedora has libbpf 1.0 already so should not be problem
> > there at least ;-)
> 
> So, I already pushed 1/2 to perf/urgent, can I stick an Acked-by: jolsa
> to the second?

yes

jirka

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v3 1/2] perf build: Properly guard libbpf includes
  2023-01-09 19:29                 ` Ian Rogers
  2023-01-09 19:34                   ` Ian Rogers
@ 2023-01-10 14:31                   ` Arnaldo Carvalho de Melo
  2023-01-10 14:46                     ` Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 20+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-01-10 14:31 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Jiri Olsa, Mike Leach, linux-perf-users, linux-kernel, bpf,
	peterz, mingo, mark.rutland, alexander.shishkin, namhyung

Em Mon, Jan 09, 2023 at 11:29:51AM -0800, Ian Rogers escreveu:
> On Mon, Jan 9, 2023 at 10:37 AM Ian Rogers <irogers@google.com> wrote:
> >
> > On Mon, Jan 9, 2023 at 10:10 AM Jiri Olsa <olsajiri@gmail.com> wrote:
> > >
> > > On Mon, Jan 09, 2023 at 12:12:15PM -0300, Arnaldo Carvalho de Melo wrote:
> > > > Em Fri, Jan 06, 2023 at 11:06:46AM -0800, Ian Rogers escreveu:
> > > > > So trying to get build-test working on my Debian derived distro is a
> > > > > PITA with broken feature detection for options I don't normally use.
> > > >
> > > > Its really difficult to have perf building with so many dependent
> > > > libraries, mowing out some should be in order.
> > > >
> > > > > I'll try to fix this.
> > > >
> > > > Thanks.
> > > >
> > > > > In any case I think I've spotted what is really happening here and it
> > > > > isn't a failure but a feature :-D The build is specifying
> > > >
> > > > I get it.
> > > >
> > > > > LIBBPF_DYNAMIC=1 which means you get the libbpf headers from
> > > > > /usr/include. I think the build is trying to do this on a system with
> > > > > an old libbpf and hence getting the failures above. Previously, even
> > > > > though we wanted the dynamic headers we still had a -I, this time for
> > > > > the install_headers version. Now you really are using the system
> > > > > version and it is broken. This means a few things:
> > > > > - the libbpf feature test should fail if code like above is going to fail,
> > > >
> > > > Agreed.
> > > >
> > > > > - we may want to contemplate supporting older libbpfs (I'd rather not),
> > > >
> > > > I'd rather require everybody to be up to the latest trends, but I really
> > > > don't think that is a reasonable expectation.
> > > >
> > > > > - does build-test have a way to skip known issues like this?
> > > >
> > > > Unsure, Jiri?
> > >
> > > I don't think so it just triggers the build, it's up to the features check
> > > to disable the feature if the library is not compatible with perf code
> > >
> > > could we add that specific libbpf call to the libbpf feature check?
> >
> > Looking at the failure closer, the failing code is code inside a
> > feature check trying to workaround the feature not being present. We
> > need to do something like:
> >
> > ```
> > diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
> > index 6e9b06cf06ee..a1c3cc230273 100644
> > --- a/tools/perf/util/bpf-loader.c
> > +++ b/tools/perf/util/bpf-loader.c
> > @@ -33,17 +33,18 @@
> > #include <internal/xyarray.h>
> >
> > #ifndef HAVE_LIBBPF_BPF_PROGRAM__SET_INSNS
> > -int bpf_program__set_insns(struct bpf_program *prog __maybe_unused,
> > -                          struct bpf_insn *new_insns __maybe_unused,
> > size_t new_insn_cnt __maybe_un
> > used)
> > +static int bpf_program__set_insns(struct bpf_program *prog __maybe_unused,
> > +                                 struct bpf_insn *new_insns __maybe_unused,
> > +                                 size_t new_insn_cnt __maybe_unused)
> > {
> >        pr_err("%s: not support, update libbpf\n", __func__);
> >        return -ENOTSUP;
> > }
> >
> > -int libbpf_register_prog_handler(const char *sec __maybe_unused,
> > -                                 enum bpf_prog_type prog_type __maybe_unused,
> > -                                 enum bpf_attach_type exp_attach_type
> > __maybe_unused,
> > -                                 const struct
> > libbpf_prog_handler_opts *opts __maybe_unused)
> > +static int libbpf_register_prog_handler(const char *sec __maybe_unused,
> > +                                       enum bpf_prog_type prog_type
> > __maybe_unused,
> > +                                       enum bpf_attach_type
> > exp_attach_type __maybe_unused,
> > +                                       const void *opts __maybe_unused)
> > {
> >        pr_err("%s: not support, update libbpf\n", __func__);
> >        return -ENOTSUP;
> > ```
> >
> > There are some other fixes necessary too. I'll try to write the fuller
> > patch but I have no means for testing except for undefining
> > HAVE_LIBBPF_BPF_PROGRAM__SET_INSNS.
> >
> > Thanks,
> > Ian
> 
> So libbpf_prog_handler_opts is missing in the failing build, this
> points to a libbpf before 0.8. I'm somewhat concerned that to work
> around these linkage problems we're adding runtime errors - we may
> build but the functionality is totally crippled. Is it worth
> maintaining these broken builds or to just upfront fail the feature
> test?

Probably better to make the feature test disable bpf support while
emitting a warning that features such as a, b, and c won't we available.

- Arnaldo
 
> We can also switch the feature tests for LIBBPF_MAJOR_VERSION and
> LIBBPF_MINOR_VERSION checks. This would have the property of letting
> us tie the error messages to what version of libbpf is assumed.
> 
> In this case we could have a feature test for the libbpf version and
> if the version is before libbpf 0.8 fail the feature check. A quick
> way to do this is:
> ```
> diff --git a/tools/build/feature/test-libbpf.c
> b/tools/build/feature/test-libbpf.c
> index a508756cf4cc..dadd8186b71d 100644
> --- a/tools/build/feature/test-libbpf.c
> +++ b/tools/build/feature/test-libbpf.c
> @@ -1,6 +1,10 @@
> // SPDX-License-Identifier: GPL-2.0
> #include <bpf/libbpf.h>
> 
> +#if (LIBBPF_MAJOR_VERSION == 0) && (LIBBPF_MINOR_VERSION < 8)
> +#error At least libbpf 0.8 is assumed for Linux tools.
> +#endif
> +
> int main(void)
> {
>        return bpf_object__open("test") ? 0 : -1;
> ```
> 
> Thanks,
> Ian
> 
> > > jirka
> > >
> > > >
> > > > But yeah, previous experiences with Andrii were that we can do not too
> > > > costly feature checks, not using .c programs that would fail if some
> > > > required feature wasn't present but instead would just do some grep on a
> > > > header and if some "smell" wasn't scent, just fail the cap query.
> > > >
> > > > - Arnaldo

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v3 1/2] perf build: Properly guard libbpf includes
  2023-01-10 14:31                   ` Arnaldo Carvalho de Melo
@ 2023-01-10 14:46                     ` Arnaldo Carvalho de Melo
  2023-01-10 20:00                       ` Ian Rogers
  0 siblings, 1 reply; 20+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-01-10 14:46 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Jiri Olsa, Mike Leach, linux-perf-users, linux-kernel, bpf,
	peterz, mingo, mark.rutland, alexander.shishkin, namhyung

Em Tue, Jan 10, 2023 at 11:31:12AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Mon, Jan 09, 2023 at 11:29:51AM -0800, Ian Rogers escreveu:
> > On Mon, Jan 9, 2023 at 10:37 AM Ian Rogers <irogers@google.com> wrote:
> > > -int libbpf_register_prog_handler(const char *sec __maybe_unused,
> > > -                                 enum bpf_prog_type prog_type __maybe_unused,
> > > -                                 enum bpf_attach_type exp_attach_type
> > > __maybe_unused,
> > > -                                 const struct
> > > libbpf_prog_handler_opts *opts __maybe_unused)
> > > +static int libbpf_register_prog_handler(const char *sec __maybe_unused,
> > > +                                       enum bpf_prog_type prog_type
> > > __maybe_unused,
> > > +                                       enum bpf_attach_type
> > > exp_attach_type __maybe_unused,
> > > +                                       const void *opts __maybe_unused)
> > > {
> > >        pr_err("%s: not support, update libbpf\n", __func__);
> > >        return -ENOTSUP;
> > > ```
> > >
> > > There are some other fixes necessary too. I'll try to write the fuller
> > > patch but I have no means for testing except for undefining
> > > HAVE_LIBBPF_BPF_PROGRAM__SET_INSNS.
> > 
> > So libbpf_prog_handler_opts is missing in the failing build, this
> > points to a libbpf before 0.8. I'm somewhat concerned that to work
> > around these linkage problems we're adding runtime errors - we may
> > build but the functionality is totally crippled. Is it worth
> > maintaining these broken builds or to just upfront fail the feature
> > test?
 
> Probably better to make the feature test disable bpf support while
> emitting a warning that features such as a, b, and c won't we available.

This would be the one-liner I think is appropriate for v6.2, ok?

diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 9962ae23ab8c5868..5b87846759036f6f 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -589,6 +589,8 @@ ifndef NO_LIBELF
           $(call feature_check,libbpf-bpf_program__set_insns)
           ifeq ($(feature-libbpf-bpf_program__set_insns), 1)
             CFLAGS += -DHAVE_LIBBPF_BPF_PROGRAM__SET_INSNS
+          else
+            dummy := $(error Error: libbpf devel library needs to be >= 0.8.0 to build with LIBBPF_DYNAMIC, update or build statically with the version that comes with the kernel sources);
           endif
           $(call feature_check,libbpf-btf__raw_data)
           ifeq ($(feature-libbpf-btf__raw_data), 1)

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH v3 1/2] perf build: Properly guard libbpf includes
  2023-01-10 14:46                     ` Arnaldo Carvalho de Melo
@ 2023-01-10 20:00                       ` Ian Rogers
  0 siblings, 0 replies; 20+ messages in thread
From: Ian Rogers @ 2023-01-10 20:00 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, Mike Leach, linux-perf-users, linux-kernel, bpf,
	peterz, mingo, mark.rutland, alexander.shishkin, namhyung

On Tue, Jan 10, 2023 at 6:46 AM Arnaldo Carvalho de Melo
<acme@kernel.org> wrote:
>
> Em Tue, Jan 10, 2023 at 11:31:12AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Mon, Jan 09, 2023 at 11:29:51AM -0800, Ian Rogers escreveu:
> > > On Mon, Jan 9, 2023 at 10:37 AM Ian Rogers <irogers@google.com> wrote:
> > > > -int libbpf_register_prog_handler(const char *sec __maybe_unused,
> > > > -                                 enum bpf_prog_type prog_type __maybe_unused,
> > > > -                                 enum bpf_attach_type exp_attach_type
> > > > __maybe_unused,
> > > > -                                 const struct
> > > > libbpf_prog_handler_opts *opts __maybe_unused)
> > > > +static int libbpf_register_prog_handler(const char *sec __maybe_unused,
> > > > +                                       enum bpf_prog_type prog_type
> > > > __maybe_unused,
> > > > +                                       enum bpf_attach_type
> > > > exp_attach_type __maybe_unused,
> > > > +                                       const void *opts __maybe_unused)
> > > > {
> > > >        pr_err("%s: not support, update libbpf\n", __func__);
> > > >        return -ENOTSUP;
> > > > ```
> > > >
> > > > There are some other fixes necessary too. I'll try to write the fuller
> > > > patch but I have no means for testing except for undefining
> > > > HAVE_LIBBPF_BPF_PROGRAM__SET_INSNS.
> > >
> > > So libbpf_prog_handler_opts is missing in the failing build, this
> > > points to a libbpf before 0.8. I'm somewhat concerned that to work
> > > around these linkage problems we're adding runtime errors - we may
> > > build but the functionality is totally crippled. Is it worth
> > > maintaining these broken builds or to just upfront fail the feature
> > > test?
>
> > Probably better to make the feature test disable bpf support while
> > emitting a warning that features such as a, b, and c won't we available.
>
> This would be the one-liner I think is appropriate for v6.2, ok?
>
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index 9962ae23ab8c5868..5b87846759036f6f 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -589,6 +589,8 @@ ifndef NO_LIBELF
>            $(call feature_check,libbpf-bpf_program__set_insns)
>            ifeq ($(feature-libbpf-bpf_program__set_insns), 1)
>              CFLAGS += -DHAVE_LIBBPF_BPF_PROGRAM__SET_INSNS
> +          else
> +            dummy := $(error Error: libbpf devel library needs to be >= 0.8.0 to build with LIBBPF_DYNAMIC, update or build statically with the version that comes with the kernel sources);

It is ok. The intent/result should be the same as:
https://lore.kernel.org/lkml/20230109203424.1157561-2-irogers@google.com/
but it doesn't change a file outside of tools/perf. I think the change
above would be preferable for 6.3.

Thanks,
Ian

>            endif
>            $(call feature_check,libbpf-btf__raw_data)
>            ifeq ($(feature-libbpf-btf__raw_data), 1)

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2023-01-10 20:00 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-06 15:13 [PATCH v3 1/2] perf build: Properly guard libbpf includes Ian Rogers
2023-01-06 15:13 ` [PATCH v3 2/2] perf build: Fix build error when NO_LIBBPF=1 Ian Rogers
2023-01-06 15:28 ` [PATCH v3 1/2] perf build: Properly guard libbpf includes Mike Leach
2023-01-06 17:25   ` Arnaldo Carvalho de Melo
2023-01-06 17:53     ` Arnaldo Carvalho de Melo
2023-01-06 17:55       ` Arnaldo Carvalho de Melo
2023-01-06 19:06         ` Ian Rogers
2023-01-09 15:12           ` Arnaldo Carvalho de Melo
2023-01-09 18:10             ` Jiri Olsa
2023-01-09 18:37               ` Ian Rogers
2023-01-09 19:29                 ` Ian Rogers
2023-01-09 19:34                   ` Ian Rogers
2023-01-09 20:40                     ` Ian Rogers
2023-01-10 11:19                     ` Jiri Olsa
2023-01-10 13:35                       ` Arnaldo Carvalho de Melo
2023-01-10 13:39                         ` Jiri Olsa
2023-01-10 14:31                   ` Arnaldo Carvalho de Melo
2023-01-10 14:46                     ` Arnaldo Carvalho de Melo
2023-01-10 20:00                       ` Ian Rogers
2023-01-06 17:57       ` Ian Rogers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).