Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building a Debian package with SNMP enabled fails. #420

Closed
lairsdragon opened this issue Apr 27, 2017 · 2 comments
Closed

Building a Debian package with SNMP enabled fails. #420

lairsdragon opened this issue Apr 27, 2017 · 2 comments
Milestone

Comments

@lairsdragon
Copy link

Hi

I trying to build a frr debian package with SNMP but the build fails with:

vagrant@jessie:~/frr$ export WANT_SNMP=1
vagrant@jessie:~/frr$ dpkg-buildpackage |  tee /tmp/dpkg-buildpackage.log
[...]
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -DSYSCONFDIR=\"/etc/frr/\" -I. -I..  -I.. -I.. -I../lib -I../lib    -Werror -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g -O2 -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.20/CORE -D_FORTIFY_SOURCE=2 -I/usr/include -g -Os -fno-omit-frame-pointer -Wall -Wextra -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -MT bgpd_snmp_la-bgp_snmp.lo -MD -MP -MF .deps/bgpd_snmp_la-bgp_snmp.Tpo -c -o bgpd_snmp_la-bgp_snmp.lo `test -f 'bgp_snmp.c' || echo './'`bgp_snmp.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -DSYSCONFDIR=\"/etc/frr/\" -I. -I.. -I.. -I.. -I../lib -I../lib -Werror -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g -O2 -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.20/CORE -D_FORTIFY_SOURCE=2 -I/usr/include -g -Os -fno-omit-frame-pointer -Wall -Wextra -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -MT bgpd_snmp_la-bgp_snmp.lo -MD -MP -MF .deps/bgpd_snmp_la-bgp_snmp.Tpo -c bgp_snmp.c  -fPIC -DPIC -o .libs/bgpd_snmp_la-bgp_snmp.o
In file included from ../defaults.h:24:0,
                 from ../bgpd/bgpd.h:34,
                 from bgp_snmp.c:37:
../config.h:214:0: error: "HAVE_POLL" redefined [-Werror]
 #define HAVE_POLL /**/
 ^
In file included from bgp_snmp.c:23:0:
/usr/include/net-snmp/net-snmp-config.h:622:0: note: this is the location of the previous definition
 #define HAVE_POLL 1
 ^
cc1: all warnings being treated as errors
Makefile:905: recipe for target 'bgpd_snmp_la-bgp_snmp.lo' failed
make[2]: *** [bgpd_snmp_la-bgp_snmp.lo] Error 1
make[2]: Leaving directory '/home/vagrant/frr/bgpd'
Makefile:483: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/vagrant/frr'
Makefile:412: recipe for target 'all' failed
make: *** [all] Error 2

A manual build with configure --enable-snmp=agentx does now show the behaviour.

BTW: in the Build dependencies pkg-config is missing.

cheeiro
Steve

@donaldsharp donaldsharp added this to the 3.0 milestone May 2, 2017
@hwchiu
Copy link
Contributor

hwchiu commented May 3, 2017

If we configure the --enable-systemd, frr will define the HAVE_POLL on its config.h and it's conflict with net-snmp-config.h.

@donaldsharp
Copy link
Member

This has been fixed in master with the removal of select and switch over to HAVE_POLL in commit pr #633 as well as some earlier fixes as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants