FTBFS with GCC 11

Bug #1939744 reported by Sergio Durigan Junior
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nut (Ubuntu)
Fix Released
Undecided
Sergio Durigan Junior

Bug Description

nut is FTBFS'ing when compiled with GCC 11 due to:

https://launchpadlibrarian.net/552666656/buildlog_ubuntu-impish-amd64.nut_2.7.4-13ubuntu4_BUILDING.txt.gz

libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c nutclient.cpp -fPIC -DPIC -o .libs/nutclient.o
In file included from nutclient.cpp:20:
nutclient.h:135:86: error: ISO C++17 does not allow dynamic exception specifications
  135 | virtual void authenticate(const std::string& user, const std::string& passwd)throw(NutException)=0;
      | ^~~~~
nutclient.h:141:30: error: ISO C++17 does not allow dynamic exception specifications
  141 | virtual void logout()throw(NutException)=0;
      | ^~~~~
nutclient.h:154:58: error: ISO C++17 does not allow dynamic exception specifications
  154 | virtual Device getDevice(const std::string& name)throw(NutException);
      | ^~~~~
nutclient.h:159:46: error: ISO C++17 does not allow dynamic exception specifications
  159 | virtual std::set<Device> getDevices()throw(NutException);
      | ^~~~~
...

This is happening because GCC 11 defaults to C++17 which doesn't allow dynamic exception specifications.

Upstream has fixed the bug:

https://github.com/networkupstools/nut/commit/fab323320d5b955ed034b2eea390a9bbb549e8e5

I'm preparing an MP and will post it soon.

Tags: ftbfs

Related branches

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nut - 2.7.4-13ubuntu5

---------------
nut (2.7.4-13ubuntu5) impish; urgency=medium

  * d/p/Remove-dynamic-exception-specifications-from-clients.patch:
    Fix FTBFS with GCC 11 due to C++17 not allowing dynamic exception
    specifications anymore. (LP: #1939744)

 -- Sergio Durigan Junior <email address hidden> Thu, 12 Aug 2021 15:51:12 -0400

Changed in nut (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.