Can't build tests when ENABLE_LIBFUZZER is on
isaacbrodsky opened this issue · comments
Isaac Brodsky commented
Error message reported looks like the following:
[ 6%] Linking C executable bin/testH3Memory
/usr/bin/ld: CMakeFiles/testH3Memory.dir/src/apps/testapps/testH3Memory.c.o: in function `main':
.../h3/src/apps/testapps/testH3Memory.c:95: multiple definition of `main'; /usr/lib/llvm-14/lib/clang/14.0.0/lib/linux/libclang_rt.fuzzer-x86_64.a(FuzzerMain.cpp.o):(.text.main+0x0): first defined here
/usr/bin/ld: /usr/lib/llvm-14/lib/clang/14.0.0/lib/linux/libclang_rt.fuzzer-x86_64.a(FuzzerMain.cpp.o): in function `main':
(.text.main+0x12): undefined reference to `LLVMFuzzerTestOneInput'
clang: error: linker command failed with exit code 1 (use -v to see invocation)