-
Notifications
You must be signed in to change notification settings - Fork 1.5k
ROOT 6.24 fails to compile with GCC 11.1 in C++11 mode #8281
Copy link
Copy link
Closed
Description
First reported here: https://bugs.gentoo.org/793002
To reproduce, it should be enough to configure with
$ cmake .. -DCMAKE_C_COMPILER=gcc-11.1.0 -DCMAKE_CXX_COMPILER=g++-11.1.0 -DCMAKE_CXX_STANDARD=11 -Dminimal=ON
to reproduce the error below
Consolidate compiler generated dependencies of target Foundation_Stage1
[ 18%] Building CXX object core/foundation/CMakeFiles/Foundation_Stage1.dir/src/RConversionRuleParser.cxx.o
In file included from /srv/root/src/root/core/foundation/inc/ROOT/RWrap_libcpp_string_view.h:545,
from /srv/root/src/root/core/foundation/inc/ROOT/RStringView.hxx:26,
from /srv/root/src/root/core/foundation/inc/TClassEdit.h:65,
from /srv/root/src/root/core/foundation/src/RConversionRuleParser.cxx:18:
/srv/root/src/root/core/foundation/inc/ROOT/libcpp_string_view.h: In member function ‘constexpr std::experimental::__ROOT::basic_string_view<_CharT, _Traits>::size_type std::experimental::__ROOT::basic_string_view<_CharT, _Traits>::max_size() const’:
/srv/root/src/root/core/foundation/inc/ROOT/libcpp_string_view.h:275:63: error: ‘numeric_limits’ is not a member of ‘std’
275 | size_type max_size() const _NOEXCEPT { return (_VSTD::numeric_limits<size_type>::max)(); }
| ^~~~~~~~~~~~~~
/srv/root/src/root/core/foundation/inc/ROOT/libcpp_string_view.h:275:87: error: expected primary-expression before ‘>’ token
275 | size_type max_size() const _NOEXCEPT { return (_VSTD::numeric_limits<size_type>::max)(); }
| ^
/srv/root/src/root/core/foundation/inc/ROOT/libcpp_string_view.h:275:90: error: ‘::max’ has not been declared; did you mean ‘std::max’?
275 | size_type max_size() const _NOEXCEPT { return (_VSTD::numeric_limits<size_type>::max)(); }
| ^~~
| std::max
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/algorithm:62,
from /srv/root/src/root/core/foundation/res/TSchemaRuleProcessor.h:15,
from /srv/root/src/root/core/foundation/src/RConversionRuleParser.cxx:17:
/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
make[2]: *** [core/foundation/CMakeFiles/Foundation_Stage1.dir/build.make:90: core/foundation/CMakeFiles/Foundation_Stage1.dir/src/RConversionRuleParser.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:23284: core/foundation/CMakeFiles/Foundation_Stage1.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
The master branch seems to go past this point, so probably something needs to be backported (I tested with the tip of the 6.24 branch).
Reactions are currently unavailable