Bug 567843 - build_apache_snmp.sh fails due to incorrect library name used for net-snmp to configure script
Summary: build_apache_snmp.sh fails due to incorrect library name used for net-snmp to...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: No Component
Version: 1.3
Hardware: All
OS: Linux
urgent
medium
Target Milestone: ---
: ---
Assignee: Heiko W. Rupp
QA Contact: Corey Welton
URL:
Whiteboard:
Depends On:
Blocks: jon-sprint11-bugs 613719
TreeView+ depends on / blocked
 
Reported: 2010-02-24 04:36 UTC by Larry O'Leary
Modified: 2018-10-27 16:11 UTC (History)
3 users (show)

Fixed In Version: 2.4
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 613719 (view as bug list)
Environment:
Last Closed: 2010-08-12 16:52:29 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 535264 medium CLOSED build_apache_snmp.sh script fails under Solaris 10 2020-10-14 00:28:05 UTC
Red Hat Bugzilla 591378 high CLOSED build_apache_snmp.sh fails with cannot run /bin/sh ./config.sub 2020-10-14 00:28:05 UTC

Internal Links: 535264 591378

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.


Note You need to log in before you can comment on or make changes to this bug.