linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Ian Rogers <irogers@google.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Nicolas Schier <nicolas@fjasle.eu>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	bpf@vger.kernel.org, Nick Desaulniers <ndesaulniers@google.com>,
	Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH v2 00/14] Fix perf tools/lib includes
Date: Mon, 14 Nov 2022 17:16:57 -0300	[thread overview]
Message-ID: <Y3KiOU/bYokRSENk@kernel.org> (raw)
In-Reply-To: <CAM9d7ciPe-uR5MdayhUEEK8a-j1QDm50qPffsod9BHdUF5Z-TA@mail.gmail.com>

Em Thu, Nov 10, 2022 at 10:10:18AM -0800, Namhyung Kim escreveu:
> Hi Ian,
> 
> On Wed, Nov 9, 2022 at 10:49 AM Ian Rogers <irogers@google.com> wrote:
> >
> > 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.
> >
> > The problem and solution were motivated by this issue and discussion:
> > https://lore.kernel.org/lkml/CAEf4BzbbOHQZUAe6iWaehKCPQAf3VC=hq657buqe2_yRKxaK-A@mail.gmail.com/
> >
> > v2. Fix a MANIFEST issue for the source tar ball. Add dependencies for
> >     the installed header files so that the build doesn't overtake
> >     building these dependencies. Both issues reported by Arnaldo
> >     Carvalho de Melo <acme@kernel.org>.
> >
> > Ian Rogers (14):
> >   tools lib api: Add install target
> >   tools lib subcmd: Add install target
> >   perf build: Install libsubcmd locally when building
> >   perf build: Install libapi locally when building
> >   perf build: Install libperf locally when building
> >   perf build: Install libtraceevent locally when building
> >   tools lib api: Add missing install headers
> >   tools lib perf: Add missing install headers
> >   tool lib symbol: Add Makefile/Build
> >   perf build: Install libsymbol locally when building
> >   perf expr: Tidy hashmap dependency
> >   perf thread_map: Reduce exposure of libperf internal API
> >   perf cpumap: Tidy libperf includes
> >   perf build: Use tools/lib headers from install path
> 
> Acked-by: Namhyung Kim <namhyung@kernel.org>

'make -C tools/perf build-test' is failing, looks like parallelization
woes again:

⬢[acme@toolbox perf]$ getconf _NPROCESSORS_ONLN
32
⬢[acme@toolbox perf]$

⬢[acme@toolbox perf]$ git log --oneline -1 ; time make -C tools/perf build-test
9f22d36a1dd0297a (HEAD -> perf/core) perf build: Use tools/lib headers from install path
make: Entering directory '/var/home/acme/git/perf/tools/perf'
- tarpkg: ./tests/perf-targz-src-pkg .
                 make_static: cd . && make LDFLAGS=-static NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 NO_JVMTI=1 -j32  DESTDIR=/tmp/tmp.i0kUDsiQbV
              make_with_gtk2: cd . && make GTK2=1 -j32  DESTDIR=/tmp/tmp.MNcgfeG07c
cd . && make GTK2=1 -j32 DESTDIR=/tmp/tmp.MNcgfeG07c
  BUILD:   Doing 'make -j32' parallel build
  HOSTCC  fixdep.o
  HOSTLD  fixdep-in.o
  LINK    fixdep
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/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/perf/arch/powerpc/entry/syscalls/syscall.tbl' differs from latest version at 'arch/powerpc/kernel/syscalls/syscall.tbl'
diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl

