#1147575 packaging of the fuzzer libraries is broken with LLVM 21, 22 and 23

#1147575#5
Date:
2026-09-13 07:20:13 UTC
From:
To:
As seen in the vbox-tools upload to migrate from LLVM 19 to 21, the
fuzzer libraries are not used anymore (or not found) when built with
LLVM 21. You can reproduce that when building with the unversioned clang:

[...]
     LD            tests/vb2_keyblock_fuzzer
clang -o
/packages/tmp/vboot-utils-0~R106-15054.B+dfsg/build/tests/vb2_keyblock_fuzzer
-Wl,-z,relro -Wl,-z,now -Wl,--gc-sections -pie -Xlinker 
--allow-multiple-definition -fsanitize=fuzzer 
/packages/tmp/vboot-utils-0~R106-15054.B+dfsg/build/tests/vb2_keyblock_fuzzer.o
  /packages/tmp/vboot-utils-0~R106-15054.B+dfsg/build/vboot_fw.a -lrt -luuid
/usr/bin/x86_64-linux-gnu-ld.bfd/usr/bin/x86_64-linux-gnu-ld.bfd: cannot
find : cannot find
/usr/lib/llvm-21/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.fuzzer.a:
/usr/lib/llvm-21/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.fuzzer.a:
No such file or directory
No such file or directory
/usr/bin/x86_64-linux-gnu-ld.bfd: cannot find
/usr/bin/x86_64-linux-gnu-ld.bfd: cannot find
/usr/lib/llvm-21/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.fuzzer_interceptors.a:
/usr/lib/llvm-21/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.fuzzer_interceptors.aNo
such file or directory:
No such file or directory
/usr/bin/x86_64-linux-gnu-ld.bfd/usr/bin/x86_64-linux-gnu-ld.bfd: cannot
find : cannot find
/usr/lib/llvm-21/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.ubsan_standalone.a/usr/lib/llvm-21/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.ubsan_standalone.a:
: No such file or directoryNo such file or directory

/usr/bin/x86_64-linux-gnu-ld.bfd: cannot find
/usr/lib/llvm-21/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.fuzzer.a:
No such file or directory
/usr/bin/x86_64-linux-gnu-ld.bfd: cannot find
/usr/lib/llvm-21/lib/clang/21/lib/x86_64-pc-linux-gnu/libclang_rt.fuzzer_interceptors.a:
No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make[2]: *** [Makefile:1156:
/packages/tmp/vboot-utils-0~R106-15054.B+dfsg/build/tests/cgpt_fuzzer]
Error 1
make[2]: *** Waiting for unfinished jobs....

So apparently building and shipping Debian's own libFuzzer.a is not good
enough anymore.

Two solutions here:

  - stop building the libfuzzer-N-dev package

  - Ship the libclang_rt.fuzzer.a (and maybe other) libraries.

This is seen with LLVM 21, 22 and 23.

#1147575#10
Date:
2026-09-13 09:06:55 UTC
From:
To:
according to
https://packages.debian.org/search?searchon=contents&keywords=libclang_rt.fuzzer&mode=filename&suite=unstable&arch=any

e.g.
/usr/lib/llvm-23/lib/clang/23/lib/linux/libclang_rt.fuzzer-x86_64.a
in libclang-rt-N-dev

while -fsanitize=fuzzer apparently hard-codes
/usr/lib/llvm-N/lib/clang/N/lib/x86_64-pc-linux-gnu/libclang_rt.fuzzer.a

#1147575#15
Date:
2026-09-13 09:13:25 UTC
From:
To:
looks like a fix should be like:

- stop building libFuzzer.a in debian/rules

- stop shipping a libfuzzer-N-dev package

- let -fsanitize=fuzzer use the library naming schema used
   in Debian.

#1147575#20
Date:
2026-09-13 09:20:11 UTC
From:
To:
or better, build on all architectures having the fuzzer support, make it
a pure dependency package, and simply let it depend on on the
libclang-rt-N-dev package.