Bug 485968 - Clazy doesn't build against Clang 18+
Summary: Clazy doesn't build against Clang 18+
Status: RESOLVED FIXED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-22 15:33 UTC by Tim Angus
Modified: 2024-06-16 15:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Angus 2024-04-22 15:33:15 UTC
SUMMARY
Attempts to build Clazy against Clang 18 and later fail.

STEPS TO REPRODUCE
1.  Install Clang 18.
2.  Checkout Clazy master branch.
3.  Build Clazy

OBSERVED RESULT
...
[120/120] Linking CXX executable bin/clazy-standalone
FAILED: bin/clazy-standalone 
: && /usr/bin/c++ -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -fno-exceptions -fno-rtti -fPIC -O3 -DNDEBUG  CMakeFiles/clazy-standalone.dir/src/ClazyStandaloneMain.cpp.o -o bin/clazy-standalone -L/usr/lib/llvm-18/lib -Wl,-rpath,/usr/lib/llvm-18/lib:/home/runner/work/graphia/graphia/clazy/lib:  lib/ClazyPlugin.so  /usr/lib/llvm-18/lib/libclangFrontend.a  /usr/lib/llvm-18/lib/libclangDriver.a  /usr/lib/llvm-18/lib/libclangCodeGen.a  /usr/lib/llvm-18/lib/libclangSema.a  /usr/lib/llvm-18/lib/libclangAnalysis.a  /usr/lib/llvm-18/lib/libclangRewriteFrontend.a  /usr/lib/llvm-18/lib/libclangRewrite.a  /usr/lib/llvm-18/lib/libclangAST.a  /usr/lib/llvm-18/lib/libclangASTMatchers.a  /usr/lib/llvm-18/lib/libclangParse.a  /usr/lib/llvm-18/lib/libclangLex.a  /usr/lib/llvm-18/lib/libclangBasic.a  /usr/lib/llvm-18/lib/libclangARCMigrate.a  /usr/lib/llvm-18/lib/libclangEdit.a  /usr/lib/llvm-18/lib/libclangFrontendTool.a  /usr/lib/llv
/usr/bin/ld: lib/ClazyPlugin.so: undefined reference to `clang::api_notes::APINotesManager::~APINotesManager()'
/usr/bin/ld: lib/ClazyPlugin.so: undefined reference to `clang::api_notes::APINotesManager::loadCurrentModuleAPINotes(clang::Module*, bool, llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >)'
/usr/bin/ld: lib/ClazyPlugin.so: undefined reference to `clang::api_notes::APINotesManager::APINotesManager(clang::SourceManager&, clang::LangOptions const&)'
collect2: error: ld returned 1 exit status

EXPECTED RESULT
Successful build.

SOFTWARE/OS VERSIONS
Ubuntu 20.04 LTS
Clang 18 installed via https://apt.llvm.org/
Comment 1 Allen Winter 2024-06-15 13:05:56 UTC
works for me with clazy master and llvm 18.1.7 (built from source)
Comment 2 Sergio Martins 2024-06-16 12:15:50 UTC
I've reproduced specifically with llvm18 from ubuntu-24.04, will investigate further.
Comment 3 Bug Janitor Service 2024-06-16 15:32:53 UTC
A possibly relevant merge request was started @ https://invent.kde.org/sdk/clazy/-/merge_requests/138