From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Jiri Olsa <jolsa@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
"Ingo Molnar" <mingo@kernel.org>,
"Namhyung Kim" <namhyung@kernel.org>,
"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
"Michael Petlan" <mpetlan@redhat.com>,
"Toke Høiland-Jørgensen" <toke@redhat.com>,
"Jesper Dangaard Brouer" <brouer@redhat.com>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Alexei Starovoitov" <alexei.starovoitov@gmail.com>,
"Martin KaFai Lau" <kafai@fb.com>,
"Song Liu" <songliubraving@fb.com>, "Yonghong Song" <yhs@fb.com>,
"Andrii Nakryiko" <andriin@fb.com>
Subject: Re: [PATCH] perf tools: Allow to link with libbpf dynamicaly
Date: Tue, 26 Nov 2019 10:38:06 -0300 [thread overview]
Message-ID: <20191126133806.GA19483@kernel.org> (raw)
In-Reply-To: <20191126121253.28253-1-jolsa@kernel.org>
Em Tue, Nov 26, 2019 at 01:12:53PM +0100, Jiri Olsa escreveu:
> Currently we support only static linking with kernel's
> libbpf (tools/lib/bpf). This patch adds libbpf package
> detection and support to link perf with it dynamically.
>
> The libbpf package status is displayed with:
>
> $ make VF=1
> Auto-detecting system features:
> ...
> ... libbpf: [ on ]
>
> It's not checked by default, because it's quite new.
> Once it's on most distros we can switch it on.
>
> For the same reason it's not added to the test-all check.
>
> Perf does not need advanced version of libbpf, so we can
> check just for the base bpf_object__open function.
>
> Adding new compile variable to detect libbpf package and
> link bpf dynamically:
>
> $ make LIBBPF_DYNAMIC=1
> ...
> LINK perf
> $ ldd perf | grep bpf
> libbpf.so.0 => /lib64/libbpf.so.0 (0x00007f46818bc000)
>
> If libbpf is not installed, build stops with:
>
> Makefile.config:486: *** Error: No libbpf devel library found,\
> please install libbpf-devel. Stop.
Thanks, tested with how I build it:
$ make LIBBPF_DYNAMIC=1 -C tools/perf O=/tmp/build/perf
make: Entering directory '/home/acme/git/perf/tools/perf'
BUILD: Doing 'make -j8' parallel build
Makefile.config:493: *** Error: No libbpf devel library found, please install libbpf-devel. Stop.
make[1]: *** [Makefile.perf:225: sub-make] Error 2
make: *** [Makefile:70: all] Error 2
make: Leaving directory '/home/acme/git/perf/tools/perf'
$
works as well as advertised, applied.
- Arnaldo
next prev parent reply other threads:[~2019-11-26 13:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-26 12:12 [PATCH] perf tools: Allow to link with libbpf dynamicaly Jiri Olsa
2019-11-26 13:38 ` Arnaldo Carvalho de Melo [this message]
2019-11-29 6:02 ` [tip: perf/urgent] " tip-bot2 for Jiri Olsa
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=20191126133806.GA19483@kernel.org \
--to=arnaldo.melo@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=alexander.shishkin@linux.intel.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andriin@fb.com \
--cc=bpf@vger.kernel.org \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=jolsa@kernel.org \
--cc=kafai@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mpetlan@redhat.com \
--cc=namhyung@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=toke@redhat.com \
--cc=yhs@fb.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).