Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Francis Laniel <flaniel@linux.microsoft.com>
To: buildroot@buildroot.org
Cc: Francis Laniel <flaniel@linux.microsoft.com>,
	Romain Naour <romain.naour@gmail.com>
Subject: [Buildroot] [RFC PATCH v1 0/1] libbpf: Remove bpf.h in linux.mk
Date: Fri, 10 Jun 2022 17:54:40 +0100	[thread overview]
Message-ID: <20220610165441.84812-1-flaniel@linux.microsoft.com> (raw)

Hi everyone.


I hope you are fine and the same for your relatives.

The goal of this contribution is to fix this a recurrent building problem which
happens in buildroot CI (sorry for only taking care of this now...) [1].
Actually, to build host-pahole, we install host-libbpf uapi headers to the host
but we remove bpf.h to avoid a conflict with this file while building the
kernel [2].
Then host-pahole will use the system uapi headers to be built.
The problem with this approach is that it works while the system uapi headers
permits building host-pahole which is not the case within buildroot CI.

So, a solution to this problem would be to keep bpf.h when installing uapi
headers and to remove it right before building the kernel to avoid the conflict.
As a consequence, we are able to build host-pahole with a good bpf.h and we can
then build the kernel.

I sadly know this approach is far from being perfect but this is the only way I
see to fix this build problem... So, if someone has a better idea I am up to
implement it!

Francis Laniel (1):
  package/libbpf: remove bpf.h in linux.mk

 linux/linux.mk           | 23 +++++++++++++++++++++++
 package/libbpf/libbpf.mk | 21 ++++-----------------
 2 files changed, 27 insertions(+), 17 deletions(-)


Best regards and thank you in advance.
---
[1] http://autobuild.buildroot.net/results/7b3f560a773791e00b8bb32f64c0d39749b809b1/build-end.log
[2] https://github.com/buildroot/buildroot/blob/f3f441aea23dbf84fec85a9cef1aaf276c4484f0/package/libbpf/libbpf.mk#L61
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2022-06-10 16:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 16:54 Francis Laniel [this message]
2022-06-10 16:54 ` [Buildroot] [RFC PATCH v1 1/1] package/libbpf: remove bpf.h in linux.mk Francis Laniel

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=20220610165441.84812-1-flaniel@linux.microsoft.com \
    --to=flaniel@linux.microsoft.com \
    --cc=buildroot@buildroot.org \
    --cc=romain.naour@gmail.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