Skip to content

Conversation

@tohojo
Copy link
Member

@tohojo tohojo commented Jan 7, 2026

Fix a couple of build issues with old linkers and old versions of libbpf
(specifically, the versions found on RHEL8).

tohojo added 3 commits January 7, 2026 16:50
With the introduction of xdpsock.c into util, we include a call to
pthread_create which gets pulled into the build for all binaries. Older
linkers choke on this if there's no -lphthread in the build invocation,
even when the function calling pthread_create() is not used in the
resulting binary.

Fix this by adding -lpthread to the linker options in common.mk to make
sure it's always available.

Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
The configure script checks for the presence of bpf_program__flags() in
libbpf, but the devbound patches added new functions that call the
function without checking the #define. Move things around so the build
still works with these old libbpf versions.

Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
Add a couple of ifdefs to the libxdp test binaries to make sure they
build with old versions of libbpf.

Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
@tohojo tohojo merged commit bdf1df5 into main Jan 8, 2026
73 checks passed
@tohojo tohojo deleted the build-fixes branch January 8, 2026 10:57
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