Re: Error with --enable-snmp

Quentin Armitage <[email protected]> Thu, 23 Aug 2018 13:08:10 +0100
Newsgroups gmane.linux.keepalived.devel
Organization The Armitage family
Message-ID <[email protected]>
--===============3710639815990738186==
Content-Type: multipart/alternative; boundary="=-CUpgMfsZyBufYP48mGpk"


--=-CUpgMfsZyBufYP48mGpk
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit

Paul,
Can you provide the output of the following commands:net-snmp-config --
netsnmp-agent-libsnet-snmp-config --external-libsnet-snmp-config --
base-cflags
It looks as though the compiler is not liking the flags returned by
net-snmp-config --base-cflags (see configure.ac around line 1440).
I presume you are running on Debian. What version of Debian is it?
That's a rather old version of net-snmp you have. Is it possible to use
a more recent version?
Quentin Armitage
On Thu, 2018-08-23 at 12:37 +0100, Paul Gildea wrote:
> I already have net-snmp built on my system. So I tried the --enable-
> snmp option with keepalived and got the following error, anybody else
> had this issue?
> 
> 
> checking whether C compiler supports flag "-DNETSNMP_ENABLE_IPV6 -g
> -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-
> security -DNETSNMP_USE_INLINE -Ulinux -Dlinux=linux -D_REENTRANT
> -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector
> -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> -I/usr/lib/perl/5.14/CORE -D_FORTIFY_SOURCE=2 -I/usr/include
> -DNETSNMP_NO_INLINE -L/usr/lib -lnetsnmpagent -lnetsnmphelpers
> -lnetsnmpmibs -lnetsnmp -Wl,-Bsymbolic-functions -Wl,-z,relro" from
> Net-SNMP... noconfigure: error: *** incorrect CFLAGS from net-snmp-
> configmake: ***
> [/media/vmpart/vrrp/buildroot/output/build/keepalived-
> 2.0.5/.stamp_configured] Error 1
> 
> 
> 
> 
> 
> 
> Is it looking for all of those options and libraries, or is there
> some minimum CLFAGS options I can add? I have nothing like those in
> the netsnmp make file. I'm currently experimenting but getting the
> same error.
> 
> 
> 
> 
> 
> 
> #############################################################
> #
> # netsnmp
> #
> #############################################################
> 
> 
> NETSNMP_VERSION = 5.6.2
> NETSNMP_SITE =
> http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/net-
> snmp
> NETSNMP_SOURCE = net-snmp-$(NETSNMP_VERSION).tar.gz
> NETSNMP_INSTALL_STAGING = YES
> NETSNMP_CONF_ENV = ac_cv_NETSNMP_CAN_USE_SYSCTL=yes
> NETSNMP_CONF_OPT = --with-persistent-directory=/var/lib/snmp --
> disable-static \
> 		--with-defaults --enable-mini-agent --without-rpm \
> 		--with-logfile=none --without-kmem-usage
> $(DISABLE_IPV6) \
> 		--enable-as-needed --disable-debugging --without-perl-
> modules \
> 		--disable-embedded-perl --disable-perl-cc-checks \
> 		--disable-scripts --with-default-snmp-version="1" \
> 		--enable-silent-libtool --enable-mfd-rewrites \
> 		--with-sys-contact="root@localhost" \
> 		--with-sys-location="Unknown" \
> 		--with-mib-modules="default_modules agent_mibs
> notification target utilities disman/event disman/schedule agentx
> util_funcs mibII/system_mib snmpv3mibs ucd_snmp smux"
> #--with-out-mib-modules="default_modules mibII agent_mibs
> notification target utilities disman/event disman/schedule host" \
> 		--with-mib-modules="agentx util_funcs mibII/system_mib
> snmpv3mibs ucd_snmp"
> #util_funcs/Exit util_funcs/restart
> #		--with-mib-modules="host ucd-snmp/dlmod disman/event
> disman/schedule utilities agentx smux" 
> NETSNMP_BLOAT_MIBS = BRIDGE EtherLike RFC-1215 RFC1155-SMI RFC1213
> SCTP SMUX
> 
> 
> ifeq ($(BR2_ENDIAN),"BIG")
> 	NETSNMP_CONF_OPT += --with-endianness=big
> else
> 	NETSNMP_CONF_OPT += --with-endianness=little
> endif
> 
> 
> # OpenSSL
> ifeq ($(BR2_PACKAGE_OPENSSL),y)
> 	NETSNMP_DEPENDENCIES += openssl
> 	NETSNMP_CONF_OPT += \
> 		--with-openssl=$(STAGING_DIR)/usr/include/openssl
> else
> 	NETSNMP_CONF_OPT += --without-openssl
> endif
> 
> 
> # Docs
> ifneq ($(BR2_HAVE_DOCUMENTATION),y)
> 	NETSNMP_CONF_OPT += --disable-manuals
> endif
> 
> 
> # Remove IPv6 MIBs if there's no IPv6
> ifneq ($(BR2_INET_IPV6),y)
> define NETSNMP_REMOVE_MIBS_IPV6
> 	rm -f $(TARGET_DIR)/usr/share/snmp/mibs/IPV6*
> endef
> endif
> 
> 
> define NETSNMP_INSTALL_TARGET_CMDS
> 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
> 		DESTDIR=$(TARGET_DIR) install
> 	$(INSTALL) -D -m 0755 package/netsnmp/S59snmpd \
> 		$(TARGET_DIR)/etc/init.d/S59snmpd
> 	for mib in $(NETSNMP_BLOAT_MIBS); do \
> 		rm -f $(TARGET_DIR)/usr/share/snmp/mibs/$$mib-MIB.txt;
> \
> 	done
> 	$(NETSNMP_REMOVE_MIBS_IPV6)
> endef
> 
> 
> define NETSNMP_UNINSTALL_TARGET_CMDS
> 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
> 		DESTDIR=$(TARGET_DIR) uninstall
> 	rm -f $(TARGET_DIR)/etc/init.d/S59snmpd
> 	rm -f $(TARGET_DIR)/usr/lib/libnetsnmp*
> endef
> 
> 
> define NETSNMP_STAGING_NETSNMP_CONFIG_FIXUP
> 	$(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" \
> 		-e
> "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" \
> 		-e
> "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include\',g" \
> 		-e "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \
> 		$(STAGING_DIR)/usr/bin/net-snmp-config
> endef
> 
> 
> NETSNMP_POST_INSTALL_STAGING_HOOKS +=
> NETSNMP_STAGING_NETSNMP_CONFIG_FIXUP
> 
> 
> $(eval $(call AUTOTARGETS,package,netsnmp))
> 
> 
--=-CUpgMfsZyBufYP48mGpk
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<html><head></head><body bgcolor=3D"#ffffff" text=3D"#2e3436" link=3D"#2a76=
c6" vlink=3D"#2e3436"><div>Paul,</div><div><br></div><div>Can you provide t=
he output of the following commands:</div><div>net-snmp-config --netsnmp-ag=
ent-libs</div><div>net-snmp-config --external-libs</div><div>net-snmp-confi=
g --base-cflags</div><div><br></div><div>It looks as though the compiler is=
 not liking the flags returned by net-snmp-config --base-cflags (see config=
ure.ac around line 1440).</div><div><br></div><div>I presume you are runnin=
g on Debian. What version of Debian is it?</div><div><br></div><div>That's =
a rather old version of net-snmp you have. Is it possible to use a more rec=
ent version?</div><div><br></div><div>Quentin Armitage</div><div><br></div>=
<div>On Thu, 2018-08-23 at 12:37 +0100, Paul Gildea wrote:</div><blockquote=
 type=3D"cite" style=3D"margin:0 0 0 .8ex; border-left:2px #729fcf solid;pa=
dding-left:1ex"><div dir=3D"ltr">I already have net-snmp built on my system=
. So I tried the --enable-snmp option with keepalived and got the following=
 error, anybody else had this issue?<div><br></div><div><br></div><div><br>=
</div><div><font color=3D"#000000" face=3D"monospace, monospace"><span styl=
e=3D"font-size:12.8px">checking whether C compiler supports flag "-DNETSNMP=
_ENABLE_IPV6 -g -O2 -fstack-protector --param=3Dssp-buffer-size=3D4 -Wforma=
t -Wformat-security -DNETSNMP_USE_INLINE -Ulinux -Dlinux=3Dlinux -D_REENTRA=
NT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/u=
sr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 -I/usr/lib/pe=
rl/5.14/CORE -D_FORTIFY_SOURCE=3D2 -I/usr/include -DNETSNMP_NO_INLINE -L/us=
r/lib -lnetsnmpagent -lnetsnmphelpers -lnetsnmpmibs -lnetsnmp -Wl,-Bsymboli=
c-functions -Wl,-z,relro" from Net-SNMP... no</span></font><table cellpaddi=
ng=3D"0" class=3D"gmail-ajC"></table><font color=3D"#000000" face=3D"monosp=
ace, monospace"><span style=3D"font-size:12.8px">configure: error: *** inco=
rrect CFLAGS from net-snmp-config</span></font><table cellpadding=3D"0" cla=
ss=3D"gmail-ajC"></table><font color=3D"#000000" face=3D"monospace, monospa=
ce"><span style=3D"font-size:12.8px">make: *** [/media/vmpart/vrrp/buildroo=
t/output/build/keepalived-2.0.5/.stamp_configured] Error 1</span></font></d=
iv><div><font color=3D"#000000" face=3D"monospace, monospace"><span style=
=3D"font-size:12.8px"><br></span></font></div><div><font color=3D"#000000" =
face=3D"monospace, monospace"><span style=3D"font-size:12.8px"><br></span><=
/font></div><div><font color=3D"#000000" face=3D"monospace, monospace"><spa=
n style=3D"font-size:12.8px"><br></span></font></div><div><font color=3D"#0=
00000" face=3D"arial, helvetica, sans-serif"><span style=3D"font-size:12.8p=
x">Is it looking for all&nbsp;of those options and libraries, or is there s=
ome minimum CLFAGS options I can add? I have nothing like those in the nets=
nmp make file. I'm currently experimenting but getting the same error.</spa=
n></font></div><div><font color=3D"#000000"><span style=3D"font-size:12.8px=
"><font face=3D"monospace, monospace"><br></font></span></font></div><div><=
font color=3D"#000000"><span style=3D"font-size:12.8px"><font face=3D"monos=
pace, monospace"><br></font></span></font></div><div><font color=3D"#000000=
"><span style=3D"font-size:12.8px"><font face=3D"monospace, monospace"><br>=
</font></span></font></div><div><font color=3D"#000000"><font face=3D"monos=
pace, monospace"><div><span style=3D"font-size:12.8px">####################=
#########################################</span></div><div><span style=3D"f=
ont-size:12.8px">#</span></div><div><span style=3D"font-size:12.8px"># nets=
nmp</span></div><div><span style=3D"font-size:12.8px">#</span></div><div><s=
pan style=3D"font-size:12.8px">############################################=
#################</span></div><div><span style=3D"font-size:12.8px"><br></s=
pan></div><div><span style=3D"font-size:12.8px">NETSNMP_VERSION =3D 5.6.2</=
span></div><div><span style=3D"font-size:12.8px">NETSNMP_SITE =3D http://$(=
BR2_SOURCEFORGE_MIRROR).<a href=3D"http://dl.sourceforge.net/sourceforge/ne=
t-snmp">dl.sourceforge.net/sourceforge/net-snmp</a></span></div><div><span =
style=3D"font-size:12.8px">NETSNMP_SOURCE =3D net-snmp-$(NETSNMP_VERSION).t=
ar.gz</span></div><div><span style=3D"font-size:12.8px">NETSNMP_INSTALL_STA=
GING =3D YES</span></div><div><span style=3D"font-size:12.8px">NETSNMP_CONF=
_ENV =3D ac_cv_NETSNMP_CAN_USE_SYSCTL=3Dyes</span></div><div><span style=3D=
"font-size:12.8px">NETSNMP_CONF_OPT =3D --with-persistent-directory=3D/var/=
lib/snmp --disable-static \</span></div><div><span style=3D"font-size:12.8p=
x"><span style=3D"white-space:pre">		</span>--with-defaults --enable-mini-a=
gent --without-rpm \</span></div><div><span style=3D"font-size:12.8px"><spa=
n style=3D"white-space:pre">		</span>--with-logfile=3Dnone --without-kmem-u=
sage $(DISABLE_IPV6) \</span></div><div><span style=3D"font-size:12.8px"><s=
pan style=3D"white-space:pre">		</span>--enable-as-needed --disable-debuggi=
ng --without-perl-modules \</span></div><div><span style=3D"font-size:12.8p=
x"><span style=3D"white-space:pre">		</span>--disable-embedded-perl --disab=
le-perl-cc-checks \</span></div><div><span style=3D"font-size:12.8px"><span=
 style=3D"white-space:pre">		</span>--disable-scripts --with-default-snmp-v=
