All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Luca Boccassi <bluca@debian.org>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>, dwarves@vger.kernel.org
Subject: Re: [PATCH dwarves] libbpf: allow to use packaged version
Date: Thu, 21 Jan 2021 10:29:02 -0300	[thread overview]
Message-ID: <20210121132902.GA12699@kernel.org> (raw)
In-Reply-To: <df6bebe13ac5d5a80563f56805dee127ad380401.camel@debian.org>

Em Mon, Jan 04, 2021 at 10:17:36PM +0000, Luca Boccassi escreveu:
> On Mon, 2021-01-04 at 12:23 -0800, Andrii Nakryiko wrote:
> > On Sun, Jan 3, 2021 at 1:30 PM Luca Boccassi <bluca@debian.org>
> > > > >  #include "dutil.h"
> > > > > +#ifdef LIBBPF_FOUND
> > > > > +#include <bpf/libbpf.h>
> > > > > +#else
> > > > >  #include "lib/bpf/src/libbpf.h"
> > > > > +#endif

> > > > this is horrible, are you sure there is no way to make
> > > > <bpf/libbpf.h>
> > > > work for both cases?

> > > It really is, but unfortunately I don't see other ways that are
> > > not just as horrible. Suggestions welcome. The only thing I can
> > > think of, is if libbpf used the same directory hierarchy in-tree
> > > as it does in the installed tree. Ie: move those headers from
> > > libbpf/src/foo.h to libbpf/include/bpf/foo.h. Then we would just
> > > have the - Ilib/bpf/include in CPPFLAGS for the embedded build
> > > defined in the CMake files, and the sources would only use the
> > > "system" includes everywhere, without ifdeffery.

> > > Given you maintain libbpf, would that be something you'd accept?
> > > It's quite a common pattern for libraries to store their public
> > > headers in a separate directory in the git tree, after all.
 
> > It's quite risky, as there are plenty of (sometimes private)
> > integrations that assume such a layout of libbpf, so we'll be
> > breaking them badly. Makefile-based projects do `make
> > install_headers` to put *only exported* headers into the desired
> > location. I'm not sure what's the best way to achieve the same with
> > Cmake, though.
 
> > One quick and easy hack would be to put a symlink lib/include/bpf ->
> > lib/bpf/src into pahole repo. And add -Ilib/include to let compiler
> > handle <bpf/*.h> properly.
 
> Sure, that works for me if it's acceptable as a solution. Sent v3 that
> implements it. Thanks for the suggestion.

Andrii, can I have your Reviewed-by or Acked-by for v3?

I have it in my local repo and will push publicly later today after I
perform tests.

- Arnaldo

  reply	other threads:[~2021-01-21 15:03 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-02 18:22 [PATCH dwarves] libbpf: allow to use packaged version Luca Boccassi
2021-01-03 19:10 ` Andrii Nakryiko
2021-01-03 21:30   ` Luca Boccassi
2021-01-04 20:23     ` Andrii Nakryiko
2021-01-04 22:17       ` Luca Boccassi
2021-01-21 13:29         ` Arnaldo Carvalho de Melo [this message]
2021-01-21 20:02           ` Andrii Nakryiko
2021-01-21 20:33             ` Arnaldo Carvalho de Melo
2021-01-21 20:34             ` Arnaldo Carvalho de Melo
2021-01-21 21:19               ` Luca Boccassi
2021-01-15 15:29       ` Arnaldo Carvalho de Melo
2021-01-15 15:40         ` Luca Boccassi
2021-06-09 16:07           ` Arnaldo Carvalho de Melo
2021-06-09 16:11             ` Luca Boccassi
2021-01-03 21:32 ` [PATCH dwarves v2] " Luca Boccassi
2021-01-04 22:16   ` [PATCH dwarves v3] " Luca Boccassi
2021-01-13 11:18     ` Arnaldo Carvalho de Melo
2021-03-30  4:47     ` Dominique Martinet
2021-03-30 10:50       ` Luca Boccassi
2021-03-30 11:06         ` Luca Boccassi
2021-03-30 11:45           ` Dominique Martinet
2021-03-30 15:12       ` Arnaldo Carvalho de Melo
2021-03-31  1:05         ` Dominique Martinet
2021-04-13 13:42           ` Luca Boccassi
2021-05-18 14:07             ` Luca Boccassi
2021-06-09  4:10               ` Dominique Martinet
2021-06-09 16:25     ` Arnaldo Carvalho de Melo
2021-06-09 16:38       ` Arnaldo Carvalho de Melo
2021-06-09 16:43         ` Luca Boccassi

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=20210121132902.GA12699@kernel.org \
    --to=acme@kernel.org \
    --cc=andrii.nakryiko@gmail.com \
    --cc=bluca@debian.org \
    --cc=dwarves@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.