mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Song Liu <songliubraving@fb.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: BUILD_BPF_SKEL error message
Date: Mon, 10 May 2021 06:56:03 +0000	[thread overview]
Message-ID: <88CE8174-6916-451D-81A0-B7F2BA1FAE7F@fb.com> (raw)
In-Reply-To: <YJaY2auB5advkzrg@kernel.org>



> 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





      reply	other threads:[~2021-05-10  6:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-08 13:57 Arnaldo Carvalho de Melo
2021-05-10  6:56 ` Song Liu [this message]

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=88CE8174-6916-451D-81A0-B7F2BA1FAE7F@fb.com \
    --to=songliubraving@fb.com \
    --cc=acme@kernel.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    /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

all inboxes | Powered by JetHome®