[clazy] [Bug 506763] New: Undefined symbols builing clazy on MacOS with llvm20
Steve Skutnik
bugzilla_noreply at kde.org
Tue Jul 8 15:19:51 BST 2025
https://bugs.kde.org/show_bug.cgi?id=506763
Bug ID: 506763
Summary: Undefined symbols builing clazy on MacOS with llvm20
Classification: Developer tools
Product: clazy
Version First unspecified
Reported In:
Platform: Compiled Sources
OS: macOS
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: unassigned-bugs at kde.org
Reporter: skutnikse at ornl.gov
CC: smartins at kde.org
Target Milestone: ---
SUMMARY
I am getting an undefined symbol error during the linking phase when building
clazy from source on MacOS Sequoia 15.5 (Intel processor), using llvm v20.1.7 +
clang v20.1.7. I am compiling from source off of the master branch at
https://invent.kde.org/sdk/clazy.
STEPS TO REPRODUCE
1. Configure clazy using CMake & NInja:
$ export CXX=clang++
$ export LLVM_ROOT=/usr/local/opt/llvm
$ cmake -G Ninja
2. Attempt to build:
$ cmake --build .
3. Target builds but fails on linker stage.
OBSERVED RESULT
Undefined symbols for architecture x86_64:
"llvm::Registry<clang::tidy::ClangTidyModule>::node::node(llvm::SimpleRegistryEntry<clang::tidy::ClangTidyModule>
const&)", referenced from:
llvm::Registry<clang::tidy::ClangTidyModule>::Add<ClazyModule>::Add(llvm::StringRef,
llvm::StringRef) in ClazyClangTidyModule.cpp.o
"llvm::Registry<clang::tidy::ClangTidyModule>::add_node(llvm::Registry<clang::tidy::ClangTidyModule>::node*)",
referenced from:
llvm::Registry<clang::tidy::ClangTidyModule>::Add<ClazyModule>::Add(llvm::StringRef,
llvm::StringRef) in ClazyClangTidyModule.cpp.o
"clang::tidy::ClangTidyCheck::run(clang::ast_matchers::MatchFinder::MatchResult
const&)", referenced from:
vtable for ClazyCheck in ClazyClangTidyModule.cpp.o
"clang::tidy::ClangTidyCheck::ClangTidyCheck(llvm::StringRef,
clang::tidy::ClangTidyContext*)", referenced from:
ClazyCheck::ClazyCheck(llvm::StringRef, clang::tidy::ClangTidyContext*)
in ClazyClangTidyModule.cpp.o
"clang::tidy::ClangTidyModule::getModuleOptions()", referenced from:
vtable for ClazyModule in ClazyClangTidyModule.cpp.o
"clang::tidy::ClangTidyContext::diag(llvm::StringRef, clang::SourceLocation,
llvm::StringRef, clang::DiagnosticIDs::Level)", referenced from:
ClazyCheck::emitDiagnostic::'lambda'(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char>> const&,
clang::SourceLocation const&, clang::DiagnosticIDs::Level,
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char>>, std::__1::vector<clang::FixItHint,
std::__1::allocator<clang::FixItHint>>
const&)::operator()(std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char>> const&, clang::SourceLocation const&,
clang::DiagnosticIDs::Level, std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char>>,
std::__1::vector<clang::FixItHint, std::__1::allocator<clang::FixItHint>>
const&) const in ClazyClangTidyModule.cpp.o
"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 from:
void
clang::tidy::ClangTidyCheckFactories::registerCheck<ClazyCheck>(llvm::StringRef)
in ClazyClangTidyModule.cpp.o
"vtable for clang::tidy::ClangTidyCheck", referenced from:
clang::tidy::ClangTidyCheck::~ClangTidyCheck() in
ClazyClangTidyModule.cpp.o
NOTE: a missing vtable usually means the first non-inline virtual member
function has no definition.
"vtable for clang::tidy::ClangTidyModule", referenced from:
clang::tidy::ClangTidyModule::ClangTidyModule() in
ClazyClangTidyModule.cpp.o
NOTE: a missing vtable usually means the first non-inline virtual member
function has no definition.
ld: symbol(s) not found for architecture x86_64
EXPECTED RESULT
clazy should link without errors.
SOFTWARE/OS VERSIONS
macOS: 15.5
Qt Version: N/A (testing for Qt5.15 => Qt6)
Linker command output (if it's useful):
ld: warning: ignoring duplicate libraries: '-lLLVM-20', '-lclangSupport',
'-lclangTooling', '-lclangToolingCore', '-lclangToolingRefactoring',
'/usr/local/Cellar/llvm/20.1.7/lib/libclangAPINotes.a',
'/usr/local/Cellar/llvm/20.1.7/lib/libclangARCMigrate.a',
'/usr/local/Cellar/llvm/20.1.7/lib/libclangASTMatchers.a',
'/usr/local/Cellar/llvm/20.1.7/lib/libclangBasic.a',
'/usr/local/Cellar/llvm/20.1.7/lib/libclangDependencyScanning.a',
'/usr/local/Cellar/llvm/20.1.7/lib/libclangEdit.a',
'/usr/local/Cellar/llvm/20.1.7/lib/libclangFrontendTool.a',
'/usr/local/Cellar/llvm/20.1.7/lib/libclangLex.a',
'/usr/local/Cellar/llvm/20.1.7/lib/libclangParse.a',
'/usr/local/Cellar/llvm/20.1.7/lib/libclangSerialization.a',
'/usr/local/Cellar/llvm/20.1.7/lib/libclangStaticAnalyzerCheckers.a',
'/usr/local/Cellar/llvm/20.1.7/lib/libclangStaticAnalyzerCore.a',
'/usr/local/Cellar/llvm/20.1.7/lib/libclangStaticAnalyzerFrontend.a',
'/usr/local/Cellar/llvm/20.1.7/lib/libclangSupport.a',
'/usr/local/Cellar/llvm/20.1.7/lib/libclangTooling.a',
'/usr/local/Cellar/llvm/20.1.7/lib/libclangToolingCore.a',
'/usr/local/Cellar/llvm/20.1.7/lib/libclangToolingInclusions.a',
'/usr/local/Cellar/llvm/20.1.7/lib/libclangToolingRefactoring.a',
'/usr/local/Cellar/llvm/20.1.7/lib/libclangToolingSyntax.a',
'/usr/local/Cellar/llvm/20.1.7/lib/libclangTransformer.a'
--
You are receiving this mail because:
You are watching all bug changes.
More information about the kde-mac
mailing list