Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Fix for GCC11 #157

Merged
merged 1 commit into from
Dec 15, 2020
Merged

Include Fix for GCC11 #157

merged 1 commit into from
Dec 15, 2020

Conversation

LWSS
Copy link
Contributor

@LWSS LWSS commented Dec 14, 2020

Hi, just got GCC11 on my distro, seems that it requires <limits> to be explicitly there.

Original Error is

[blackops@localhost bu]$ make -j12
Scanning dependencies of target RmlCore
[  0%] Building CXX object CMakeFiles/RmlCore.dir/cmake_pch.hxx.gch
In file included from /tmp/RmlUi-master/Include/RmlUi/Config/Config.h:60,
                 from /tmp/RmlUi-master/Include/RmlUi/Core/Types.h:32,
                 from /tmp/RmlUi-master/Include/RmlUi/Core/Core.h:33,
                 from /tmp/RmlUi-master/Include/RmlUi/Core.h:32,
                 from /tmp/RmlUi-master/Source/Core/precompiled.h:32,
                 from /tmp/RmlUi-master/bu/CMakeFiles/RmlCore.dir/cmake_pch.hxx:5,
                 from <command-line>:
/tmp/RmlUi-master/Include/RmlUi/Core/Containers/robin_hood.h: In member function ‘size_t robin_hood::detail::Table<IsFlat, MaxLoadFactor100, Key, T, Hash, KeyEqual>::calcMaxNumElementsAllowed(size_t) const’:
/tmp/RmlUi-master/Include/RmlUi/Core/Containers/robin_hood.h:2021:13: error: ‘numeric_limits’ is not a member of ‘std’
 2021 |         if (ROBIN_HOOD_LIKELY(maxElements <= (std::numeric_limits<size_t>::max)() / 100)) {
      |             ^~~~~~~~~~~~~~~~~
/tmp/RmlUi-master/Include/RmlUi/Core/Containers/robin_hood.h:2021:13: error: expected primary-expression before ‘>’ token
 2021 |         if (ROBIN_HOOD_LIKELY(maxElements <= (std::numeric_limits<size_t>::max)() / 100)) {
      |             ^~~~~~~~~~~~~~~~~
/tmp/RmlUi-master/Include/RmlUi/Core/Containers/robin_hood.h:2021:13: error: ‘::max’ has not been declared; did you mean ‘std::max’?
 2021 |         if (ROBIN_HOOD_LIKELY(maxElements <= (std::numeric_limits<size_t>::max)() / 100)) {
      |             ^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/functional:65,
                 from /tmp/RmlUi-master/Include/RmlUi/Config/Config.h:48,
                 from /tmp/RmlUi-master/Include/RmlUi/Core/Types.h:32,
                 from /tmp/RmlUi-master/Include/RmlUi/Core/Core.h:33,
                 from /tmp/RmlUi-master/Include/RmlUi/Core.h:32,
                 from /tmp/RmlUi-master/Source/Core/precompiled.h:32,
                 from /tmp/RmlUi-master/bu/CMakeFiles/RmlCore.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
^Cmake[2]: *** Deleting file 'CMakeFiles/RmlCore.dir/cmake_pch.hxx.gch'
make[2]: *** [CMakeFiles/RmlCore.dir/build.make:83: CMakeFiles/RmlCore.dir/cmake_pch.hxx.gch] Interrupt
make[1]: *** [CMakeFiles/Makefile2:124: CMakeFiles/RmlCore.dir/all] Interrupt
make: *** [Makefile:149: all] Interrupt

similar bug here: https://bugs.gentoo.org/753239

@mikke89
Copy link
Owner

mikke89 commented Dec 15, 2020

Thanks! This should probably be reported upstream as well: https://github.com/martinus/robin-hood-hashing

@mikke89 mikke89 merged commit e903b1d into mikke89:master Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants