Re: [PATCH v1 00/14] Fix perf tools/lib includes
From: Arnaldo Carvalho de Melo
Date: Wed Nov 09 2022 - 13:03:06 EST
Em Wed, Nov 09, 2022 at 12:27:19PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Mon, Nov 07, 2022 at 11:35:04PM -0800, Ian Rogers escreveu:
> > The previous build would add -Itools/lib and get dependencies for
> > libtraceevent, libsubcmd, libsymbol, libapi and libbpf meaning that
> > overriding these libraries would change the link time dependency but
> > the headers would erroneously come from tools/lib. Fix the build to
> > install headers and then depend on these. To reduce exposing internal
> > headers/APIs some clean up is performed. tools/lib/symbol has a
> > Makefile added, while tools/lib/api and tools/lib/subcmd have install
> > targets added. The pattern used for the dependencies in Makefile.perf
> > is modelled on libbpf.
>
> It builds with O=, I tried it one by one, but there are problems with
> make from a detached tarball, that is how I do the container builds, see
> below, I'm trying to figure this out...
>
> ⬢[acme@toolbox perf]$ make perf-tar-src-pkg
> TAR
> PERF_VERSION = 6.1.rc3.g7e5d8b7a1fbd
> ⬢[acme@toolbox perf]$ mv perf-6.1.0-rc3.tar /tmp
> ⬢[acme@toolbox perf]$ cd /tmp
> ⬢[acme@toolbox tmp]$ tar xf perf-6.1.0-rc3.tar
> ⬢[acme@toolbox tmp]$ cd perf-6.1.0-rc3/
> ⬢[acme@toolbox perf-6.1.0-rc3]$ make -C tools/perf
> make: Entering directory '/tmp/perf-6.1.0-rc3/tools/perf'
> BUILD: Doing 'make -j32' parallel build
> HOSTCC fixdep.o
> HOSTLD fixdep-in.o
> LINK fixdep
>
> Auto-detecting system features:
<SNIP>
> ... dwarf: [ on ]
> CC jvmti/libjvmti.o
> make[3]: *** No rule to make target '/tmp/perf-6.1.0-rc3/tools/perf/libsymbol/libsymbol.a'. Stop.
> make[2]: *** [Makefile.perf:907: /tmp/perf-6.1.0-rc3/tools/perf/libsymbol/libsymbol.a] Error 2
> make[2]: *** Waiting for unfinished jobs....
So this cures it:
diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST
index f5d72f936a6bad2c..c8e8e05b4ff1f56f 100644
--- a/tools/perf/MANIFEST
+++ b/tools/perf/MANIFEST
@@ -13,8 +13,7 @@ tools/lib/ctype.c
tools/lib/hweight.c
tools/lib/rbtree.c
tools/lib/string.c
-tools/lib/symbol/kallsyms.c
-tools/lib/symbol/kallsyms.h
+tools/lib/symbol
tools/lib/find_bit.c
tools/lib/bitmap.c
tools/lib/list_sort.c