archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <>
To: Alexei Starovoitov <>
Cc: "Julia Kartseva" <>, "Yonghong Song" <>,
	"" <>,
	"" <>, "Alexei Starovoitov" <>,
	"Andrii Nakryiko" <>,
	"" <>,
	"" <>,
	"" <>,
	"Andrey Ignatov" <>,
	"" <>,
	"Daniel Borkmann" <>,
	"Jesper Dangaard Brouer" <>,
	"Toke Høiland-Jørgensen" <>,
Subject: Re: libbpf-devel rpm uapi headers
Date: Wed, 2 Oct 2019 22:08:18 +0200	[thread overview]
Message-ID: <20191002200818.GC13941@krava> (raw)
In-Reply-To: <>

On Wed, Oct 02, 2019 at 11:43:17AM -0700, Alexei Starovoitov wrote:
> On Wed, Oct 02, 2019 at 07:43:31PM +0200, Jiri Olsa wrote:
> > hi,
> > we'd like to have bcc linked with libbpf instead of the
> > github submodule, initial change is discussed in here:
> >
> > 
> > In order to do that, we need to have access to uapi headers
> > compatible with libbpf rpm, bcc is attaching and using them
> > during compilation.
> > 
> > I added them in the fedora spec below (not submitted yet),
> > so libbpf would carry those headers.
> > 
> > Thoughts? thanks,
> I think it may break a bunch of people who rely on bcc being a single library.

there's still libbpf.a available so it's still possible

> What is the main motiviation to use libbpf as a shared library in libbcc?

Besides that it's better to share common source of libbpf code,
it also prevents issues when having application that links to
libbpf and libbcc, where you could end up conflicting functions
and segfaults if those 2 libbpf libs are not on the same version.

quote from the github pull request ;-)

bpftrace links to libbcc, which carries libbcc_bpf and if I link
bpftrace with libbpf, the dynamic loader might get consused and
I get crash if those 2 libbpf libs (bcc x bpftrace) are not the
same version

> I think we can have both options. libbpf as git submodule and as shared.
> In practice git submodule is so much simpler to use and a lot less headaches.

that's what the change to bcc suggests.. the build detects libbpf-devel
and if available links with it.. Yonghong suggested we also need uapi
headers so we don't rely on standard kernel headers


      reply	other threads:[~2019-10-02 20:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02 17:43 Jiri Olsa
2019-10-02 18:43 ` Alexei Starovoitov
2019-10-02 20:08   ` Jiri Olsa [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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191002200818.GC13941@krava \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: libbpf-devel rpm uapi headers' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).