[Pkg-cacti-maint] Bug#709015: cacti-spine: FTBFS with multiarch net-snmp

Colin Watson cjwatson at ubuntu.com
Mon May 20 10:40:18 UTC 2013


Package: cacti-spine
Version: 0.8.8a-1
Severity: serious
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch saucy

cacti-spine fails to build with the multiarch net-snmp in unstable as
follows:

  /bin/bash ./libtool --tag=CC   --mode=link i486-linux-gnu-gcc  -I/usr/include/net-snmp -I/usr/include/net-snmp/.. -I/usr/include/mysql -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security  -L -Wl,-z,relro -o spine sql.o spine.o util.o snmp.o locks.o poller.o nft_popen.o php.o ping.o keywords.o error.o  -lnetsnmp -lmysqlclient_r -lmysqlclient_r -lcrypto -lz -lpthread -lm
  libtool: link: require no space between `-L' and `-Wl,-z,relro'
  make[1]: *** [spine] Error 1

This is because configure fails to figure out SNMP_LIBDIR.  Since it's
unnecessary to pass an explicit -L flag for something already on the
system library path, the simplest fix is to do what's already done for
MYSQL_LIB_DIR above and just not bother if it's empty.

  * Don't add -L option for SNMP_LIBDIR if it's empty.

diff -Nru cacti-spine-0.8.8a/debian/patches/04-snmp-libdir.patch cacti-spine-0.8.8a/debian/patches/04-snmp-libdir.patch
--- cacti-spine-0.8.8a/debian/patches/04-snmp-libdir.patch	1970-01-01 01:00:00.000000000 +0100
+++ cacti-spine-0.8.8a/debian/patches/04-snmp-libdir.patch	2013-05-20 11:35:38.000000000 +0100
@@ -0,0 +1,20 @@
+Description: Don't add -L option for SNMP_LIBDIR if it's empty
+Author: Colin Watson <cjwatson at ubuntu.com>
+Forwarded: no
+Last-Update: 2013-05-20
+
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -303,7 +303,9 @@
+   fi
+ fi
+ 
+-LDFLAGS="-L$SNMP_LIBDIR $LDFLAGS"
++if test -n "$SNMP_LIBDIR"; then
++  LDFLAGS="-L$SNMP_LIBDIR $LDFLAGS"
++fi
+ CFLAGS="-I$SNMP_INCDIR -I$SNMP_INCDIR/.. $CFLAGS"
+ 
+ # Net/UCD-SNMP includes v3 support and insists on crypto unless compiled --without-openssl
diff -Nru cacti-spine-0.8.8a/debian/patches/series cacti-spine-0.8.8a/debian/patches/series
--- cacti-spine-0.8.8a/debian/patches/series	2012-06-25 18:05:24.000000000 +0100
+++ cacti-spine-0.8.8a/debian/patches/series	2013-05-20 11:33:51.000000000 +0100
@@ -1 +1,2 @@
 03-config-dir.patch
+04-snmp-libdir.patch

Thanks,

-- 
Colin Watson                                       [cjwatson at ubuntu.com]



More information about the Pkg-cacti-maint mailing list