From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Andrii Nakryiko <andriin@fb.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH bpf-next] libbpf: Fix include of bpf_helpers.h when libbpf is installed on system
Date: Tue, 14 Jan 2020 22:26:57 +0100 [thread overview]
Message-ID: <87sgkhvie6.fsf@toke.dk> (raw)
In-Reply-To: <CAEf4Bzaqi6Wt4oPyd=ygTwBNzczAaF-7boKB025-6H=DDtsuqQ@mail.gmail.com>
Andrii Nakryiko <andrii.nakryiko@gmail.com> writes:
> On Tue, Jan 14, 2020 at 11:07 AM Andrii Nakryiko
> <andrii.nakryiko@gmail.com> wrote:
>>
>> On Tue, Jan 14, 2020 at 8:43 AM Toke Høiland-Jørgensen <toke@redhat.com> wrote:
>> >
>> > The change to use angled includes for bpf_helper_defs.h breaks compilation
>> > against libbpf when it is installed in the include path, since the file is
>> > installed in the bpf/ subdirectory of $INCLUDE_PATH. Fix this by adding the
>> > bpf/ prefix to the #include directive.
>> >
>> > Fixes: 6910d7d3867a ("selftests/bpf: Ensure bpf_helper_defs.h are taken from selftests dir")
>> > Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
>> > ---
>> > Not actually sure this fix works for all the cases you originally tried to
>>
>> This does break selftests/bpf. Have you tried building selftests, does
>> it work for you? We need to fix selftests simultaneously with this
>> change.
>>
>> > fix with the referred commit; please check. Also, could we please stop breaking
>> > libbpf builds? :)
>>
>> Which libbpf build is failing right now? Both github and in-kernel
>> libbpf builds are fine. You must be referring to something else. What
>> exactly?
>
> I think it's better to just ensure that when compiling BPF programs,
> they have -I/usr/include/bpf specified, so that all BPF-side headers
> can be simply included as #include <bpf_helpers.h>, #include
> <bpf_tracing.h>, etc
And break all programs that don't have that already? Just to make the
kernel build env slightly more convenient? Hardly friendly to the
library users, is it? :)
As far as selftests are concerned, I finally managed to get an LLVM
version that will build them all; so I'll test that tomorrow and send a
v2 that doesn't break them...
-Toke
next prev parent reply other threads:[~2020-01-14 21:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-14 16:42 [PATCH bpf-next] libbpf: Fix include of bpf_helpers.h when libbpf is installed on system Toke Høiland-Jørgensen
2020-01-14 19:07 ` Andrii Nakryiko
2020-01-14 19:41 ` Andrii Nakryiko
2020-01-14 21:26 ` Toke Høiland-Jørgensen [this message]
2020-01-14 22:58 ` Alexei Starovoitov
2020-01-15 8:39 ` Toke Høiland-Jørgensen
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=87sgkhvie6.fsf@toke.dk \
--to=toke@redhat.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andriin@fb.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=netdev@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.