Am 22.08.26 um 15:40 schrieb Michael Biebl:
[I'm not subscribed, so please CC me on replies]Hi Daniel On Fri, 21 Aug 2026 22:02:05 +0200 Daniel Lange <[email protected]> wrote:Hi Michael,the issue here is that the BPF compiler is made to consume the target architecture's glibc userspace headers as if it were compiling normal target userspace code.bpf-gcc is compiling for the BPF target, while the build explicitly adds: /usr/include/powerpc64-linux-gnu /usr/include/sparc64-linux-gnu /usr/include/x86_64-linux-gnux32Those headers eventually pull in gnu/stubs.h, whose ABI selection expects multilib glibc headers that aren't installed in the build environment.And should not be. Still you could provide them :).1) I.e., you can add the (useless) target arch headers and make it compile:Build-depend on g++-multilibThe question then is: why is this only necessary on those architectures?
I tried that on a porterbox (perotto).
It did not help. The build failure is the same.
$ apt-cache policy g++-multilib
g++-multilib:
Installed: 4:16.1.0-3
Candidate: 4:16.1.0-3
Version table:
*** 4:16.1.0-3 500
500 http://deb.debian.org/debian-ports sid/main ppc64 Packages
100 /var/lib/dpkg/status
$ ninja
[1/58] Generating src/core/bpf/clat.bpf.unstripped.o with a custom command
FAILED: [code=1] src/core/bpf/clat.bpf.unstripped.o
/usr/bin/bpf-gcc -std=gnu17 -Wunused -Wimplicit-fallthrough
-fno-stack-protector -fno-ssa-phiopt -O2 -mcpu=v3 -mco-re -gbtf -c
-D__powerpc64__ -D__TARGET_ARCH_powerpc -D_CALL_ELF=2 -mbig-endian -I.
-isystem /usr/include/powerpc64-linux-gnu -idirafter /usr/include
../src/core/bpf/clat.bpf.c -o src/core/bpf/clat.bpf.unstripped.o
In file included from /usr/include/features.h:563,
from /usr/include/powerpc64-linux-gnu/sys/socket.h:22,
from /usr/include/linux/if.h:28,
from /usr/include/linux/icmp.h:23,
from ../src/core/bpf/clat.bpf.c:16:
/usr/include/powerpc64-linux-gnu/gnu/stubs.h:14:11: fatal error:
gnu/stubs-64-v2.h: No such file or directory
14 | # include <gnu/stubs-64-v2.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
OpenPGP_signature.asc
Description: OpenPGP digital signature

