Control: tags -1 patch

On Mon, Nov 01, 2021 at 12:32:16PM +0100, Andreas Beckmann wrote:
> Source: libretro-snes9x
> Version: 1.53+git20160522-1
> Severity: serious
> Tags: ftbfs sid bookworm
> Justification: fails to build from source
>...
> /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

Workaround patch is below.

> Andreas

cu
Adrian

--- debian/rules.old    2016-06-04 04:07:48.000000000 +0000
+++ debian/rules        2021-11-30 11:00:23.771292059 +0000
@@ -6,6 +6,8 @@
 # Fix hardening-no-bindnow
 export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
 
+export DEB_CXXFLAGS_MAINT_APPEND += -std=gnu++14
+
 ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)
 
 ifeq ($(ARCH),armhf)

Reply via email to