Skip to content

bpftool: update submodule for newer glibc headers - #378

Merged
danielocfb merged 1 commit into
libbpf:masterfrom
sairex53:fix/bpftool-modern-libc
Oct 22, 2026
Merged

danielocfb merged 1 commit into
libbpf:masterfrom
sairex53:fix/bpftool-modern-libc

Conversation

@sairex53

Copy link
Copy Markdown
Contributor

The bundled bpftool uses an old libbpf revision whose resolve_full_path() assigns strchr()'s result to a non-const pointer. With newer glibc headers, this fails with -Werror=discarded-qualifiers.

Update the bpftool submodule to 3e1a35a, which includes the upstream libbpf correction. This changes only the bpftool gitlink.

Fixes #373.

Validation on Fedora 44 aarch64 (GCC 16.2.1, Clang 22.1.8):

  • Reproduced the reported compilation failure with the previous bpftool revision.
  • Clean GNU Make build: make -C examples/c clean && make -C examples/c -j2.
  • Clean CMake/Ninja build of examples/c with CMake 4.3.
  • All 15 C examples, including profile, built successfully with both build systems; both builds use the bundled bpftool and default warning settings.

@danielocfb

Copy link
Copy Markdown
Collaborator

CI is still failing. Can you take a look at the issue?

@sairex53

Copy link
Copy Markdown
Contributor Author

CI is still failing. Can you take a look at the issue?

Found the CI failure: bpftool compiles bootstrap/sign.c, which requires openssl/opensslv.h. Added libssl-dev to the Ubuntu build image in 95449ca. The Docker daemon is unavailable on my host, so I could not build the image locally.

@danielocfb danielocfb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks.

@danielocfb

Copy link
Copy Markdown
Collaborator

Can you please merge the two commits and we can get this in.

Update bpftool and install OpenSSL development headers in CI so its
cryptographic support can be built alongside the glibc compatibility fix.

Signed-off-by: Eduard Zateev <hackerowskiy@gmail.com>
@sairex53
sairex53 force-pushed the fix/bpftool-modern-libc branch from 95449ca to 0cf45d5 Compare October 22, 2026 14:16
@danielocfb
danielocfb merged commit 820a1bd into libbpf:master Oct 22, 2026
14 checks passed
@sairex53

Copy link
Copy Markdown
Contributor Author

Can you please merge the two commits and we can get this in.

Squashed the two commits into one. The resulting file tree is unchanged.

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.

Build fails with -Werror=discarded-qualifiers in libbpf.c

2 participants