bcc and bpftrace require kernel headers from system

  • Open
  • quality assurance status badge
Details
2 participants
  • John Soo
  • Tobias Geerinckx-Rice
Owner
unassigned
Submitted by
John Soo
Severity
normal
J
J
John Soo wrote on 3 Jan 2021 19:32
(address . bug-guix@gnu.org)
875z4d3m83.fsf@asu.edu
Hi Guix,

When I added bcc and bpftrace to guix I didn't think much of which
version of the kernel headers would be used. After a few kernel
updates, it has become clear that the current-system kernel headers need
to match the kernel headers the packages are compiled with. Can they be
provided with a variant property? The ocaml packages that need
different ocaml versions seem like a nice model on how to do the kernel
headers.

Thoughts?

- John
T
T
Tobias Geerinckx-Rice wrote on 3 Jan 2021 22:40
(name . John Soo)(address . jsoo1@asu.edu)
87turxhf7i.fsf@nckx
John,


John Soo ???
Toggle quote (8 lines)
> Hi Guix,
>
> When I added bcc and bpftrace to guix I didn't think much of
> which
> version of the kernel headers would be used. After a few kernel
> updates, it has become clear that the current-system kernel
> headers need

This should probably be booted-system.

Toggle quote (7 lines)
> to match the kernel headers the packages are compiled with. Can
> they be
> provided with a variant property? The ocaml packages that need
> different ocaml versions seem like a nice model on how to do the
> kernel
> headers.

I know exact kernel headers are needed at toolchain run time, when
building eBPF programmes. Are they really needed at toolchain
build time, too? That sounds wrong (but there are more things
fundamentally wrong with eBPF on Linux; ask me to rant about
CONFIG_IKHEADERS). Still, could pointing bcc/bpftrace to
booted-system headers at run time not suffice?

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCX/I5wg0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15EcwBAM+IS788ZxGg1zbMsih7NKP+JyNxBbFpb2FpS7ah
4FYuAQCBg/+d+g7x/7Zak3pRN5f2tvf8LLiB9lMK/Fs4CG4fBw==
=vzkP
-----END PGP SIGNATURE-----

J
J
John Soo wrote on 4 Jan 2021 19:10
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)(address . 45633@debbugs.gnu.org)
8735zg375p.fsf@asu.edu
Hi Tobias,

Tobias Geerinckx-Rice <me@tobias.gr> writes:

Toggle quote (4 lines)
> John,
>
> This reminds me of <http://issues.guix.gnu.org/45592>.

Hm, maybe. How does it remind you of zfs? It seems like zfs needs the
libraries from util-linux, right? bcc and bpftrace need the kernel
headers. The following should illustrate there is nothing to load
dynamically, right?

find $(guix build linux-libre-headers) -name '*.\.so*'

Toggle quote (2 lines)
> This should probably be booted-system.

Yes, definitely, thanks. s/current-system/booted-system/

Toggle quote (4 lines)
> I know exact kernel headers are needed at toolchain run time, when
> building eBPF programmes. Are they really needed at toolchain
> build time, too?

I am not sure what the headers are used for but they are indeed the .h
files (tree $(guix build linux-libre-headers)). I would assume they are
used by the gcc-toolchain when compiling the package as #includes.

What do you think?

- John
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 45633@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 45633
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch