Package: src:llvm-toolchain-23
Version: 1:23.1.1-2
Severity: serious
Tags: sid forky

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.

Reply via email to