Created attachment 649394 [details] build.log In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/include/g++-v11/map:60, from ../../../src/include/manager.h:9, from openfileslistplugin.cpp:13: /usr/lib/gcc/x86_64-pc-linux-gnu/11.0.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 = ProjectFile*; _Val = ProjectFile*; _KeyOfValue = std::_Identity<ProjectFile*>; _Compare = TargetFilesData::compareLess; _Alloc = std::allocator<ProjectFile*>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type = const std::_Rb_tree_node<ProjectFile*>*]’: /usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/include/g++-v11/bits/stl_tree.h:2103: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 = ProjectFile*; _Val = ProjectFile*; _KeyOfValue = std::_Identity<ProjectFile*>; _Compare = TargetFilesData::compareLess; _Alloc = std::allocator<ProjectFile*>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::key_type = ProjectFile*]’ /usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/include/g++-v11/bits/stl_tree.h:2156: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 = ProjectFile* const&; _Key = ProjectFile*; _Val = ProjectFile*; _KeyOfValue = std::_Identity<ProjectFile*>; _Compare = TargetFilesData::compareLess; _Alloc = std::allocator<ProjectFile*>]’ /usr/lib/gcc/x86_64-pc-linux-gnu/11.0.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<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = ProjectFile*; _Compare = TargetFilesData::compareLess; _Alloc = std::allocator<ProjectFile*>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<ProjectFile*, ProjectFile*, std::_Identity<ProjectFile*>, TargetFilesData::compareLess, std::allocator<ProjectFile*> >::const_iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other = std::allocator<ProjectFile*>; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<ProjectFile*>, ProjectFile*>::rebind<ProjectFile*>; typename _Allocator::value_type = ProjectFile*; std::set<_Key, _Compare, _Alloc>::value_type = ProjectFile*]’ openfileslistplugin.cpp:440:60: required from here /usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/include/g++-v11/bits/stl_tree.h:782:15: error: static assertion failed: comparison object must be invocable as const 782 | is_invocable_v<const _Compare&, const _Key&, const _Key&>, |
Created attachment 649396 [details] emerge --info
also failed with gcc-10 in #733122. Please double check, if it is gcc-11 related here.
Sorry, the build time of GCC is too long on my current PC so I can't currently test build against live/git packages like sys-devel/gcc-11.0.0_pre9999. Waiting for unmasking of gcc-11.
Created attachment 664792 [details, diff] codeblocks-9999.patch I tried -9999 today and it looks like one liner (attached as codeblocks-9999.patch) is enough: --- a/src/plugins/openfileslist/openfileslistplugin.h +++ b/src/plugins/openfileslist/openfileslistplugin.h @@ -23,7 +23,7 @@ struct TargetFilesData // Functor for the std::set predicate to sort the opened editor files according to their tab order struct compareLess { - bool operator()(const ProjectFile* lhs, const ProjectFile* rhs) { return lhs->editorTabPos < rhs->editorTabPos; } + bool operator()(const ProjectFile* lhs, const ProjectFile* rhs) const { return lhs->editorTabPos < rhs->editorTabPos; } }; typedef std::set<ProjectFile*, compareLess> OpenFilesSet; ProjectFile* activeFile;
Filed upstream as https://sourceforge.net/p/codeblocks/tickets/1022/
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56d8bafba4d7c3431ebcbd05492f0b16b5ce8001 commit 56d8bafba4d7c3431ebcbd05492f0b16b5ce8001 Author: band-a-prend <torokhov-s-a@yandex.ru> AuthorDate: 2020-10-14 15:29:49 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-10-14 18:35:08 +0000 dev-util/codeblocks: fix gcc-11 compatibility The GCC 11 now enforces that comparison objects be invocable as const. Current patch to fix gcc-11 compatibility is proposed by Sergei Trofimovich <slyfox@gentoo.org> and fix codeblocks "openfileslist" pligin compilation error. Patch was sent to upstream : https://sourceforge.net/p/codeblocks/tickets/1022/ so live-ebuild currently doesn't apply it. Closes: https://bugs.gentoo.org/732818 Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru> Closes: https://github.com/gentoo/gentoo/pull/17928 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> dev-util/codeblocks/codeblocks-17.12-r304.ebuild | 83 ++++++++++++++++++++++ dev-util/codeblocks/codeblocks-20.03-r2.ebuild | 77 ++++++++++++++++++++ .../codeblocks-20.03_gcc11_compatibility.patch | 12 ++++ 3 files changed, 172 insertions(+)