linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Ian Rogers <irogers@google.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Kan Liang <kan.liang@linux.intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-perf-users@vger.kernel.org
Subject: Re: Makefile.perf:1149: *** Missing bpftool input for generating vmlinux.h. Stop.
Date: Wed, 5 Jun 2024 09:15:08 +0200	[thread overview]
Message-ID: <ZmAQfJ9C5fFQdjQM@gmail.com> (raw)
In-Reply-To: <CAM9d7ch5HTr+k+_GpbMrX0HUo5BZ11byh1xq0Two7B7RQACuNw@mail.gmail.com>


* Namhyung Kim <namhyung@kernel.org> wrote:

> Hi Ian and Ingo,
> 
> The failure happens when you don't have vmlinux.h or vmlinux with BTF.
> 
> ifeq ($(VMLINUX_H),)
>   ifeq ($(VMLINUX_BTF),)
>     $(error Missing bpftool input for generating vmlinux.h)
>   endif
> endif
> 
> VMLINUX_BTF can be empty if you didn't build a kernel or
> it doesn't have a BTF section and the current kernel also
> has no BTF.  This is totally ok.
> 
> But VMLINUX_H should be set to the minimal version in
> the source tree (unless you overwrite it manually) when you
> don't pass GEN_VMLINUX_H=1 (which requires VMLINUX_BTF
> should not be empty).  The problem is that it's defined in
> Makefile.config which is not included for `make clean`.
> 
> Can you please verify if the below patch fixes it?
> 
> Thanks,
> Namhyung
> 
> ---8<---
> 
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index 5c35c0d89306..e6d56b555369 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -214,6 +214,7 @@ NON_CONFIG_TARGETS := clean python-clean TAGS tags
> cscope help
> 
>  ifdef MAKECMDGOALS
>  ifeq ($(filter-out $(NON_CONFIG_TARGETS),$(MAKECMDGOALS)),)
> +  VMLINUX_H=$(src-perf)/util/bpf_skel/vmlinux/vmlinux.h
>    config := 0
>  endif
>  endif

Yeah, this appears to be doing the trick here - judging by a couple of 
tries of interrupted builds:

   Tested-by: Ingo Molnar <mingo@kernel.org>

There's a new issue btw: see the 'invalid escape sequence' warnings below. 
This is on a pretty stock Unbuntu 24.04 desktop.

Thanks,

	Ingo

<unknown>:1: SyntaxWarning: invalid escape sequence '\S'
  ASCIIDOC perf-config.xml
<unknown>:1: SyntaxWarning: invalid escape sequence '\S'
<unknown>:1: SyntaxWarning: invalid escape sequence '\S'
<unknown>:1: SyntaxWarning: invalid escape sequence '\S'
<unknown>:1: SyntaxWarning: invalid escape sequence '\S'
  ASCIIDOC perf-daemon.xml
<unknown>:1: SyntaxWarning: invalid escape sequence '\S'
<unknown>:1: SyntaxWarning: invalid escape sequence '\S'
  ASCIIDOC perf-data.xml
  ASCIIDOC perf-diff.xml


  reply	other threads:[~2024-06-05  7:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-08  7:39 Makefile.perf:1149: *** Missing bpftool input for generating vmlinux.h. Stop Ingo Molnar
2024-05-08 20:44 ` Ian Rogers
2024-05-13  6:50   ` Ingo Molnar
2024-05-13 15:52     ` Ian Rogers
2024-05-13 17:16       ` Ingo Molnar
2024-05-13 17:24         ` Ian Rogers
2024-05-13 17:51           ` Ian Rogers
2024-05-21 17:07             ` Namhyung Kim
2024-06-05  7:15               ` Ingo Molnar [this message]
2024-06-05  7:18                 ` Ingo Molnar
2024-06-05 14:47                   ` Arnaldo Carvalho de Melo
2024-06-05  7:12             ` Ingo Molnar
2024-06-05  7:09         ` Ingo Molnar

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=ZmAQfJ9C5fFQdjQM@gmail.com \
    --to=mingo@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@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;
as well as URLs for NNTP newsgroup(s).