Error in testCMakePath.cxx when building 3.28.0 rc5 with _gcc-8.5
When building the rc5 with cmake, I get the following error:
[ 90%] Building CXX object Tests/CMakeLib/CMakeFiles/CMakeLibTests.dir/testCMakePath.cxx.o
In file included from [...]/cmake/Tests/CMakeLib/testCMakePath.cxx:13:
In file included from [...]/cmake/Source/cmCMakePath.h:12:
In file included from [...]/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)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/lus/home/NAT/gda2308/alainm/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.
make[2]: *** [Tests/CMakeLib/CMakeFiles/CMakeLibTests.dir/build.make:468: Tests/CMakeLib/CMakeFiles/CMakeLibTests.dir/testCMakePath.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2490: Tests/CMakeLib/CMakeFiles/CMakeLibTests.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
18:10:01 [alainm@login4 build]#
Tools version:
18:10:01 [alainm@login4 build]#cmake --version
cmake version 3.20.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
18:17:10 [alainm@login4 build]#gcc --version
gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18:17:18 [alainm@login4 build]#