Hi KDE developers, I am building clazy-git by clang-5.0svn clazy-git: commit 66ac3ee6ff20ee94a041fb6eb90eb4fb2bb3957b clang-5.0svn: Fedora clang version 5.0.0 (trunk 304519) (based on LLVM 5.0.0svn) but failed: Scanning dependencies of target clazy-standalone [ 98%] Building CXX object CMakeFiles/clazy-standalone.dir/src/ClazyStandaloneMain.cpp.o [100%] Linking CXX executable bin/clazy-standalone CMakeFiles/clazy-standalone.dir/src/ClazyStandaloneMain.cpp.o: In function `clang::ast_matchers::hasName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': /usr/include/clang/ASTMatchers/ASTMatchers.h:2242: undefined reference to `clang::ast_matchers::internal::HasNameMatcher::HasNameMatcher(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >)' CMakeFiles/clazy-standalone.dir/src/ClazyStandaloneMain.cpp.o: In function `clang::ast_matchers::internal::matcher_forEachOverridden0Matcher::matches(clang::CXXMethodDecl const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const': /usr/include/clang/ASTMatchers/ASTMatchers.h:4101: undefined reference to `clang::CXXMethodDecl::overridden_methods() const' CMakeFiles/clazy-standalone.dir/src/ClazyStandaloneMain.cpp.o:(.data.rel.ro._ZTV15ClazyToolAction[_ZTV15ClazyToolAction]+0x20): undefined reference to `clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*)' lib/ClangLazy.so: undefined reference to `llvm::Registry<clang::PluginASTAction>::add_node(llvm::Registry<clang::PluginASTAction>::node*)' lib/ClangLazy.so: undefined reference to `clang::DeclarationName::getCXXDeductionGuideTemplate() const' lib/ClangLazy.so: undefined reference to `clang::QualType::isTriviallyCopyableType(clang::ASTContext const&) const' clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation) CMakeFiles/clazy-standalone.dir/build.make:155: recipe for target 'bin/clazy-standalone' failed make[2]: *** [bin/clazy-standalone] Error 1 CMakeFiles/Makefile2:142: recipe for target 'CMakeFiles/clazy-standalone.dir/all' failed make[1]: *** [CMakeFiles/clazy-standalone.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2 I am trying to fix it :) Regards, Leslie Zhai
can you check if clazy 1.1 builds with that version of clang ?
clang-5.0svn is able to build clazy v1.1, I am reading the patch diff -Naur clazy-1.1 clazy > clazy.patch
Builds fine on Archlinux, with clang 5.0 from git Can you try disabling clazy-standalone from building, and only building clazy plugin ?
Git commit 754fdceae7de7cbf737af919e28f1a1ec8270189 by Sergio Martins. Committed on 11/06/2017 at 18:54. Pushed by smartins into branch '1.2'. Fix fedora 25 build Don't link to LLVMSupport if not needed. Respect LLVM_LIBS_LIST. Might also fix another bug: M +8 -5 CMakeLists.txt https://commits.kde.org/clazy/754fdceae7de7cbf737af919e28f1a1ec8270189
This should be fixed, please re-test
Sorry for late response! worked :)