-
Notifications
You must be signed in to change notification settings - Fork 191
Open
Description
Hello, I got the following error when building avcleaner.bin with ubuntu20.04. Could you please give me some advice?
root@24c0b22321e9:/avcleaner/CMakeBuild# make
[ 16%] Building CXX object CMakeFiles/avcleaner.bin.dir/main.cpp.o
In file included from /avcleaner/Consumer.h:10,
from /avcleaner/main.cpp:17:
/avcleaner/MatchHandler.h:53:73: error: 'clang::DynTypedNode' has not been declared
53 | bool climbParentsIgnoreCast(const clang::StringLiteral &NodeString, clang::DynTypedNode node,
| ^~~~~
/avcleaner/MatchHandler.h:65:60: error: 'clang::DynTypedNode' has not been declared
65 | getNodeParents(const clang::StringLiteral &NodeString, clang::DynTypedNode Node,
| ^~~~~
/avcleaner/MatchHandler.h:75:32: error: 'clang::DynTypedNode' has not been declared
75 | clang::DynTypedNode node, std::string StringType);
| ^~~~~
/avcleaner/MatchHandler.h:84:25: error: 'clang::DynTypedNode' has not been declared
84 | clang::DynTypedNode node, std::string StringType);
| ^~~~~
/avcleaner/MatchHandler.h:96:51: error: 'clang::DynTypedNode' has not been declared
96 | findInjectionSpot(clang::ASTContext *Context, clang::DynTypedNode Parent,
| ^~~~~
/avcleaner/MatchHandler.h:107:29: error: 'clang::DynTypedNode' has not been declared
107 | clang::DynTypedNode node, std::string StringType);
| ^~~~~
/avcleaner/MatchHandler.h:123:21: error: 'clang::DynTypedNode' has not been declared
123 | clang::DynTypedNode node, std::string StringType="", std::string NewType="");
| ^~~~~
/avcleaner/MatchHandler.h:126:28: error: 'clang::DynTypedNode' has not been declared
126 | clang::DynTypedNode node, std::string StringType);
| ^~~~~
In file included from /avcleaner/main.cpp:19:
/avcleaner/ApiMatchHandler.h:67:83: error: 'clang::DynTypedNode' has not been declared
67 | static clang::SourceRange findInjectionSpot(clang::ASTContext *const Context, clang::DynTypedNode Parent,
| ^~~~~
/avcleaner/ApiMatchHandler.h:88:41: error: 'clang::DynTypedNode' has not been declared
88 | getParents(const clang::Expr &pExr, clang::DynTypedNode Node, clang::ASTContext *const Context,
| ^~~~~
/avcleaner/ApiMatchHandler.h:91:75: error: 'clang::DynTypedNode' has not been declared
91 | clang::SourceLocation findFirstFunctionDecl(const clang::Expr &pExpr, clang::DynTypedNode Node,
| ^~~~~
/avcleaner/main.cpp: In function 'int main(int, const char**)':
/avcleaner/main.cpp:214:78: error: no matching function for call to 'clang::tooling::CommonOptionsParser::create(int&, const char**&, llvm::cl::OptionCategory&)'
214 | auto option_parser = CommonOptionsParser::create(argc, argv, ToolCategory);
| ^
In file included from /avcleaner/main.cpp:8:
/usr/lib/llvm-10/include/clang/Tooling/CommonOptionsParser.h:97:3: note: candidate: 'static llvm::Expected<clang::tooling::CommonOptionsParser> clang::tooling::CommonOptionsParser::create(int&, const char**, llvm::cl::OptionCategory&, llvm::cl::NumOccurrencesFlag, const char*)'
97 | create(int &argc, const char **argv, llvm::cl::OptionCategory &Category,
| ^~~~~~
/usr/lib/llvm-10/include/clang/Tooling/CommonOptionsParser.h:97:3: note: candidate expects 5 arguments, 3 provided
make[2]: *** [CMakeFiles/avcleaner.bin.dir/build.make:63: CMakeFiles/avcleaner.bin.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/avcleaner.bin.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
My clang version:
root@24c0b22321e9:/avcleaner/CMakeBuild# clang -v
clang version 10.0.0-4ubuntu1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9
Candidate multilib: .;@m64
Selected multilib: .;@m64
In fact, I use clang12.0 and have the same error. I don't know what's the reason
Ubuntu clang version 12.0.0-3ubuntu1~20.04.5
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9
Candidate multilib: .;@m64
Selected multilib: .;@m64
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels