Bug 444469

Summary: clazy missing link to libstdc++fs
Product: [Developer tools] clazy Reporter: Hamish Moffatt <hamish+kde>
Component: generalAssignee: Unassigned bugs <unassigned-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: alexander.lohnau, smartins
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Hamish Moffatt 2021-10-27 05:02:42 UTC
SUMMARY

clazy 1.10 fails to build on Debian 10 because it needs to link against libstdc++fs.


STEPS TO REPRODUCE
1. Install llvm-11, llvm-11-dev, libclang-11-dev, libclang-cpp11-dev from buster backports
2. Configure with PATH=/usr/lib/llvm-11/bin:$PATH cmake ..
3. make


OBSERVED RESULT

clazy-standalone fails to link with the error:

/usr/bin/ld: lib/ClazyPlugin.so: undefined reference to `std::filesystem::__cxx11::path::_M_find_extension() const'
/usr/bin/ld: lib/ClazyPlugin.so: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'

Adding stdc++fs to the link libraries in CMakeLists.txt fixes it.

libstdc++ is from gcc 8. It works on Debian 11 (bullseye) which has libstdc++ from gcc 10.
Comment 1 Alexander Lohnau 2025-06-24 20:52:48 UTC
Works nowadays ;)