Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 829253 - dev-games/ogre-1.9.0-r3: “error: static assertion failed: comparison object must be invocable as const” with sys-devel/gcc-11.2.0
Summary: dev-games/ogre-1.9.0-r3: “error: static assertion failed: comparison object m...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-11
  Show dependency tree
 
Reported: 2021-12-15 10:19 UTC by Cyp
Modified: 2022-01-16 02:12 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.xz (build.log.xz,205.23 KB, application/x-xz)
2021-12-15 10:29 UTC, Cyp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cyp 2021-12-15 10:19:18 UTC
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/g++-v11/map:60,
                 from /var/tmp/portage/dev-games/ogre-1.9.0-r3/work/ogre-1.9.0/OgreMain/include/OgreStdHeaders.h:32,
                 from /var/tmp/portage/dev-games/ogre-1.9.0-r3/work/ogre-1.9.0/OgreMain/include/OgrePrerequisites.h:325,
                 from /var/tmp/portage/dev-games/ogre-1.9.0-r3/work/ogre-1.9.0/OgreMain/include/OgrePlugin.h:31,
                 from /var/tmp/portage/dev-games/ogre-1.9.0-r3/work/ogre-1.9.0/Samples/Common/include/SamplePlugin.h:31,
                 from /var/tmp/portage/dev-games/ogre-1.9.0-r3/work/ogre-1.9.0/Samples/ParticleFX/src/ParticleFX.cpp:1:
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/g++-v11/bits/stl_tree.h: In instantiation of ‘static const _Key& std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_S_key(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type) [with _Key = OgreBites::Sample*; _Val = OgreBites::Sample*; _KeyOfValue = std::_Identity<OgreBites::Sample*>; _Compare = OgreBites::Sample::Comparer; _Alloc = std::allocator<OgreBites::Sample*>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type = const std::_Rb_tree_node<OgreBites::Sample*>*]’:
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/g++-v11/bits/stl_tree.h:2069:47:   required from ‘std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_unique_pos(const key_type&) [with _Key = OgreBites::Sample*; _Val = OgreBites::Sample*; _KeyOfValue = std::_Identity<OgreBites::Sample*>; _Compare = OgreBites::Sample::Comparer; _Alloc = std::allocator<OgreBites::Sample*>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::key_type = OgreBites::Sample*]’
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/g++-v11/bits/stl_tree.h:2122:4:   required from ‘std::pair<std::_Rb_tree_iterator<_Val>, bool> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_unique(_Arg&&) [with _Arg = OgreBites::Sample* const&; _Key = OgreBites::Sample*; _Val = OgreBites::Sample*; _KeyOfValue = std::_Identity<OgreBites::Sample*>; _Compare = OgreBites::Sample::Comparer; _Alloc = std::allocator<OgreBites::Sample*>]’
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/g++-v11/bits/stl_set.h:512:25:   required from ‘std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = OgreBites::Sample*; _Compare = OgreBites::Sample::Comparer; _Alloc = std::allocator<OgreBites::Sample*>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<OgreBites::Sample*, OgreBites::Sample*, std::_Identity<OgreBites::Sample*>, OgreBites::Sample::Comparer, std::allocator<OgreBites::Sample*> >::const_iterator; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other = std::allocator<OgreBites::Sample*>; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<OgreBites::Sample*>, OgreBites::Sample*>::rebind<OgreBites::Sample*>; typename _Alloc::value_type = OgreBites::Sample*; std::set<_Key, _Compare, _Alloc>::value_type = OgreBites::Sample*]’
/var/tmp/portage/dev-games/ogre-1.9.0-r3/work/ogre-1.9.0/Samples/Common/include/SamplePlugin.h:81:19:   required from here
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/g++-v11/bits/stl_tree.h:770:15: error: static assertion failed: comparison object must be invocable as const
  770 |               is_invocable_v<const _Compare&, const _Key&, const _Key&>,
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/g++-v11/bits/stl_tree.h:770:15: note: ‘std::is_invocable_v<const OgreBites::Sample::Comparer&, OgreBites::Sample* const&, OgreBites::Sample* const&>’ evaluates to false


Reproducible: Always

Steps to Reproduce:
1. Update gcc to recent version
2. Reemerge ogre
3. Build failure
Actual Results:  
Build failure

Expected Results:  
No build failure

Previously successfully emerged same version of ogre. Assuming it was updating gcc that broke it.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-15 10:21:48 UTC
Please attach the full build.log.

Anyway:
- USE=-examples may help
- ... or CXXFLAGS="... -std=c++14"
Comment 2 Cyp 2021-12-15 10:29:23 UTC
Created attachment 759139 [details]
build.log.xz

Forgot to make the build.log readable by non-root users, and got this when uploading:


Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@gentoo.org to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.
Apache Server at bugs.gentoo.org Port 443
Comment 3 Samuel Bauer 2022-01-16 02:03:03 UTC
As a workaround I compile with clang.
Comment 4 Samuel Bauer 2022-01-16 02:06:49 UTC
You may also compile with gcc 10 but ois and openexr needs to be compiled with gcc-10 too then
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-16 02:08:18 UTC
(In reply to Samuel Bauer from comment #4)
> You may also compile with gcc 10 but ois and openexr needs to be compiled
> with gcc-10 too then

Or just do what I said..
Comment 6 Larry the Git Cow gentoo-dev 2022-01-16 02:12:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dcefab179a1230eed77c6732e355a1e32edd1950

commit dcefab179a1230eed77c6732e355a1e32edd1950
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-01-16 02:11:48 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-01-16 02:11:48 +0000

    dev-games/ogre: workaround 1.9.0 USE=examples failure with GCC 11
    
    Fixed properly in newer versions.
    
    Closes: https://bugs.gentoo.org/829253
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-games/ogre/ogre-1.9.0-r3.ebuild | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)