linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Andres Freund <andres@anarazel.de>,
	Quentin Monnet <quentin@isovalent.com>,
	Roberto Sassu <roberto.sassu@huawei.com>,
	Christy Lee <christylee@fb.com>,
	Andrii Nakryiko <andrii@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	bpf@vger.kernel.org
Subject: Re: [PATCH v2 2/3] perf build: Remove libbpf pre-1.0 feature tests
Date: Mon, 13 Mar 2023 18:38:31 -0300	[thread overview]
Message-ID: <ZA+X14KllWXrlr7C@kernel.org> (raw)
In-Reply-To: <ZA+RUCE4vAgBlQRh@kernel.org>

Em Mon, Mar 13, 2023 at 06:10:40PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Sun, Jan 15, 2023 at 05:01:14PM -0800, Ian Rogers escreveu:
> > The feature tests were necessary for libbpf pre-1.0, but as the libbpf
> > implies at least 1.0 we can remove these now.
> 
> So I added this:
> 
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index 8b0bd3aa018ef166..b715cd4f43f4a014 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -580,7 +580,7 @@ ifndef NO_LIBELF
>            EXTLIBS += -lbpf
>            $(call detected,CONFIG_LIBBPF_DYNAMIC)
>          else
> -          dummy := $(error Error: No libbpf devel library found, please install libbpf-devel);
> +          dummy := $(error Error: No libbpf devel library found or older than v1.0, please install/update libbpf-devel);
>          endif
>        else
>          # Libbpf will be built as a static library from tools/lib/bpf.
> 
> To better reflect the failure reason:
> 
> ⬢[acme@toolbox perf-tools-next]$ cat /tmp/build/perf-tools-next/feature/test-libbpf.make.output
> test-libbpf.c:5:2: error: #error At least libbpf 1.0 is required for Linux tools.
>     5 | #error At least libbpf 1.0 is required for Linux tools.
>       |  ^~~~~
> ⬢[acme@toolbox perf-tools-next]$ rpm -q libbpf-devel
> libbpf-devel-0.8.0-2.fc37.x86_64
> ⬢[acme@toolbox perf-tools-next]$
> 
> I'll see if I can make the build test conditional on libbpf being >= 1.0

I'm trying with this:

⬢[acme@toolbox libbpf]$ git log --oneline -1 9476dce6fe905a6bf1d4c483f7b2b8575c4ffb2d
9476dce6fe905a6b libbpf: remove deprecated low-level APIs
⬢[acme@toolbox libbpf]$ git tag --contains 9476dce6fe905a6bf1d4c483f7b2b8575c4ffb2d
v1.0.0
v1.0.1
v1.1.0
⬢[acme@toolbox libbpf]$

diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index 531324c3dab594e1..f866c58b916f4d7a 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -63,6 +63,7 @@ endif
 
 has = $(shell which $1 2>/dev/null)
 python_perf_so := $(shell $(MAKE) python_perf_target|grep "Target is:"|awk '{print $$3}')
+old_libbpf := $(shell grep -q LIBBPF_DEPRECATED /usr/include/bpf/bpf.h)
 
 # standard single make variable specified
 make_clean_all      := clean all
@@ -151,7 +152,9 @@ run += make_no_libaudit
 run += make_no_libbionic
 run += make_no_auxtrace
 run += make_no_libbpf
+ifneq ($(old_libbpf),)
 run += make_libbpf_dynamic
+endif
 run += make_no_libbpf_DEBUG
 run += make_no_libcrypto
 run += make_no_sdt

  reply	other threads:[~2023-03-13 21:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-16  1:01 [PATCH v2 0/3] Assume libbpf 1.0+ Ian Rogers
2023-01-16  1:01 ` [PATCH v2 1/3] tools build: Pass libbpf feature only if " Ian Rogers
2023-01-16  1:01 ` [PATCH v2 2/3] perf build: Remove libbpf pre-1.0 feature tests Ian Rogers
2023-03-13 21:10   ` Arnaldo Carvalho de Melo
2023-03-13 21:38     ` Arnaldo Carvalho de Melo [this message]
2023-03-14  0:19       ` Ian Rogers
2023-03-14  1:51         ` Ian Rogers
2023-03-14 11:36         ` Arnaldo Carvalho de Melo
2023-01-16  1:01 ` [PATCH v2 3/3] perf bpf: Remove pre libbpf 1.0 conditional logic Ian Rogers
2023-01-19 17:11 ` [PATCH v2 0/3] Assume libbpf 1.0+ Ian Rogers
2023-01-19 17:41   ` Arnaldo Carvalho de Melo
2023-01-19 17:47     ` Arnaldo Carvalho de Melo
2023-01-19 18:12       ` Ian Rogers
2023-01-19 21:13     ` Jiri Olsa
2023-03-09  2:13       ` Ian Rogers
2023-03-09  7:58         ` Guilherme Amadio
2023-03-09 17:24           ` Andrii Nakryiko
2023-03-10  3:26             ` Ian Rogers
2023-03-10 20:22               ` Andrii Nakryiko
2023-03-12  1:00                 ` Ian Rogers
2023-03-12  9:51                   ` Jiri Olsa
2023-03-10  9:09         ` Jiri Olsa
2023-03-10 14:08           ` Justin Forbes

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=ZA+X14KllWXrlr7C@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andres@anarazel.de \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=christylee@fb.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=quentin@isovalent.com \
    --cc=roberto.sassu@huawei.com \
    /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).