ersion=3D"1" \</span></div><div><span style=3D"font-size:12.8px"><span styl=
e=3D"white-space:pre">		</span>--enable-silent-libtool --enable-mfd-rewrite=
s \</span></div><div><span style=3D"font-size:12.8px"><span style=3D"white-=
space:pre">		</span>--with-sys-contact=3D"root@localhost" \</span></div><di=
v><span style=3D"font-size:12.8px"><span style=3D"white-space:pre">		</span=
>--with-sys-location=3D"Unknown" \</span></div><div><span style=3D"font-siz=
e:12.8px"><span style=3D"white-space:pre">		</span>--with-mib-modules=3D"de=
fault_modules agent_mibs notification target utilities disman/event disman/=
schedule agentx util_funcs mibII/system_mib snmpv3mibs ucd_snmp smux"</span=
></div><div><span style=3D"font-size:12.8px">#--with-out-mib-modules=3D"def=
ault_modules mibII agent_mibs notification target utilities disman/event di=
sman/schedule host" \</span></div><div><span style=3D"font-size:12.8px"><sp=
an style=3D"white-space:pre">		</span>--with-mib-modules=3D"agentx util_fun=
cs mibII/system_mib snmpv3mibs ucd_snmp"</span></div><div><span style=3D"fo=
nt-size:12.8px">#util_funcs/Exit util_funcs/restart</span></div><div><span =
style=3D"font-size:12.8px">#<span style=3D"white-space:pre">		</span>--with=
-mib-modules=3D"host ucd-snmp/dlmod disman/event disman/schedule utilities =
agentx smux"&nbsp;</span></div><div><span style=3D"font-size:12.8px">NETSNM=
P_BLOAT_MIBS =3D BRIDGE EtherLike RFC-1215 RFC1155-SMI RFC1213 SCTP SMUX</s=
pan></div><div><span style=3D"font-size:12.8px"><br></span></div><div><span=
 style=3D"font-size:12.8px">ifeq ($(BR2_ENDIAN),"BIG")</span></div><div><sp=
