[Home]

Summary:ASTERISK-10903: Using Net-SNMP (RPM) to compile Asterisk with SNMP on CentOS 4 not possible.
Reporter:Martin Madsen (merlinthemagic)Labels:
Date Opened:2007-11-27 19:04:36.000-0600Date Closed:2011-06-07 14:03:06
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Resources/res_snmp
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Cant compile Asterisk on CentOS 4 using a RPM based Net-SNMP tried 5.1.2 and 5.4.3.

Configure dies with message:

checking for net-snmp-config... /usr/bin/net-snmp-config
checking for snmp_register_callback in -lnetsnmp... no
configure: ***
configure: *** The Net-SNMP installation on this system appears to be broken.
configure: *** Either correct the installation, or run configure
configure: *** including --without-netsnmp

A change to the configure file fixes the config issue.

Change line 21667 in the configure file.

NETSNMP_libs=`${NETSNMP_CONFIG} –agent-libs`

CHANGE to:

NETSNMP_libs=`${NETSNMP_CONFIG} –libs`

This will allow the configure to go through without issue, and compile asterisk.

But problems persist when starting asterisk:

Here is the output from running asterisk -vvvgcT

[Nov 27 16:31:51]   == Starting Agent

asterisk: symbol lookup error: /usr/lib/asterisk/modules/res_snmp.so: undefined symbol: init_agent

Compiling Net-SNMP from source works no problem.

Comments:By: Joshua C. Colp (jcolp) 2007-11-28 09:39:36.000-0600

This is a distro specific issue. Check the output of net-snmp-config --agent-libs and make sure all libraries mentioned are present. There was an issue previously where this was not true and they had to be installed separately. If I remember correctly it was on CentOS.