From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Quentin Monnet <quentin@isovalent.com>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
Song Liu <songliubraving@fb.com>, Jiri Olsa <jolsa@kernel.org>,
Namhyung Kim <namhyung@kernel.org>, bpf <bpf@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: perf build broken looking for bpf/{libbpf,bpf}.h after merge with upstream
Date: Thu, 4 Nov 2021 17:45:28 -0300 [thread overview]
Message-ID: <YYRGaKbfJCe6XElu@kernel.org> (raw)
In-Reply-To: <YYQ/WMJ9mitKB/PO@kernel.org>
Em Thu, Nov 04, 2021 at 05:15:20PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Thu, Nov 04, 2021 at 06:15:57PM +0000, Quentin Monnet escreveu:
> > 2021-11-04 15:09 UTC-0300 ~ Arnaldo Carvalho de Melo <acme@kernel.org>
> > > Em Thu, Nov 04, 2021 at 10:47:12AM -0700, Andrii Nakryiko escreveu:
> > >> On Thu, Nov 4, 2021 at 10:38 AM Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> wrote:
> > >> cc Quentin as well, might be related to recent Makefiles revamp for
> > >> users of libbpf. But in bpf-next perf builds perfectly fine, so not
> > >> sure.
> > > This did the trick:
> > > ⬢[acme@toolbox perf]$ git show
> > > commit 504afe6757ec646539ca3b4aa0431820e8c92b45 (HEAD -> perf/core)
> > > Author: Arnaldo Carvalho de Melo <acme@redhat.com>
> > > Date: Thu Nov 4 14:58:56 2021 -0300
> > > Revert "bpftool: Remove Makefile dep. on $(LIBBPF) for $(LIBBPF_INTERNAL_HDRS)"
> > > This reverts commit 8b6c46241c774c83998092a4eafe40f054568881.
> > > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> > > diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
> > > index c0c30e56988f2cbe..c5ad996ee95d4e87 100644
> > > --- a/tools/bpf/bpftool/Makefile
> > > +++ b/tools/bpf/bpftool/Makefile
> > > @@ -39,14 +39,14 @@ ifeq ($(BPFTOOL_VERSION),)
> > > BPFTOOL_VERSION := $(shell make -rR --no-print-directory -sC ../../.. kernelversion)
> > > endif
> > > -$(LIBBPF_OUTPUT) $(BOOTSTRAP_OUTPUT) $(LIBBPF_BOOTSTRAP_OUTPUT) $(LIBBPF_HDRS_DIR):
> > > +$(LIBBPF_OUTPUT) $(BOOTSTRAP_OUTPUT) $(LIBBPF_BOOTSTRAP_OUTPUT):
> > > $(QUIET_MKDIR)mkdir -p $@
> > > $(LIBBPF): $(wildcard $(BPF_DIR)/*.[ch] $(BPF_DIR)/Makefile) | $(LIBBPF_OUTPUT)
> > > $(Q)$(MAKE) -C $(BPF_DIR) OUTPUT=$(LIBBPF_OUTPUT) \
> > > DESTDIR=$(LIBBPF_DESTDIR) prefix= $(LIBBPF) install_headers
> > > -$(LIBBPF_INTERNAL_HDRS): $(LIBBPF_HDRS_DIR)/%.h: $(BPF_DIR)/%.h | $(LIBBPF_HDRS_DIR)
> > > +$(LIBBPF_INTERNAL_HDRS): $(LIBBPF_HDRS_DIR)/%.h: $(BPF_DIR)/%.h $(LIBBPF)
> > > $(call QUIET_INSTALL, $@)
> > > $(Q)install -m 644 -t $(LIBBPF_HDRS_DIR) $<
> > Interesting. I needed that patch because otherwise I'd get errors when
> > compiling bpftool after the switch to libbpf's hashmap implementation.
> > For the current breakage, it could be a matter of how we pass variables
> > when descending into bpftool/ from perf's Makefile.perf. I'll try to
> > look at this in details, and to experiment tonight, if I can. (Thanks
> > Andrii for the CC!)
> yeah, if we pass the location for those headers from the perf side, it
> should work.
But it isn't obvious how perf should communicate to bpftool where to
find bpf/bpf.h for the bootstrap make target, which seems something
bpftool should know.
Anyway, I'm calling it a day, will get back to this tomorrow, if you
don't beat me to it.
- Arnaldo
next prev parent reply other threads:[~2021-11-04 20:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-04 17:37 perf build broken looking for bpf/{libbpf,bpf}.h after merge with upstream Arnaldo Carvalho de Melo
2021-11-04 17:47 ` Andrii Nakryiko
2021-11-04 18:09 ` Arnaldo Carvalho de Melo
2021-11-04 18:15 ` Quentin Monnet
2021-11-04 20:15 ` Arnaldo Carvalho de Melo
2021-11-04 20:45 ` Arnaldo Carvalho de Melo [this message]
2021-11-05 2:03 ` Quentin Monnet
2021-11-04 18:10 ` Arnaldo Carvalho de Melo
2021-11-04 17:49 ` Arnaldo Carvalho de Melo
2021-11-04 17:56 ` Andrii Nakryiko
2021-11-04 18:11 ` Arnaldo Carvalho de Melo
2021-11-04 18:13 ` Song Liu
2021-11-04 20:33 ` Namhyung Kim
2021-11-04 20:42 ` 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=YYRGaKbfJCe6XElu@kernel.org \
--to=acme@kernel.org \
--cc=andrii.nakryiko@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=quentin@isovalent.com \
--cc=songliubraving@fb.com \
/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