* BUILD_BPF_SKEL error message
@ 2021-05-08 13:57 Arnaldo Carvalho de Melo
2021-05-10 6:56 ` Song Liu
0 siblings, 1 reply; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-05-08 13:57 UTC (permalink / raw)
To: Song Liu; +Cc: Jiri Olsa, Namhyung Kim, Linux Kernel Mailing List
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'
Regards,
- Arnaldo
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: BUILD_BPF_SKEL error message
2021-05-08 13:57 BUILD_BPF_SKEL error message Arnaldo Carvalho de Melo
@ 2021-05-10 6:56 ` Song Liu
0 siblings, 0 replies; 2+ messages in thread
From: Song Liu @ 2021-05-10 6:56 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Jiri Olsa, Namhyung Kim, Linux Kernel Mailing List
> On May 8, 2021, at 6:57 AM, Arnaldo Carvalho de Melo <acme@kernel.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@kernel.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@redhat.com>
Signed-off-by: Song Liu <song@kernel.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-10 6:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-08 13:57 BUILD_BPF_SKEL error message Arnaldo Carvalho de Melo
2021-05-10 6:56 ` Song Liu
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).