On Fri, Aug 04, 2017 at 06:13:48PM +0300, Adrian Bunk wrote: > Source: openhpi > Version: 3.6.1-2.2 > Severity: serious > Tags: patch > > It is bad luck, but with 10 release architectures it is > actually not that unlikely to sometimes hit this problem: > > https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/openhpi.html > > ... > Making all in snmp > make[3]: Entering directory '/build/1st/openhpi-3.6.1/snmp' > /bin/bash ../libtool --tag=CC --mode=compile x86_64-linux-gnu-gcc > -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"snmp\" -I../include -I../utils > -I../utils -I../clients -Wdate-time -D_FORTIFY_SOURCE=2 -DNETSNMP_ENABLE_IPV6 > -fno-strict-aliasing -g -fdebug-prefix-map=/build/net-snmp > -fstack-protector-strong -Wformat -Werror=format-security > -DNETSNMP_USE_INLINE -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE > -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include > -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 > -I/usr/lib/x86_64-linux-gnu/perl/5.26/CORE -Wdate-time -D_FORTIFY_SOURCE=2 > -I. -I/usr/include -g -O2 -I/usr/include/glib-2.0 > -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wall > -Wmissing-prototypes -Wmissing-declarations > -Wstrict-prototypes -Wpointer-arith -Wformat=2 > -Wformat-security -Wformat-nonliteral -Wno-format-y2k > -Wcast-qual -Wcast-align -Wno-strict-aliasing > -fno-strict-alias > ing -Wno-unused-value -D_GNU_SOURCE -D_REENTRANT -fexceptions -MT > snmp_utils.lo -MD -MP -MF .deps/snmp_utils.Tpo -c -o snmp_utils.lo > snmp_utils.c > libtool: compile: x86_64-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. > -DG_LOG_DOMAIN=\"snmp\" -I../include -I../utils -I../utils -I../clients > -Wdate-time -D_FORTIFY_SOURCE=2 -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g > -fdebug-prefix-map=/build/net-snmp -fstack-protector-strong -Wformat > -Werror=format-security -DNETSNMP_USE_INLINE -Ulinux -Dlinux=linux > -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe > -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 > -I/usr/lib/x86_64-linux-gnu/perl/5.26/CORE -Wdate-time -D_FORTIFY_SOURCE=2 > -I. -I/usr/include -g -O2 -I/usr/include/glib-2.0 > -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wall -Wmissing-prototypes > -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wformat=2 > -Wformat-security -Wformat-nonliteral -Wno-format-y2k -Wcast-qual > -Wcast-align -Wno-strict-aliasing -fno-strict-aliasing -Wno-unused-value > -D_GNU_SOURCE -D_REENTRANT -fexceptions -MT snmp_utils.lo -MD -MP -MF > .deps/snmp_utils.Tpo -c snmp_utils.c > -fPIC -DPIC -o .libs/snmp_utils.o > cc1: error: invalid argument '/build/net-snmp' to -fdebug-prefix-map > Makefile:497: recipe for target 'snmp_utils.lo' failed > make[3]: *** [snmp_utils.lo] Error 1 > > > The root cause is that net-snmp shouldn't expose these flags in > "net-snmp-config --cflags", I'll submit a separate bug against > net-snmp.
The patch is attached. cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed
Description: Fix FTBFS when caused by truncated -fdebug-prefix-map Due to bad luck regarding the random part of the build directory on the Debian buildds, "net-snmp-config --cflags" on amd64 currently contains -O2 -fdebug-prefix-map=/build/net-snmp-OeyA43/net-snmp-5.7.3+dfsg=. . Fix the SNMPFLAGS regex to not truncate -fdebug-prefix-map Author: Adrian Bunk <b...@debian.org> --- openhpi-3.6.1.orig/acinclude.m4 +++ openhpi-3.6.1/acinclude.m4 @@ -160,7 +160,7 @@ AC_DEFUN([OH_CHECK_NETSNMP], ], [ have_netsnmp=yes - SNMPFLAGS=`${net_snmp_config:-net-snmp-config} --cflags | perl -p -e 's/-O\S*//g'` + SNMPFLAGS=`${net_snmp_config:-net-snmp-config} --cflags | perl -p -e 's/ -O\S*//g'` SNMPLIBS=`${net_snmp_config:-net-snmp-config} --libs` AC_MSG_RESULT(yes) ],