[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <83f48296-fa72-a27f-5acb-654b51cd848f@isovalent.com>
Date: Thu, 4 Nov 2021 18:15:57 +0000
From: Quentin Monnet <quentin@...valent.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>,
Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>,
Song Liu <songliubraving@...com>, Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>, bpf <bpf@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: perf build broken looking for bpf/{libbpf,bpf}.h after merge with
upstream
2021-11-04 15:09 UTC-0300 ~ Arnaldo Carvalho de Melo <acme@...nel.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@...il.com> wrote:
>>>
>>>
>>> Hi Song,
>>>
>>
>> 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@...lbox perf]$ git show
> commit 504afe6757ec646539ca3b4aa0431820e8c92b45 (HEAD -> perf/core)
> Author: Arnaldo Carvalho de Melo <acme@...hat.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@...hat.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!)
Thanks,
Quentin
Powered by blists - more mailing lists