Bug#998228: libretro-snes9x: FTBFS with GCC 11 (-std=c++17): comparison object must be invocable as const

Andreas Beckmann anbe at debian.org
Mon Nov 1 11:32:16 GMT 2021


Source: libretro-snes9x
Version: 1.53+git20160522-1
Severity: serious
Tags: ftbfs sid bookworm
Justification: fails to build from source

g++ -I../libretro -I.. -I../apu/ -I../apu/bapu -Wdate-time -D_FORTIFY_SOURCE=2 -g -ffile-prefix-map=/build/libretro-snes9x-1.53+git20160522=. -fstack-protector-strong -Wformat -Werror=format-security -O3 -DNDEBUG -fno-exceptions -fomit-frame-pointer -fno-rtti
 -pedantic -Wall -W -Wno-unused-parameter -fPIC -DHAVE_STRINGS_H -DHAVE_STDINT_H -DRIGHTSHIFT_IS_SAR -D__LIBRETRO__ -c -o ../conffile.o ../conffile.cpp
In file included from /usr/include/c++/11/set:60,
                 from ../conffile.h:182,
                 from ../conffile.cpp:184:
/usr/include/c++/11/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 = ConfigFile::ConfigEntry; _Va
l = ConfigFile::ConfigEntry; _KeyOfValue = std::_Identity<ConfigFile::ConfigEntry>; _Compare = ConfigFile::ConfigEntry::section_then_key_less; _Alloc = std::allocator<ConfigFile::ConfigEntry>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_L
ink_type = const std::_Rb_tree_node<ConfigFile::ConfigEntry>*]':
/usr/include/c++/11/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 = ConfigFile::ConfigEntr
y; _Val = ConfigFile::ConfigEntry; _KeyOfValue = std::_Identity<ConfigFile::ConfigEntry>; _Compare = ConfigFile::ConfigEntry::section_then_key_less; _Alloc = std::allocator<ConfigFile::ConfigEntry>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::ke
y_type = ConfigFile::ConfigEntry]'
/usr/include/c++/11/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 = const ConfigFile::ConfigEntry&; _Key = ConfigFile::Confi
gEntry; _Val = ConfigFile::ConfigEntry; _KeyOfValue = std::_Identity<ConfigFile::ConfigEntry>; _Compare = ConfigFile::ConfigEntry::section_then_key_less; _Alloc = std::allocator<ConfigFile::ConfigEntry>]'
/usr/include/c++/11/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>::i
nsert(const value_type&) [with _Key = ConfigFile::ConfigEntry; _Compare = ConfigFile::ConfigEntry::section_then_key_less; _Alloc = std::allocator<ConfigFile::ConfigEntry>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::_
_alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<ConfigFile::ConfigEntry, ConfigFile::ConfigEntry, std::_Identity<ConfigFile::ConfigEntry>, ConfigFile::ConfigEntry::section_then_key_less, std::allocator<ConfigFile::ConfigEntry> >::c
onst_iterator; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other = std::allocator<ConfigFile::ConfigEntry>; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<ConfigFile::ConfigEntry>, ConfigFile:
:ConfigEntry>::rebind<ConfigFile::ConfigEntry>; typename _Alloc::value_type = ConfigFile::ConfigEntry; std::set<_Key, _Compare, _Alloc>::value_type = ConfigFile::ConfigEntry]'
../conffile.cpp:316:15:   required from here
/usr/include/c++/11/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/include/c++/11/bits/stl_tree.h:770:15: note: 'std::is_invocable_v<const ConfigFile::ConfigEntry::section_then_key_less&, const ConfigFile::ConfigEntry&, const ConfigFile::ConfigEntry&>' evaluates to false
/usr/include/c++/11/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 = ConfigFile::ConfigEntry; _Val = ConfigFile::ConfigEntry; _KeyOfValue = std::_Identity<ConfigFile::ConfigEntry>; _Compare = ConfigFile::ConfigEntry::line_less; _Alloc = std::allocator<ConfigFile::ConfigEntry>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type = const std::_Rb_tree_node<ConfigFile::ConfigEntry>*]':
/usr/include/c++/11/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 = ConfigFile::ConfigEntry; _Val = ConfigFile::ConfigEntry; _KeyOfValue = std::_Identity<ConfigFile::ConfigEntry>; _Compare = ConfigFile::ConfigEntry::line_less; _Alloc = std::allocator<ConfigFile::ConfigEntry>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::key_type = ConfigFile::ConfigEntry]'
/usr/include/c++/11/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 = const ConfigFile::ConfigEntry&; _Key = ConfigFile::ConfigEntry; _Val = ConfigFile::ConfigEntry; _KeyOfValue = std::_Identity<ConfigFile::ConfigEntry>; _Compare = ConfigFile::ConfigEntry::line_less; _Alloc = std::allocator<ConfigFile::ConfigEntry>]'
/usr/include/c++/11/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 = ConfigFile::ConfigEntry; _Compare = ConfigFile::ConfigEntry::line_less; _Alloc = std::allocator<ConfigFile::ConfigEntry>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<ConfigFile::ConfigEntry, ConfigFile::ConfigEntry, std::_Identity<ConfigFile::ConfigEntry>, ConfigFile::ConfigEntry::line_less, std::allocator<ConfigFile::ConfigEntry> >::const_iterator; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other = std::allocator<ConfigFile::ConfigEntry>; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<ConfigFile::ConfigEntry>, ConfigFile::ConfigEntry>::rebind<ConfigFile::ConfigEntry>; typename _Alloc::value_type = ConfigFile::ConfigEntry; std::set<_Key, _Compare, _Alloc>::value_type = ConfigFile::ConfigEntry]'
../conffile.cpp:386:19:   required from here
/usr/include/c++/11/bits/stl_tree.h:770:15: error: static assertion failed: comparison object must be invocable as const
/usr/include/c++/11/bits/stl_tree.h:770:15: note: 'std::is_invocable_v<const ConfigFile::ConfigEntry::line_less&, const ConfigFile::ConfigEntry&, const ConfigFile::ConfigEntry&>' evaluates to false
make[2]: *** [Makefile:236: ../conffile.o] Error 1


Andreas


More information about the Pkg-games-devel mailing list