llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.23k stars 11.66k forks source link

clang-tidy bug FAILED: bin/CTTestTidyModule.dll #96247

Open trcrsired opened 3 months ago

trcrsired commented 3 months ago
[6799/6885] Linking CXX shared module bin/CTTestTidyModule.dll
FAILED: bin/CTTestTidyModule.dll 
: && /home/cqwrteur/toolchains/llvm/x86_64-pc-linux-gnu/bin/clang++ --target=x86_64-windows-gnu --sysroot=/home/cqwrteur/toolchains/llvm/sysroots/x86_64-windows-gnu/x86_64-windows-gnu -rtlib=compiler-rt -fuse-ld=lld -stdlib=libc++ -lc++abi -Wno-unused-command-line-argument -lunwind -stdlib=libc++ -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -ffunction-sections -fdata-sections -flto=thin -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG  -stdlib=libc++ -fuse-ld=lld   -Wl,--gc-sections -shared -o bin/CTTestTidyModule.dll -Wl,--major-image-version,0,--minor-image-version,0 tools/clang/tools/extra/test/CMakeFiles/CTTestTidyModule.dir/clang-tidy/CTTestTidyModule.cpp.obj  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && :
ld.lld: error: undefined symbol: clang::ASTNodeKind::isBaseOf(clang::ASTNodeKind) const
>>> referenced by /home/cqwrteur/toolchains_build/llvm-project/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp
>>>               tools/clang/tools/extra/test/CMakeFiles/CTTestTidyModule.dir/clang-tidy/CTTestTidyModule.cpp.obj

ld.lld: error: undefined symbol: clang::ast_matchers::internal::DynTypedMatcher::constructVariadic(clang::ast_matchers::internal::DynTypedMatcher::VariadicOperator, clang::ASTNodeKind, std::__1::vector<clang::ast_matchers::internal::DynTypedMatcher, std::__1::allocator<clang::ast_matchers::internal::DynTypedMatcher>>)
>>> referenced by /home/cqwrteur/toolchains_build/llvm-project/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp
>>>               tools/clang/tools/extra/test/CMakeFiles/CTTestTidyModule.dir/clang-tidy/CTTestTidyModule.cpp.obj

ld.lld: error: undefined symbol: clang::ast_matchers::internal::DynTypedMatcher::trueMatcher(clang::ASTNodeKind)
>>> referenced by /home/cqwrteur/toolchains_build/llvm-project/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp
>>>               tools/clang/tools/extra/test/CMakeFiles/CTTestTidyModule.dir/clang-tidy/CTTestTidyModule.cpp.obj

ld.lld: error: undefined symbol: clang::ast_matchers::internal::DynTypedMatcher::dynCastTo(clang::ASTNodeKind) const
>>> referenced by /home/cqwrteur/toolchains_build/llvm-project/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp
>>>               tools/clang/tools/extra/test/CMakeFiles/CTTestTidyModule.dir/clang-tidy/CTTestTidyModule.cpp.obj

ld.lld: error: undefined symbol: llvm::Registry<clang::tidy::ClangTidyModule>::add_node(llvm::Registry<clang::tidy::ClangTidyModule>::node*)
>>> referenced by /home/cqwrteur/toolchains_build/llvm-project/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp
>>>               tools/clang/tools/extra/test/CMakeFiles/CTTestTidyModule.dir/clang-tidy/CTTestTidyModule.cpp.obj

ld.lld: error: undefined symbol: clang::tidy::ClangTidyModule::getModuleOptions()
>>> referenced by /home/cqwrteur/toolchains_build/llvm-project/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp
>>>               tools/clang/tools/extra/test/CMakeFiles/CTTestTidyModule.dir/clang-tidy/CTTestTidyModule.cpp.obj

ld.lld: error: undefined symbol: clang::tidy::ClangTidyCheckFactories::registerCheckFactory(llvm::StringRef, std::__1::function<std::__1::unique_ptr<clang::tidy::ClangTidyCheck, std::__1::default_delete<clang::tidy::ClangTidyCheck>> (llvm::StringRef, clang::tidy::ClangTidyContext*)>)
>>> referenced by /home/cqwrteur/toolchains_build/llvm-project/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp
>>>               tools/clang/tools/extra/test/CMakeFiles/CTTestTidyModule.dir/clang-tidy/CTTestTidyModule.cpp.obj

