Control: tags -1 patch On Sun, 06 Aug 2017 21:28:19 +0300 Adrian Bunk <b...@debian.org> wrote: > ... > x86_64-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time > -D_FORTIFY_SOURCE=2 -I.. -I/usr/include/pcap -I/usr/include/sasl > -I/usr/include -DETCDIR=\"/etc/avenger\" -DLIBEXEC=\"/usr/lib/mailavenger\" > -DBINDIR=\"/usr/bin\" -DEXECDIR=LIBEXEC > -DDATADIR=\"/usr/share/doc/mailavenger\" -DPIDDIR=\"/var/run\" -I../libasync > -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall > -Werror -MT study.o -MD -MP -MF .deps/study.Tpo -c -o study.o study.c > study.c: In function 'set_start_bits': > study.c:329:35: error: '<<' in boolean context, did you mean '<' ? > [-Werror=int-in-bool-context] > if ((tcode[c/8] && (1 << (c&7))) != 0) > ~~~^~~~~~~~~ > cc1: all warnings being treated as errors > Makefile:515: recipe for target 'study.o' failed > make[3]: *** [study.o] Error 1
Adding -Wno-error=int-in-bool-context lets the build further, until... x86_64-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -I.. -I/usr/include/pcap -I/usr/include/sasl -I/usr/include -DETCDIR=\"/etc/avenger\" -DLIBEXEC=\"/usr/lib/mailavenger\" -DBINDIR=\"/usr/bin\" -DEXECDIR=LIBEXEC -DDATADIR=\"/usr/share/doc/mailavenger\" -DPIDDIR=\"/var/run\" -I../libasync -g -O2 -fdebug-prefix-map=/build/mailavenger-0.8.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Werror -MT malloc.o -MD -MP -MF .deps/malloc.Tpo -c -o malloc.o malloc.C malloc.C:150:28: error: dynamic exception specifications are deprecated in C++11 [-Werror=deprecated] operator new (size_t size) throw (bad_alloc) ^~~~~ malloc.C:182:30: error: dynamic exception specifications are deprecated in C++11 [-Werror=deprecated] operator new[] (size_t size) throw (bad_alloc) ^~~~~ For that, I suggest -std=gnu++98. Patch is attached. By the way, that study.c from PCRE seems to be commonly copied around. https://codesearch.debian.net/search?q=%5CQ%281+%3C%3C+%28c%267%29%29%29+%21%3D+0%5CE+path%3Astudy.c&perpkg=1 Regards Juhani
diff -Nru mailavenger-0.8.4/debian/rules mailavenger-0.8.4/debian/rules --- mailavenger-0.8.4/debian/rules 2017-03-15 12:18:11.000000000 +0200 +++ mailavenger-0.8.4/debian/rules 2017-12-12 18:42:15.000000000 +0200 @@ -8,6 +8,9 @@ # Required for Multiarch support (20120124, ref #621440, #634553, #647247) DEB_MULTIARCH_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_MULTIARCH) +DEB_CFLAGS_MAINT_APPEND = -Wno-error=int-in-bool-context +DEB_CXXFLAGS_MAINT_APPEND = -std=gnu++98 + export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk