Hi! @gamemann
While trying to build this project on Arch Linux, I ran into a couple of
build-system issues that seem to be masked on Debian/Ubuntu setups.
Environment
- Distro: Arch Linux
- Compiler: clang
- Kernel: 6.x
- libconfig: 1.8.2
- libbpf/libxdp: system packages
Issue 1: libconfig detection
The loader unconditionally links against -lconfig, but there is no
early check for libconfig availability. This causes confusing linker
errors when libconfig is missing.
I added a small pkg-config check that fails early, while skipping
make clean, which seems to improve UX without changing behavior.
Issue 2: LIBXDP_STATIC=1 fails to link
When LIBXDP_STATIC=1 (default), the loader fails with unresolved symbols
(e.g. xdp_program__*, bpf_map_*). This appears to be related to how
libbpf/libxdp objects are collected and linked.
Building with LIBXDP_STATIC=0 links correctly, but then the BPF target
(-target bpf) fails due to system header usage, suggesting missing
kernel/UAPI isolation for the BPF build.
Proposed approach
- Document
LIBXDP_STATIC=0 as the supported/default mode
or
- Fix static linking by explicitly linking libbpf/libxdp (or using
pkg-config for both)
- Isolate BPF compilation flags/headers (common pattern in libbpf-based
projects)
I’m happy to submit a PR once direction is agreed on.
Thanks for the project — it’s been useful to study!
Hi! @gamemann
While trying to build this project on Arch Linux, I ran into a couple of
build-system issues that seem to be masked on Debian/Ubuntu setups.
Environment
Issue 1: libconfig detection
The loader unconditionally links against
-lconfig, but there is noearly check for libconfig availability. This causes confusing linker
errors when libconfig is missing.
I added a small
pkg-configcheck that fails early, while skippingmake clean, which seems to improve UX without changing behavior.Issue 2: LIBXDP_STATIC=1 fails to link
When
LIBXDP_STATIC=1(default), the loader fails with unresolved symbols(e.g.
xdp_program__*,bpf_map_*). This appears to be related to howlibbpf/libxdp objects are collected and linked.
Building with
LIBXDP_STATIC=0links correctly, but then the BPF target(
-target bpf) fails due to system header usage, suggesting missingkernel/UAPI isolation for the BPF build.
Proposed approach
LIBXDP_STATIC=0as the supported/default modeor
pkg-config for both)
projects)
I’m happy to submit a PR once direction is agreed on.
Thanks for the project — it’s been useful to study!