snes9x-rr icon indicating copy to clipboard operation
snes9x-rr copied to clipboard

Arch Linux: Fails to compile

Open Froloket64 opened this issue 3 years ago • 0 comments

Having cloned the latest commit (at the moment - c7578b4) and the latest release, none seem to compile successfully. That's the output from make after successfully running ./configure:

g++ -I. -I.. -I../apu/ -I../apu/bapu -I../jma/ -I../filter/ -c -O3 -fomit-frame-pointer -fno-exceptions -fno-rtti -pedantic -Wall -W -Wno-unused-parameter -g -O2  -DJOYSTICK_SUPPORT -DZLIB -DUNZIP_SUPPORT -DSYSTEM_ZIP -DJMA_SUPPORT -DHAVE_LIBPNG -DHAVE_MKSTEMP -DHAVE_STRINGS_H -DHAVE_SYS_IOCTL_H -DHAVE_STDINT_H -DRIGHTSHIFT_IS_SAR -DUSE_XVIDEO -DUSE_XINERAMA -DUSE_THREADS -DMITSHM ../conffile.cpp -o ../conffile.o
In file included from /usr/include/c++/11.1.0/set:60,
                 from ../conffile.h:10,
                 from ../conffile.cpp:12:
/usr/include/c++/11.1.0/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::section_then_key_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.1.0/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::section_then_key_less; _Alloc = std::allocator<ConfigFile::ConfigEntry>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::key_type = ConfigFile::ConfigEntry]’
/usr/include/c++/11.1.0/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::section_then_key_less; _Alloc = std::allocator<ConfigFile::ConfigEntry>]’
/usr/include/c++/11.1.0/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::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> >::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:145:15:   required from here
/usr/include/c++/11.1.0/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.1.0/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.1.0/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.1.0/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.1.0/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.1.0/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:215:19:   required from here
/usr/include/c++/11.1.0/bits/stl_tree.h:770:15: error: static assertion failed: comparison object must be invocable as const
/usr/include/c++/11.1.0/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: *** [Makefile:77: ../conffile.o] Error 1

Froloket64 avatar Jan 04 '22 17:01 Froloket64