Re: [PATCH 2/3] perf build: Use libtraceevent from the system

From: Arnaldo Carvalho de Melo
Date: Tue Dec 06 2022 - 11:42:39 EST


Em Tue, Dec 06, 2022 at 01:37:27PM -0300, Arnaldo Carvalho de Melo escreveu:
>
> Below makes it progress a bit, now to look at the perl Context stuff.
>

Add this to the mix:

diff --git a/tools/perf/Build b/tools/perf/Build
index edafe3cb3d075f00..c11ac63be7f755df 100644
--- a/tools/perf/Build
+++ b/tools/perf/Build
@@ -52,7 +52,7 @@ CFLAGS_builtin-report.o += -DDOCDIR="BUILD_STR($(srcdir_SQ)/Documentation)"
perf-y += util/
perf-y += arch/
perf-y += ui/
-perf-y += scripts/
+perf-$(CONFIG_TRACEEVENT) += scripts/
perf-$(CONFIG_TRACE) += trace/beauty/

gtk-y += ui/gtk/


Now to look at the BUILD_BPF_SKEL=1 kaboom:

[acme@quaco perf]$ alias m
alias m='rm -rf ~/libexec/perf-core/ ; make -k NO_LIBTRACEEVENT=1 BUILD_BPF_SKEL=1 O=/tmp/build/perf -C tools/perf install-bin && perf test python'
[acme@quaco perf]$ m
make: Entering directory '/home/acme/git/perf/tools/perf'
BUILD: Doing 'make -j8' parallel build
<SNIP>
/usr/bin/ld: /tmp/build/perf/perf-in.o: in function `add_work':
/home/acme/git/perf/tools/perf/util/bpf_kwork.c:285: undefined reference to `perf_kwork_add_work'
/usr/bin/ld: /tmp/build/perf/perf-in.o: in function `lock_contention_read':
/home/acme/git/perf/tools/perf/util/bpf_lock_contention.c:156: undefined reference to `is_lock_function'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile.perf:674: /tmp/build/perf/perf] Error 1
make[1]: *** [Makefile.perf:236: sub-make] Error 2
make: *** [Makefile:113: install-bin] Error 2
make: Leaving directory '/home/acme/git/perf/tools/perf'
[acme@quaco perf]$