Bug 567843

Summary: build_apache_snmp.sh fails due to incorrect library name used for net-snmp to configure script
Product: [Other] RHQ Project Reporter: Larry O'Leary <loleary>
Component: No ComponentAssignee: Heiko W. Rupp <hrupp>
Status: CLOSED CURRENTRELEASE QA Contact: Corey Welton <cwelton>
Severity: medium Docs Contact:
Priority: urgent    
Version: 1.3CC: cwelton, dsteigne, hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 613719 (view as bug list) Environment:
Last Closed: 2010-08-12 16:52:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 593121, 613719    

Description Larry O'Leary 2010-02-24 04:36:20 UTC
Description of problem:
build_apache_snmp.sh fails due to the netsnmp configuration files not being found in their expected home due.

...
/usr/lib/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I/usr/include/httpd  -I/usr/include/apr-1   -I/usr/include/apr-1  -shared -I. -I. -I/root/tmp/apache-snmp/sources/snmp_common/sdbm -I/usr/include/httpd -I/usr/include/apr-1 -DUSING_MIBII_SYSORTABLE_MODULE  -c -o snmpcommon/dummy-config.lo snmpcommon/dummy-config.c && touch snmpcommon/dummy-config.slo
snmpcommon/dummy-config.c:14:29: error: ucd-snmp-config.h: No such file or directory
snmpcommon/dummy-config.c:15:18: error: asn1.h: No such file or directory
snmpcommon/dummy-config.c:16:24: error: snmp_debug.h: No such file or directory
snmpcommon/dummy-config.c:17:27: error: default_store.h: No such file or directory
snmpcommon/dummy-config.c:18:22: error: ds_agent.h: No such file or directory
snmpcommon/dummy-config.c:19:26: error: snmp_logging.h: No such file or directory
snmpcommon/dummy-config.c:20:31: error: mib_module_config.h: No such file or directory
snmpcommon/dummy-config.c:21:25: error: read_config.h: No such file or directory
snmpcommon/dummy-config.c:22:31: error: agent_read_config.h: No such file or directory
snmpcommon/dummy-config.c: In function 'init_agentx_dummy_config':
snmpcommon/dummy-config.c:38: warning: implicit declaration of function 'snmpd_register_config_handler'
apxs:Error: Command failed with rc=65536
.
make[1]: *** [libsnmpcommon.so] Error 1
make[1]: Leaving directory `/root/tmp/apache-snmp/sources/snmp2.0/src'
make: *** [all] Error 2


Version-Release number of selected component (if applicable):
This was seen with the Apache SNMP Connector provided by JON 2.3 (RHQ 1.3)

How reproducible:
Always on Fedora 11 and RHEL 5.4


Steps to Reproduce:
1. Extract connector-apache.zip from JON 2.3 server
2. Install required packages: yum -y gcc libtool automake httpd-devel
3. cd apache-snmp/sources
4. ./build_apache.snmp.sh 2.2 /usr/sbin/apxs
  
Actual results:

Output to console of:

...
building Apache module
Build failed. Please email /tmp/apache-snmp/sources/2.2_log to support


2.2_log excerpt:

/usr/lib/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I/usr/include/httpd  -I/usr/include/apr-1   -I/usr/include/apr-1  -shared -I. -I. -I/tmp/apache-snmp/sources/snmp_common/sdbm -I/usr/include/httpd -I/usr/include/apr-1 -DUSING_MIBII_SYSORTABLE_MODULE  -c -o snmpcommon/dummy-config.lo snmpcommon/dummy-config.c && touch snmpcommon/dummy-config.slo
snmpcommon/dummy-config.c:14:29: error: ucd-snmp-config.h: No such file or directory
snmpcommon/dummy-config.c:15:18: error: asn1.h: No such file or directory
snmpcommon/dummy-config.c:16:24: error: snmp_debug.h: No such file or directory
snmpcommon/dummy-config.c:17:27: error: default_store.h: No such file or directory
snmpcommon/dummy-config.c:18:22: error: ds_agent.h: No such file or directory
snmpcommon/dummy-config.c:19:26: error: snmp_logging.h: No such file or directory
snmpcommon/dummy-config.c:20:31: error: mib_module_config.h: No such file or directory
snmpcommon/dummy-config.c:21:25: error: read_config.h: No such file or directory
snmpcommon/dummy-config.c:22:31: error: agent_read_config.h: No such file or directory
snmpcommon/dummy-config.c: In function 'init_agentx_dummy_config':
snmpcommon/dummy-config.c:38: warning: implicit declaration of function 'snmpd_register_config_handler'
apxs:Error: Command failed with rc=65536
.
make[1]: *** [libsnmpcommon.so] Error 1
make[1]: Leaving directory `/tmp/apache-snmp/sources/snmp2.0/src'
make: *** [all] Error 2


Expected results:

Build should have been successful

Additional info:

I have tested this on Fedora 11 and if I update the build_apache_snmp.sh script to use --with-netsnmp instead of --with-net-snmp all is fine.  I am not certain if there are two versions of the configure scripts floating around in the 2.3 release because it appears that 535264 seems to indicate that it should be --with-net-snmp but as I stated, this isn't correct for my installation and source from JON 2.3.

Comment 1 Larry O'Leary 2010-02-26 03:01:28 UTC
This issue also appears in RHEL 5.4.  Changing --with-net-snmp to --with-netsnmp also resolved the issue.  I am not sure why https://bugzilla.redhat.com/show_bug.cgi?id=535264 indicates that it should have been changed from --with-netsnmp to --with-net-snmp unless there are two different versions of the scripts/packages in play or it only applied to Solaris?

Comment 2 Heiko W. Rupp 2010-07-08 15:24:07 UTC
It looks like --with-netsnmp solves the issue on RHEL, so we will revert to this and add documentation that Solaris seems to need --with-net-snmp (which seems odd)

Comment 3 Heiko W. Rupp 2010-07-09 11:25:20 UTC
r10793 adds a switch for Solaris that defaults to the RHEL behaviour

Comment 4 Corey Welton 2010-07-12 15:28:30 UTC
QA Verified - but we will need to assure that there is a docs bug, per comment #2, as well.

Comment 5 Corey Welton 2010-08-12 16:52:29 UTC
Mass-closure of verified bugs against JON.