$ clang-14 -v
Ubuntu clang version 14.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/13
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/13
Candidate multilib: .;@m64
Selected multilib: .;@m64
$ ./configure CC=clang-14 CXX=clang++-14
...
checking whether std::atomic can be used without link library... no
checking whether std::atomic needs -latomic... no
configure: error: in `/bitcoin':
configure: error: cannot figure out how to use std::atomic
See `config.log' for more details
Here is an excerpt from the config.log:
configure:25695: checking whether std::atomic can be used without link library
configure:25722: clang++-14 -std=c++20 -o conftest -g -O2 -pthread conftest.cpp >&5
In file included from conftest.cpp:32:
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2320:48: error: call to consteval function 'std::chrono::hh_mm_ss::_S_fractional_width' is not a constant
expression
static constexpr unsigned fractional_width = {_S_fractional_width()};
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2320:48: note: undefined function '_S_fractional_width' cannot be used in a constant expression
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2275:2: note: declared here
_S_fractional_width()
^
1 error generated.