CrayClang fails to compile CMake master branch
I tried to compile CMake with Cray compilers which were detected as follows:
$ cmake -Bbuild -DCMAKE_INSTALL_PREFIX=`pwd`/../
-- The C compiler identification is CrayClang 16.0.1
-- The CXX compiler identification is CrayClang 16.0.1
-- Cray Programming Environment 2.7.23 C
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/cray/pe/craype/2.7.23/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Cray Programming Environment 2.7.23 CXX
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/cray/pe/craype/2.7.23/bin/CC - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking if compiler supports needed C++17 constructs
-- Checking if compiler supports needed C++17 constructs - yes
-- Checking if compiler supports C++ make_unique
-- Checking if compiler supports C++ make_unique - yes
-- Checking if compiler supports C++ filesystem
-- Checking if compiler supports C++ filesystem - yes
...
and a lot of checks below...
But then, almost at the end, one of tests is failed to compile:
Building CXX object Tests/CMakeLib/CMakeFiles/CMakeLibTests.dir/testCMakePath.cxx.o
In file included from /home/lokalgi/test/xtb-cmake/cmake/Tests/CMakeLib/testCMakePath.cxx:13:
In file included from /home/lokalgi/test/xtb-cmake/cmake/Source/cmCMakePath.h:12:
In file included from /home/lokalgi/test/xtb-cmake/cmake/Utilities/std/cm/filesystem:12:
In file included from /opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/filesystem:45:
/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/fs_path.h:119:16: error: call to '__is_path_src' is ambiguous
: decltype(__is_path_src(std::declval<_Source>(), 0))
^~~~~~~~~~~~~
/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/type_traits:139:14: note: in instantiation of template class 'std::filesystem::__detail::__constructible_from<cm::static_string_view, void>' requested here
: public conditional<_B1::value, _B2, _B1>::type
^
/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/type_traits:144:14: note: in instantiation of template class 'std::__and_<std::__not_<std::is_void<cm::static_string_view>>, std::filesystem::__detail::__constructible_from<cm::static_string_view, void>>' requested here
: public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type
^
/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/fs_path.h:124:22: note: in instantiation of template class 'std::__and_<std::__not_<std::is_same<cm::static_string_view, std::filesystem::path>>, std::__not_<std::is_void<cm::static_string_view>>, std::filesystem::__detail::__constructible_from<cm::static_string_view, void>>' requested here
std::enable_if<__and_<__not_<is_same<remove_cv_t<_Tp1>, path>>,
^
/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/fs_path.h:223:37: note: in instantiation of template type alias '_Path' requested here
typename _Require = __detail::_Path<_Source>>
^
/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/fs_path.h:224:7: note: in instantiation of default argument for 'path<static_string_view>' required here
path(_Source const& __source, format = auto_format)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lokalgi/test/xtb-cmake/cmake/Tests/CMakeLib/testCMakePath.cxx:51:23: note: while substituting deduced template arguments into function template 'path' [with _Source = static_string_view, _Require = (no value)]
cmCMakePath path{ "aa/bb"_s };
^
/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/fs_path.h:103:5: note: candidate function [with _CharT = char, _Traits = std::char_traits<char>]
__is_path_src(const basic_string_view<_CharT, _Traits>&, int);
^
/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/fs_path.h:107:5: note: candidate function [with _Unknown = cm::static_string_view]
__is_path_src(const _Unknown&, ...);
^
1 error generated.
Used commit is 8b16e718.
I have no idea which additional info I should provide. If you have, please, let me know.
The full log of configure + compilation is here: https://pastebin.com/edvBM1DL