[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <88CE8174-6916-451D-81A0-B7F2BA1FAE7F@fb.com>
Date: Mon, 10 May 2021 06:56:03 +0000
From: Song Liu <songliubraving@...com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
CC: Jiri Olsa <jolsa@...nel.org>, Namhyung Kim <namhyung@...nel.org>,
"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>
Subject: Re: BUILD_BPF_SKEL error message
> On May 8, 2021, at 6:57 AM, Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
>
>
> I switched to Fedora 34 Silverblue, and while installing the needed
> packages to build perf, using BUILD_BPF_SKEL=1 I noticed this:
>
> Makefile.config:637: *** Error: clang too old. Please install recent clang. Stop.
>
> The problem is not that clang is too old, its that it is not installed
> :-)
>
> Perhaps a slight improvement to state that, something like:
>
> Makefile.config:637: *** Error: clang too old/not installed. Please install recent clang to build with BPF_SKEL. Stop.
>
> As for a moment I thought clang now was _required_ to build perf, which
> isn't the case, it was just me using an alias to build perf:
>
> alias m='make -k BUILD_BPF_SKEL=1 PYTHON=python3 O=/tmp/build/perf -C tools/perf install-bin && perf test python'
>
Yes, current message is confusing. How about we add the following?
Thanks,
Song
=============================== 8< ===================================
>From f44e1bb5a1ad343201e5d6ce2896073e74623d85 Mon Sep 17 00:00:00 2001
From: Song Liu <song@...nel.org>
Date: Sun, 9 May 2021 23:49:17 -0700
Subject: [PATCH] perf util: improve error message for old/missing clang
clang is required to build perf with BUILD_BPF_SKEL=1. Improve the
error message to highlight that:
1) clang could be either missing or too old;
2) clang is only required with BUILD_BPF_SKEL=1.
Suggested-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Signed-off-by: Song Liu <song@...nel.org>
---
tools/perf/Makefile.config | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 0d6619064a838..3f58428244579 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -634,7 +634,7 @@ endif
ifdef BUILD_BPF_SKEL
$(call feature_check,clang-bpf-co-re)
ifeq ($(feature-clang-bpf-co-re), 0)
- dummy := $(error Error: clang too old. Please install recent clang)
+ dummy := $(error Error: clang too old/not installed. Please install recent clang to build with BUILD_BPF_SKEL)
endif
$(call detected,CONFIG_PERF_BPF_SKEL)
CFLAGS += -DHAVE_BPF_SKEL
--
2.30.2
Powered by blists - more mailing lists