an style=3D"font-size:12.8px"><span style=3D"white-space:pre">	</span>NETSN=
MP_CONF_OPT +=3D --with-endianness=3Dbig</span></div><div><span style=3D"fo=
nt-size:12.8px">else</span></div><div><span style=3D"font-size:12.8px"><spa=
n style=3D"white-space:pre">	</span>NETSNMP_CONF_OPT +=3D --with-endianness=
=3Dlittle</span></div><div><span style=3D"font-size:12.8px">endif</span></d=
iv><div><span style=3D"font-size:12.8px"><br></span></div><div><span style=
=3D"font-size:12.8px"># OpenSSL</span></div><div><span style=3D"font-size:1=
2.8px">ifeq ($(BR2_PACKAGE_OPENSSL),y)</span></div><div><span style=3D"font=
-size:12.8px"><span style=3D"white-space:pre">	</span>NETSNMP_DEPENDENCIES =
+=3D openssl</span></div><div><span style=3D"font-size:12.8px"><span style=
=3D"white-space:pre">	</span>NETSNMP_CONF_OPT +=3D \</span></div><div><span=
 style=3D"font-size:12.8px"><span style=3D"white-space:pre">		</span>--with=
-openssl=3D$(STAGING_DIR)/usr/include/openssl</span></div><div><span style=
=3D"font-size:12.8px">else</span></div><div><span style=3D"font-size:12.8px=
"><span style=3D"white-space:pre">	</span>NETSNMP_CONF_OPT +=3D --without-o=
penssl</span></div><div><span style=3D"font-size:12.8px">endif</span></div>=
<div><span style=3D"font-size:12.8px"><br></span></div><div><span style=3D"=
font-size:12.8px"># Docs</span></div><div><span style=3D"font-size:12.8px">=
ifneq ($(BR2_HAVE_DOCUMENTATION),y)</span></div><div><span style=3D"font-si=
ze:12.8px"><span style=3D"white-space:pre">	</span>NETSNMP_CONF_OPT +=3D --=
disable-manuals</span></div><div><span style=3D"font-size:12.8px">endif</sp=
an></div><div><span style=3D"font-size:12.8px"><br></span></div><div><span =
style=3D"font-size:12.8px"># Remove IPv6 MIBs if there's no IPv6</span></di=
v><div><span style=3D"font-size:12.8px">ifneq ($(BR2_INET_IPV6),y)</span></=
div><div><span style=3D"font-size:12.8px">define NETSNMP_REMOVE_MIBS_IPV6</=
span></div><div><span style=3D"font-size:12.8px"><span style=3D"white-space=
:pre">	</span>rm -f $(TARGET_DIR)/usr/share/snmp/mibs/IPV6*</span></div><di=
v><span style=3D"font-size:12.8px">endef</span></div><div><span style=3D"fo=
nt-size:12.8px">endif</span></div><div><span style=3D"font-size:12.8px"><br=
></span></div><div><span style=3D"font-size:12.8px">define NETSNMP_INSTALL_=
TARGET_CMDS</span></div><div><span style=3D"font-size:12.8px"><span style=
=3D"white-space:pre">	</span>$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \</span></=
div><div><span style=3D"font-size:12.8px"><span style=3D"white-space:pre">	=
	</span>DESTDIR=3D$(TARGET_DIR) install</span></div><div><span style=3D"fon=
