Bug 613719 - [Docs] build_apache_snmp.sh fails due to incorrect library name used for net-snmp to configure script
Summary: [Docs] build_apache_snmp.sh fails due to incorrect library name used for net-...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Documentation
Version: 1.3
Hardware: All
OS: Linux
urgent
medium
Target Milestone: ---
: ---
Assignee: Deon Ballard
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 567843
Blocks: 573738
TreeView+ depends on / blocked
 
Reported: 2010-07-12 16:40 UTC by Corey Welton
Modified: 2012-06-21 23:14 UTC (History)
5 users (show)

Fixed In Version:
Clone Of: 567843
Environment:
Last Closed: 2012-06-21 23:14:08 UTC
Embargoed:


Attachments (Terms of Use)

Description Corey Welton 2010-07-12 16:40:03 UTC
This bug was created to assure the docs note gets added.


+++ This bug was initially created as a clone of Bug #567843 +++

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.

--- Additional comment from loleary on 2010-02-25 22:01:28 EST ---

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?

--- Additional comment from hrupp on 2010-07-08 11:24:07 EDT ---

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)

--- Additional comment from hrupp on 2010-07-09 07:25:20 EDT ---

r10793 adds a switch for Solaris that defaults to the RHEL behaviour

--- Additional comment from cwelton on 2010-07-12 11:28:30 EDT ---

QA Verified - but we will need to assure that there is a docs bug, per comment #2, as well.

Comment 1 Deon Ballard 2010-07-21 22:49:29 UTC
I added a note to the Apache SNMP configuration section here:
http://elladeon.fedorapeople.org/jon-drafts/3.0/managed-resources/Managed_Servers.html#Apache_SNMP_Configuration

Comment 2 Heiko W. Rupp 2010-07-22 10:27:57 UTC
Ella,
this "switch"  ( To compile the SNMP connector on Solaris, first edit the SNMP 
switch in the build_apache_snmp.sh file so that the connector will compile 
properly on SNMP. The original flag is this: )
should no longer be needed with the current source.

This is what I meant with "r10793 adds a switch for Solaris that defaults to 
the RHEL behaviour" in an earlier comment

Comment 5 Mike Foley 2011-07-05 12:23:37 UTC
reviewed doc ....

Comment 6 Deon Ballard 2012-06-21 23:14:08 UTC
Closing.


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