FuzzGen icon indicating copy to clipboard operation
FuzzGen copied to clipboard

Unable to link FuzzGen preprocessor

Open pengwinsurf opened this issue 4 years ago • 1 comments

I followed the advice from #19 and commented out override which caused the build to continue further but then the linking failed as shown below.

[ 80%] Linking CXX executable ../../../../bin/fuzzgen-preprocessor
CMakeFiles/fuzzgen-preprocessor.dir/preprocessor.cpp.o: In function `FuzzGenPreprocessor::CreateASTConsumer(clang::CompilerInstance&, llvm::StringRef)':
preprocessor.cpp:(.text._ZN19FuzzGenPreprocessor17CreateASTConsumerERN5clang16CompilerInstanceEN4llvm9StringRefE+0x19b): undefined reference to `vtable for clang::PPChainedCallbacks'
CMakeFiles/fuzzgen-preprocessor.dir/preprocessor.cpp.o: In function `IncludesProcessor::~IncludesProcessor()':
preprocessor.cpp:(.text._ZN17IncludesProcessorD2Ev[_ZN17IncludesProcessorD2Ev]+0x29): undefined reference to `clang::PPCallbacks::~PPCallbacks()'
CMakeFiles/fuzzgen-preprocessor.dir/preprocessor.cpp.o: In function `IncludesProcessor::~IncludesProcessor()':
preprocessor.cpp:(.text._ZN17IncludesProcessorD0Ev[_ZN17IncludesProcessorD0Ev]+0x28): undefined reference to `clang::PPCallbacks::~PPCallbacks()'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
tools/clang/tools/fuzzgen/CMakeFiles/fuzzgen-preprocessor.dir/build.make:110: recipe for target 'bin/fuzzgen-preprocessor' failed
make[2]: *** [bin/fuzzgen-preprocessor] Error 1
CMakeFiles/Makefile2:29533: recipe for target 'tools/clang/tools/fuzzgen/CMakeFiles/fuzzgen-preprocessor.dir/all' failed
make[1]: *** [tools/clang/tools/fuzzgen/CMakeFiles/fuzzgen-preprocessor.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

pengwinsurf avatar Apr 30 '21 15:04 pengwinsurf

This was resolved by adding clangLex to the CMakeLists.txt

pengwinsurf avatar May 02 '21 12:05 pengwinsurf