Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libbpf-tools: Build and use lightweight bootstrap version of bpftool #4143

Merged
merged 1 commit into from
Aug 1, 2022

Conversation

chenhengqi
Copy link
Collaborator

We need bpftool for skeleton generation only, let's build and use bootstrap
bpftool like libbpf-bootstrap does (0). This avoids the following errors
on old kernels:

skeleton/pid_iter.bpf.c:35:10: error: incomplete definition of type 'struct bpf_link'
                return BPF_CORE_READ((struct bpf_link *)ent, id);
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Hengqi Chen [email protected]

We need bpftool for skeleton generation only, let's build and use bootstrap
bpftool like libbpf-bootstrap does ([0]). This avoids the following errors
on old kernels:

    skeleton/pid_iter.bpf.c:35:10: error: incomplete definition of type 'struct bpf_link'
                    return BPF_CORE_READ((struct bpf_link *)ent, id);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  [0]: libbpf/libbpf-bootstrap#92

Signed-off-by: Hengqi Chen <[email protected]>
@davemarchevsky
Copy link
Collaborator

LGTM. Tested this by building a new fedora container and building all the tools ontop of this PR

@davemarchevsky davemarchevsky merged commit 30ea527 into iovisor:master Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants