dtrace-utils icon indicating copy to clipboard operation
dtrace-utils copied to clipboard

bpf-helpers.h

Open ratmice opened this issue 1 year ago • 2 comments

I was curious to check this out (and was compiling the devel branch), but when compiling I get

bpf/agg_lqbin.c:7:10: fatal error: bpf-helpers.h: No such file or directory

I had some trouble tracking down where this file is supposed to be coming from, e.g. libbpf has bpf_helpers.h with a dash, the kernel has a bpf-helper.h non-plural,

I assume perhaps it is supposed to be coming from binutils/sim/bpf, in which case my binutils is too new, given this file was removed in the commit sim/bpf: desCGENization of the BPF simulator

It would be helpful to know if I am on the right track regarding which dependency should be providing this header.

ratmice avatar Feb 01 '24 07:02 ratmice

On Wed, Jan 31, 2024 at 11:40:39PM -0800, matt rice wrote:

I was curious to check this out (and was compiling the devel branch), but when compiling I get

bpf/agg_lqbin.c:7:10: fatal error: bpf-helpers.h: No such file or directory

I had some trouble tracking down where this file is supposed to be coming from, e.g. libbpf has bpf_helpers.h with a dash, the kernel has a bpf-helper.h non-plural,

I assume perhaps it is supposed to be coming from binutils/sim/bpf, in which case my binutils is too new, given this file was removed in the commit sim/bpf: desCGENization of the BPF simulator

It would be helpful to know if I am on the right track regarding which dependency should be providing this header.

Yes, it was removed in more recent gcc and I overlooked that we currently were still working with BPF crosses that are a bit older and still have it.

I will put out a patch for that shortly, but if it helps to have a quick view of what needs to change:

- include of bpf-helpers.h in all bpf/*.c files needs to become
      include of bpf/bpf_helpers.h
    - libbpf-dev needs to be isntalled
    - bpf_dlib_CPPFLAGS in bpf/Build needs to get the following added to it:
  -idirafter /usr/include

â?" Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.**>

kvanhees avatar Feb 01 '24 15:02 kvanhees

Thank you, it does help to have that overview. With that I believe I should be able to get it working locally without too much trouble.

ratmice avatar Feb 01 '24 15:02 ratmice

Resolved by commit 3a42fb8

kvanhees avatar Apr 13 '24 02:04 kvanhees