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

Bug 609692

Summary: games-action/btanks-0.9.8083 : mrt/exception.h:63:163: error: throw will always call terminate() [-Werror=terminate]
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo Games <games>
Status: RESOLVED FIXED    
Severity: normal CC: plevine457
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 582084    
Attachments: emerge-info.txt
config.log
emerge-history.txt
environment
etc.portage.tbz2
games-action:btanks-0.9.8083:20170218-012801.log
patch to add noexcept(false) to destructor

Description Toralf Förster gentoo-dev 2017-02-18 09:32:41 UTC
                 from mrt/timespy.cpp:21:
mrt/timespy.cpp: In destructor ‘mrt::TimeSpy::~TimeSpy()’:
mrt/exception.h:63:163: error: throw will always call terminate() [-Werror=terminate]
 sage(mrt::format_string str); e.add_message(e.get_custom_message()); throw e; }
                                                                            ^
mrt/ioexception.h:31:23: note: in expansion of macro ‘throw_generic’

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

  This is an unstable amd64 chroot image (named desktop-libressl-abi32+64_20170215-185650) at a hardened host acting as a tinderbox.

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

gcc-config -l:
 [1] x86_64-pc-linux-gnu-6.3.0 *
llvm-config:
3.9.1
Available Python interpreters, in order of preference:
  [1]   python3.4
  [2]   python2.7 (fallback)

java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.3.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm
Comment 1 Toralf Förster gentoo-dev 2017-02-18 09:32:44 UTC
Created attachment 464188 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-02-18 09:32:48 UTC
Created attachment 464190 [details]
config.log
Comment 3 Toralf Förster gentoo-dev 2017-02-18 09:32:50 UTC
Created attachment 464192 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2017-02-18 09:32:53 UTC
Created attachment 464194 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2017-02-18 09:32:56 UTC
Created attachment 464196 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2017-02-18 09:32:59 UTC
Created attachment 464198 [details]
games-action:btanks-0.9.8083:20170218-012801.log
Comment 7 zakalwe 2017-02-18 10:40:40 UTC
This is new behaviour from gcc 6 branch that means destructors are noexcept by default.  As a workaround you can add "-Wno-error=terminate" to CXXFLAGS or try the attached patch.  I have not tried it, but I believe it would help.
Comment 8 zakalwe 2017-02-18 10:42:04 UTC
Created attachment 464206 [details, diff]
patch to add noexcept(false) to destructor
Comment 9 David Seifert gentoo-dev 2017-02-18 10:59:29 UTC
(In reply to zakalwe from comment #8)
> Created attachment 464206 [details, diff] [details, diff]
> patch to add noexcept(false) to destructor

That patch will fail with GCC 5 and below, as they compile C++ in -std=gnu++98 mode by default, which doesn't know noexcept(). The proper fix is to make it conditional on the __cplusplus macro value.
Comment 10 Peter Levine 2017-07-24 04:36:33 UTC
PR: https://github.com/gentoo/gentoo/pull/5190
Comment 11 David Seifert gentoo-dev 2017-07-30 09:11:01 UTC
commit ddc1a4cfd09f5429575c3eba483995b22907d9ef
Author: Peter Levine <plevine457@gmail.com>
Date:   Mon Jul 24 00:26:42 2017 -0400

    games-action/btanks: Fix building with -Werror=terminate in GCC-6
    
    Bug: https://bugs.gentoo.org/show_bug.cgi?id=609692