#1154060 udev-hid-bpf: FTBFS with LLVM 23 as default: clang 23 emits memcpy calls in BPF code

#1154060#5
Date:
2026-11-15 11:03:01 UTC
From:
To:
Hello,

We are going to switch the default LLVM version to 23 (transition bug
#1154024). llvm-defaults 0.75~exp1, in experimental, already points to
23.

udev-hid-bpf fails to build in unstable with it, and builds without it:

libbpf: failed to find BTF info for global/extern symbol 'memcpy'
Error: failed to link 'src/bpf/0010-Huion__Dial-2.bpf.unstripped.o': No
such file or directory (2)

src/bpf/stable/0010-Huion__Dial-2.bpf.c uses __builtin_memcpy() on
large report descriptors (lines 460-469). clang 23 apparently doesn't
inline these anymore and emits a call to memcpy, which libbpf can't
resolve.

To reproduce, with sbuild:

  sbuild -d unstable \
    --extra-repository='deb http://deb.debian.org/debian experimental main' \
    --build-dep-resolver=aptitude \
    --add-depends='clang (>= 1:23~), llvm-dev (>= 1:23~), libclang-dev (>= 1:23~)' \
    <package>

The --add-depends forces the llvm-defaults packages from experimental
(the default apt resolver won't pick them, aptitude does), everything
else comes from unstable.

The severity will be raised to serious once llvm-defaults 23 is in
unstable.

Cheers,
Sylvestre