t-size:12.8px"><span style=3D"white-space:pre">	</span>$(INSTALL) -D -m 075=
5 package/netsnmp/S59snmpd \</span></div><div><span style=3D"font-size:12.8=
px"><span style=3D"white-space:pre">		</span>$(TARGET_DIR)/etc/init.d/S59sn=
mpd</span></div><div><span style=3D"font-size:12.8px"><span style=3D"white-=
space:pre">	</span>for mib in $(NETSNMP_BLOAT_MIBS); do \</span></div><div>=
<span style=3D"font-size:12.8px"><span style=3D"white-space:pre">		</span>r=
m -f $(TARGET_DIR)/usr/share/snmp/mibs/$$mib-MIB.txt; \</span></div><div><s=
pan style=3D"font-size:12.8px"><span style=3D"white-space:pre">	</span>done=
</span></div><div><span style=3D"font-size:12.8px"><span style=3D"white-spa=
ce:pre">	</span>$(NETSNMP_REMOVE_MIBS_IPV6)</span></div><div><span style=3D=
"font-size:12.8px">endef</span></div><div><span style=3D"font-size:12.8px">=
<br></span></div><div><span style=3D"font-size:12.8px">define NETSNMP_UNINS=
TALL_TARGET_CMDS</span></div><div><span style=3D"font-size:12.8px"><span st=
yle=3D"white-space:pre">	</span>$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \</span=
></div><div><span style=3D"font-size:12.8px"><span style=3D"white-space:pre=
">		</span>DESTDIR=3D$(TARGET_DIR) uninstall</span></div><div><span style=
=3D"font-size:12.8px"><span style=3D"white-space:pre">	</span>rm -f $(TARGE=
T_DIR)/etc/init.d/S59snmpd</span></div><div><span style=3D"font-size:12.8px=
"><span style=3D"white-space:pre">	</span>rm -f $(TARGET_DIR)/usr/lib/libne=
tsnmp*</span></div><div><span style=3D"font-size:12.8px">endef</span></div>=
<div><span style=3D"font-size:12.8px"><br></span></div><div><span style=3D"=
font-size:12.8px">define NETSNMP_STAGING_NETSNMP_CONFIG_FIXUP</span></div><=
div><span style=3D"font-size:12.8px"><span style=3D"white-space:pre">	</spa=
n>$(SED) "s,^prefix=3D.*,prefix=3D\'$(STAGING_DIR)/usr\',g" \</span></div><=
div><span style=3D"font-size:12.8px"><span style=3D"white-space:pre">		</sp=
an>-e "s,^exec_prefix=3D.*,exec_prefix=3D\'$(STAGING_DIR)/usr\',g" \</span>=
</div><div><span style=3D"font-size:12.8px"><span style=3D"white-space:pre"=
>		</span>-e "s,^includedir=3D.*,includedir=3D\'$(STAGING_DIR)/usr/include\=
',g" \</span></div><div><span style=3D"font-size:12.8px"><span style=3D"whi=
te-space:pre">		</span>-e "s,^libdir=3D.*,libdir=3D\'$(STAGING_DIR)/usr/lib=
\',g" \</span></div><div><span style=3D"font-size:12.8px"><span style=3D"wh=
ite-space:pre">		</span>$(STAGING_DIR)/usr/bin/net-snmp-config</span></div>=
<div><span style=3D"font-size:12.8px">endef</span></div><div><span style=3D=
"font-size:12.8px"><br></span></div><div><span style=3D"font-size:12.8px">N=
ETSNMP_POST_INSTALL_STAGING_HOOKS +=3D NETSNMP_STAGING_NETSNMP_CONFIG_FIXUP=
</span></div><div><span style=3D"font-size:12.8px"><br></span></div><div><s=
pan style=3D"font-size:12.8px">$(eval $(call AUTOTARGETS,package,netsnmp))<=
/span></div></font></font><table cellpadding=3D"0" class=3D"gmail-ajC"></ta=
ble></div></div>
<pre></pre><pre>
</pre></blockquote></body></html>
--=-CUpgMfsZyBufYP48mGpk--



--===============3710639815990738186==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
--===============3710639815990738186==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel

--===============3710639815990738186==--