Source: snmpkit
Version: 0.9-16
Severity: serious
Tags: ftbfs patch
Justification: fails to build from source (but built successfully in the past)
X-Debbugs-Cc: i...@hack3r.moe

Dear maintainer(s),

snmpkit failed to build from source due to newly adopted ISO C++17 not allowing
dynamic exception specifications:

```
/bin/bash ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..    
-g -O2  -g -O2 -MT ber.lo -MD -MP -MF .deps/ber.Tpo -c -o ber.lo ber.C
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -g -O2 -g -O2 -MT ber.lo -MD 
-MP -MF .deps/ber.Tpo -c ber.C  -fPIC -DPIC -o .libs/ber.o
In file included from ber.C:36:
ber.h:118:5: error: ISO C++17 does not allow dynamic exception specifications
  118 |     throw(BerNullTagException,BerNullLengthExecption);
      |     ^~~~~
ber.h:129:5: error: ISO C++17 does not allow dynamic exception specifications
  129 |     throw(BerIntTagException,BerIntLengthExecption);
      |     ^~~~~
ber.h:141:5: error: ISO C++17 does not allow dynamic exception specifications
  141 |     throw(BerCounterTagException,BerCounterLengthExecption);
      |     ^~~~~
ber.h:153:5: error: ISO C++17 does not allow dynamic exception specifications
  153 |     throw(BerTimeTickTagException,BerTimeTickLengthExecption);
      |     ^~~~~
...
```

I've included a patch that pins the stardard g++ uses to C++11, which
deprecates and warns that instead of errors. If more help is needed, please let
me know.

Cheers,
Eric
--- a/debian/rules
+++ b/debian/rules
@@ -27,6 +27,8 @@
  INSTALL_PROGRAM += -s
 endif
 
+CXXFLAGS += -std=c++11
+
 export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 # FOR AUTOCONF 2.52 AND NEWER ONLY
@@ -67,7 +69,7 @@
        touch configure.in &&   touch aclocal.m4 &&    touch configure
        touch config.h.in  Makefile.in */Makefile.in
        #
-       ./configure  $(confflags) --prefix=/usr CFLAGS="$(CFLAGS)"
+       ./configure  $(confflags) --prefix=/usr CFLAGS="$(CFLAGS)" 
CXXFLAGS="$(CXXFLAGS)"
        # Add here commands to compile the package.
        $(MAKE)
 

Reply via email to