Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 789963

Summary: games-emulation/snes9x-1.60 - /.../stl_tree.h: error: static assertion failed: comparison object must be invocable as const (maybe gcc-11 related)
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo Games <games>
Status: RESOLVED FIXED    
Severity: normal CC: cctsurf
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 732706    
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tar.bz2
games-emulation:snes9x-1.60:20210513-122141.log
logs.tar.bz2
Ebuild patch that allows snes9x to build with gcc11
A working patch to allow snes9x to build under gcc 11.

Description Toralf Förster gentoo-dev 2021-05-13 12:23:50 UTC
  770 |               is_invocable_v<const _Compare&, const _Key&, const _Key&>,
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/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/lib/gcc/x86_64-pc-linux-gnu/11.1.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 = 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>*]’:

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_plasma_systemd-j2-20210510-163136

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.3.1
 [2] x86_64-pc-linux-gnu-9.3.1
 [3] x86_64-pc-linux-gnu-11.1.0 *
clang version 12.0.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/12/bin
/usr/lib/llvm/12
12.0.0
Python 3.8.10
Available Rust versions:
  [1]   rust-bin-1.52.1
  [2]   rust-1.52.1 *
The following VMs are available for generation-2:
*)	AdoptOpenJDK 8.292_p10 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8  system-vm

The Glorious Glasgow Haskell Compilation System, version 8.10.4
  [1]   php7.3
  [2]   php7.4
  [3]   php8.0 *

  timestamp(s) of HEAD at this tinderbox image:
/var/db/repos/gentoo	Thu May 13 12:05:33 UTC 2021

emerge -qpvO games-emulation/snes9x
[ebuild  N    ] games-emulation/snes9x-1.60  USE="alsa gtk multilib opengl png xv -debug -libretro -netplay -oss -portaudio -pulseaudio -wayland -xinerama"
Comment 1 Toralf Förster gentoo-dev 2021-05-13 12:23:51 UTC
Created attachment 708048 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-05-13 12:23:53 UTC
Created attachment 708051 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2021-05-13 12:23:55 UTC
Created attachment 708054 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2021-05-13 12:23:56 UTC
Created attachment 708057 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2021-05-13 12:23:57 UTC
Created attachment 708060 [details]
games-emulation:snes9x-1.60:20210513-122141.log
Comment 6 Toralf Förster gentoo-dev 2021-05-13 12:23:58 UTC
Created attachment 708063 [details]
logs.tar.bz2
Comment 7 James 2021-05-21 21:45:01 UTC
Created attachment 710124 [details, diff]
Ebuild patch that allows snes9x to build with gcc11
Comment 8 James 2021-05-21 21:47:41 UTC
(In reply to James from comment #7)
> Created attachment 710124 [details, diff] [details, diff]
> Ebuild patch that allows snes9x to build with gcc11

That was done wrong and doesn't work.  Sorry.  Will attach a correct patch.
Comment 9 James 2021-05-21 21:48:55 UTC
Created attachment 710127 [details, diff]
A working patch to allow snes9x to build under gcc 11.
Comment 10 Larry the Git Cow gentoo-dev 2021-05-21 22:06:40 UTC
The bug has been closed via the following commit(s):

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

commit 7c5b7e17bd7487c699cefc72339a7061f737ae81
Author:     David Seifert <soap@gentoo.org>
AuthorDate: 2021-05-21 22:06:23 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2021-05-21 22:06:23 +0000

    games-emulation/snes9x: Fix building against GCC 11
    
    Closes: https://bugs.gentoo.org/789963
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: David Seifert <soap@gentoo.org>

 .../snes9x/files/snes9x-1.60-gcc11.patch           | 31 ++++++++++++++++++++++
 games-emulation/snes9x/snes9x-1.60.ebuild          |  3 ++-
 2 files changed, 33 insertions(+), 1 deletion(-)
Comment 11 Larry the Git Cow gentoo-dev 2021-05-21 22:14:01 UTC
The bug has been closed via the following commit(s):

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

commit 811a2e0756ef3f8028d48ab4193287e7d055afe1
Author:     David Seifert <soap@gentoo.org>
AuthorDate: 2021-05-21 22:13:49 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2021-05-21 22:13:49 +0000

    games-emulation/snes9x: Use upstream patch for GCC 11
    
    * I didn't see the patch until after I committed my own fix already.
    
    Closes: https://bugs.gentoo.org/789963
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: David Seifert <soap@gentoo.org>

 .../snes9x/files/snes9x-1.60-gcc11.patch           | 28 +++++++++++++++++-----
 1 file changed, 22 insertions(+), 6 deletions(-)