ld.lld: error: undefined symbol: clang::tidy::ClangTidyCheck::ClangTidyCheck(llvm::StringRef, clang::tidy::ClangTidyContext*)
>>> referenced by /home/cqwrteur/toolchains_build/llvm-project/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp
>>>               tools/clang/tools/extra/test/CMakeFiles/CTTestTidyModule.dir/clang-tidy/CTTestTidyModule.cpp.obj

ld.lld: error: undefined symbol: clang::tidy::ClangTidyCheck::run(clang::ast_matchers::MatchFinder::MatchResult const&)
>>> referenced by /home/cqwrteur/toolchains_build/llvm-project/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp
>>>               tools/clang/tools/extra/test/CMakeFiles/CTTestTidyModule.dir/clang-tidy/CTTestTidyModule.cpp.obj

ld.lld: error: undefined symbol: clang::ast_matchers::MatchFinder::MatchCallback::getCheckTraversalKind() const
>>> referenced by /home/cqwrteur/toolchains_build/llvm-project/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp
>>>               tools/clang/tools/extra/test/CMakeFiles/CTTestTidyModule.dir/clang-tidy/CTTestTidyModule.cpp.obj

ld.lld: error: undefined symbol: clang::ast_matchers::MatchFinder::MatchCallback::~MatchCallback()
>>> referenced by /home/cqwrteur/toolchains_build/llvm-project/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp
>>>               tools/clang/tools/extra/test/CMakeFiles/CTTestTidyModule.dir/clang-tidy/CTTestTidyModule.cpp.obj

ld.lld: error: undefined symbol: clang::ast_matchers::MatchFinder::addMatcher(clang::ast_matchers::internal::Matcher<clang::Decl> const&, clang::ast_matchers::MatchFinder::MatchCallback*)
>>> referenced by /home/cqwrteur/toolchains_build/llvm-project/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp
>>>               tools/clang/tools/extra/test/CMakeFiles/CTTestTidyModule.dir/clang-tidy/CTTestTidyModule.cpp.obj

ld.lld: error: undefined symbol: clang::ast_matchers::internal::DynTypedMatcher::tryBind(llvm::StringRef) const
>>> referenced by /home/cqwrteur/toolchains_build/llvm-project/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp
>>>               tools/clang/tools/extra/test/CMakeFiles/CTTestTidyModule.dir/clang-tidy/CTTestTidyModule.cpp.obj

ld.lld: error: undefined symbol: clang::tidy::ClangTidyCheck::diag(llvm::StringRef, clang::DiagnosticIDs::Level)
>>> referenced by /home/cqwrteur/toolchains_build/llvm-project/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp
>>>               tools/clang/tools/extra/test/CMakeFiles/CTTestTidyModule.dir/clang-tidy/CTTestTidyModule.cpp.obj

ld.lld: error: undefined symbol: clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool)
>>> referenced by /home/cqwrteur/toolchains_build/llvm-project/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp
>>>               tools/clang/tools/extra/test/CMakeFiles/CTTestTidyModule.dir/clang-tidy/CTTestTidyModule.cpp.obj

ld.lld: error: undefined symbol: vtable for clang::tidy::ClangTidyCheck
>>> referenced by /home/cqwrteur/toolchains_build/llvm-project/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp
>>>               tools/clang/tools/extra/test/CMakeFiles/CTTestTidyModule.dir/clang-tidy/CTTestTidyModule.cpp.obj
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
[6800/6885] Linking CXX executable bin/dexp.exe
ninja: build stopped: subcommand failed.
cp: target '/home/cqwrteur/toolchains/llvm/sysroots/x86_64-windows-gnu/llvm/x86_64-windows-gnu/lib/clang/19/': No such file or directory
trcrsired commented 3 months ago

https://github.com/trcrsired/toolchainbuildscripts/blob/main/llvm/x86_64-windows-gnu.sh

my build script is here

trcrsired commented 3 months ago

looks like

lib/libclangAST.dll.a lib/libclangASTMatchers.dll.a lib/libclangTooling.dll.a lib/libclangBasic.dll.a lib/libclangTidy.dll.a

are not linked

trcrsired commented 3 months ago

@banach-space