Re: [PATCH 01/21] tools lib: Add list_sort.

From: Arnaldo Carvalho de Melo
Date: Fri Oct 08 2021 - 16:21:36 EST


Em Thu, Oct 07, 2021 at 09:56:27AM -0700, Ian Rogers escreveu:
> Add list_sort.[ch] from the main kernel tree. The linux/bug.h #include
> is removed due to conflicting definitions. Add check-headers and modify
> perf build accordingly.
>
> Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>

⬢[acme@toolbox perf]$ make -C tools/perf build-test
make: Entering directory '/var/home/acme/git/perf/tools/perf'
- tarpkg: ./tests/perf-targz-src-pkg .
make[1]: *** [tests/make:347: tarpkg] Error 2
make: *** [Makefile:103: build-test] Error 2
make: Leaving directory '/var/home/acme/git/perf/tools/perf'

⬢[acme@toolbox perf]$ ./tools/perf/tests/perf-targz-src-pkg tools/perf
PERF_VERSION = 5.15.rc4.g0df4a50ab5aa
PERF_VERSION = 5.15.rc4.g0df4a50ab5aa
make[4]: *** No rule to make target '../lib/list_sort.c', needed by 'util/list_sort.o'. Stop.
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [/tmp/tmp.FxRkhaWUYd/perf-5.15.0-rc4/tools/build/Makefile.build:139: util] Error 2
make[2]: *** [Makefile.perf:660: perf-in.o] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile.perf:240: sub-make] Error 2
make: *** [Makefile:70: all] Error 2
⬢[acme@toolbox perf]$

Adding this new file to the file below cures things, I'm doing it:

diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST
index f05c4d48fd7e01c0..e728615a3830848f 100644
--- a/tools/perf/MANIFEST
+++ b/tools/perf/MANIFEST
@@ -17,6 +17,7 @@ tools/lib/symbol/kallsyms.c
tools/lib/symbol/kallsyms.h
tools/lib/find_bit.c
tools/lib/bitmap.c
+tools/lib/list_sort.c
tools/lib/str_error_r.c
tools/lib/vsprintf.c
tools/lib/zalloc.c
diff --git a/tools/perf/util/python-ext-sources b/tools/perf/util/python-ext-sources
index d7c976671e3a131a..a685d20165f785a1 100644
--- a/tools/perf/util/python-ext-sources
+++ b/tools/perf/util/python-ext-sources
@@ -18,6 +18,7 @@ util/mmap.c
util/namespaces.c
../lib/bitmap.c
../lib/find_bit.c
+../lib/list_sort.c
../lib/hweight.c
../lib/string.c
../lib/vsprintf.c