checking whether clang++ supports C++17 features with -std=c++17... yes
checking whether std::filesystem can be used without link library... no
checking whether std::filesystem needs -lstdc++fs... no
checking whether std::filesystem needs -lc++fs...
configure: error: cannot figure out how to use std::filesystem
Clang 16.0.6 doesn't provide lib std::filesystem
Is this a new issue with Clang 16.0.6, or the same for any Clang 16, and what you are trying to compile is not ready for Clang 16?
The problem was Guix, it hides system Clang libs, for some reason. Will use Guix in VM from now on.