Auto-detecting system features:
...                                   dwarf: [ on  ]
...                      dwarf_getlocations: [ on  ]
...                                   glibc: [ on  ]
...                                  libbfd: [ on  ]
...                          libbfd-buildid: [ on  ]
...                                  libcap: [ on  ]
...                                  libelf: [ on  ]
...                                 libnuma: [ on  ]
...                  numa_num_possible_cpus: [ on  ]
...                                 libperl: [ on  ]
...                               libpython: [ on  ]
...                               libcrypto: [ on  ]
...                               libunwind: [ on  ]
...                      libdw-dwarf-unwind: [ on  ]
...                                    zlib: [ on  ]
...                                    lzma: [ on  ]
...                               get_cpuid: [ on  ]
...                                     bpf: [ on  ]
...                                  libaio: [ on  ]
...                                 libzstd: [ on  ]

  GEN     common-cmds.h
  CC      perf-read-vdso32
  CC      dlfilters/dlfilter-test-api-v0.o
  CC      dlfilters/dlfilter-show-cycles.o
  CC      jvmti/libjvmti.o
  CC      jvmti/jvmti_agent.o
  CC      jvmti/libstring.o
  CC      jvmti/libctype.o
  CC      ui/gtk/browser.o
  CC      ui/gtk/hists.o
  CC      ui/gtk/setup.o
  CC      ui/gtk/util.o
  GEN     pmu-events/pmu-events.c
  CC      ui/gtk/helpline.o
  LINK    dlfilters/dlfilter-show-cycles.so
  CC      ui/gtk/progress.o
  CC      ui/gtk/annotate.o
  CC      ui/gtk/zalloc.o
  LINK    dlfilters/dlfilter-test-api-v0.so
  INSTALL headers
  CC      /var/home/acme/git/perf/tools/perf/libsubcmd/exec-cmd.o
  CC      /var/home/acme/git/perf/tools/perf/libsubcmd/help.o
  CC      /var/home/acme/git/perf/tools/perf/libsubcmd/pager.o
  CC      /var/home/acme/git/perf/tools/perf/libsubcmd/parse-options.o
  CC      /var/home/acme/git/perf/tools/perf/libsubcmd/run-command.o
In file included from ui/gtk/hists.c:2:
/var/home/acme/git/perf/tools/perf/util/include/../evlist.h:9:10: fatal error: api/fd/array.h: No such file or directory
    9 | #include <api/fd/array.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
make[6]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:97: ui/gtk/hists.o] Error 1
make[6]: *** Waiting for unfinished jobs....
  CC      /var/home/acme/git/perf/tools/perf/libsubcmd/sigchain.o
make -f /var/home/acme/git/perf/tools/build/Makefile.build dir=. obj=libsymbol V=1
In file included from ui/gtk/browser.c:2:
/var/home/acme/git/perf/tools/perf/util/include/../evsel.h:10:10: fatal error: internal/evsel.h: No such file or directory
   10 | #include <internal/evsel.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[6]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:97: ui/gtk/browser.o] Error 1
  INSTALL headers
  CC      /var/home/acme/git/perf/tools/perf/libtraceevent/event-parse.o

  reply	other threads:[~2022-11-14 20:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09 18:49 [PATCH v2 00/14] Fix perf tools/lib includes Ian Rogers
2022-11-09 18:49 ` [PATCH v2 01/14] tools lib api: Add install target Ian Rogers
2022-11-09 18:49 ` [PATCH v2 02/14] tools lib subcmd: " Ian Rogers
2022-11-09 18:49 ` [PATCH v2 03/14] perf build: Install libsubcmd locally when building Ian Rogers
2022-11-09 18:49 ` [PATCH v2 04/14] perf build: Install libapi " Ian Rogers
2022-11-09 18:49 ` [PATCH v2 05/14] perf build: Install libperf " Ian Rogers
2022-11-09 18:49 ` [PATCH v2 06/14] perf build: Install libtraceevent " Ian Rogers
2022-11-09 18:49 ` [PATCH v2 07/14] tools lib api: Add missing install headers Ian Rogers
2022-11-09 18:49 ` [PATCH v2 08/14] tools lib perf: " Ian Rogers
2022-11-09 20:12   ` Namhyung Kim
2022-11-10 17:35     ` Arnaldo Carvalho de Melo
2022-11-10 18:08       ` Namhyung Kim
2022-11-09 18:49 ` [PATCH v2 09/14] tool lib symbol: Add Makefile/Build Ian Rogers
2022-11-09 18:49 ` [PATCH v2 10/14] perf build: Install libsymbol locally when building Ian Rogers
2022-11-09 18:49 ` [PATCH v2 11/14] perf expr: Tidy hashmap dependency Ian Rogers
2022-11-09 18:49 ` [PATCH v2 12/14] perf thread_map: Reduce exposure of libperf internal API Ian Rogers
2022-11-09 18:49 ` [PATCH v2 13/14] perf cpumap: Tidy libperf includes Ian Rogers
2022-11-09 18:49 ` [PATCH v2 14/14] perf build: Use tools/lib headers from install path Ian Rogers
2022-11-10 18:10 ` [PATCH v2 00/14] Fix perf tools/lib includes Namhyung Kim
2022-11-14 20:16   ` Arnaldo Carvalho de Melo [this message]
2022-11-14 20:18     ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y3KiOU/bYokRSENk@kernel.org \
    --to=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=masahiroy@kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=nicolas@fjasle.eu \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).