BUILD_BPF_SKEL error message
Arnaldo Carvalho de Melo
maintainerI 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
Quoted 13 lines · Arnaldo Carvalho de Melo
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 :-)
Quoted 9 lines
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/perfinstall-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 <[email protected]>
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.
--- tools/perf/Makefile.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/Makefile.config +1 -1
@@ -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