[Nagiosplug-help] Re: Problems compiling snmppd for use with nagios

Gerard Delmás Camacho gdelmas at uoc.edu
Thu Apr 10 01:56:06 CEST 2003


Hi,

I'm having exactly the same problem as Anders K. Hanssen.

I was willing to compile snmpd (snmppd-0.4.2) and I found exactly
(step by step) the same problems described below.

I had to install first ucd-snmp-4.2.6 and net-snmp-5.0.8 so when
doing the ./configure I had to add the :

--with-snmp=/path_to/net-snmp/include/net-snmp/library

or even trying

--with-snmp=/path_to/ucd-snmp/include/ucd-snmp/library

Finally I got stuck at:
./configure --prefix /path_to/snmpd --with-snmp=/path_to/ucd-snmp/include

I tried do include the
LD_LIBRARY_PATH=
/path_to/ucd-snmp/lib:/path_to/net-snmp/include/net-snmp/library:/path_to/uc
d-snmp/include/ucd-snmp

but it seemed not to work either.

The error "cannot find -lsnmp" I guess it ment to be that gcc can't
find the libsnmp.so, so I tried to find this library via "find -name
"libsnmp*.so" -print"
and I found out that inside /path_to/ucd-snmp/lib/libsnmp.so (softlink to
libsnmp-0.4.2.6.so release) there was the
source.

I made a softlink like:
ln -s /path_to/ucd-snmp/lib/libsnmp-0.4.2.6.so /usr/lib/libsnmp.so

And filally make amnd make install went ok !!!

Maybe the LD_LIBRARY_PATH variable is not working fine !


Gerard Delmas

-------------------

>Looks like snmppd has not been upgraded to support net-snmp and is still
> looking for the ucd-snmp headers..
>
> try installing the last ucd-snmp version and then try configure again..
>
> -sg
>

-------------------

> On Tue, 11 Mar 2003 nagios at gr... wrote:

 >
 > Hi!
 >
 > I dont know if anyone of you use the snmppd with nagios, but I'll try
 > to describe my problem anyway:
 >
 > "Snmppd is SNMP proxy daemon.
 > It loads MIBs upon startup, listens on TCP socket for SNMP GET requests,
 > polls specified host and returns value to caller process."
 > [readme URI: http://slava.local.nsys.by/projects/snmppd/README ]
 >
 > On the machine running nagios I want to use this to allow greater
 > performance of the snmp-based checks on a huge number of snmp-
 > enabled networked items.
 >
 > While compiling net-snmp works fine, I get lots of errors when trying
 > to compile snmppd. First of it complains that it can not find net-snmp:
 >
 > "configure: error: can not find SNMP header files under"
 >
 > then it breaks off, and thats all it says.
 >
 > when i try to use ./configure --with-snmp=/path/to/net-snmp I get the
 > following:
 >
 > "configure: error: can not find SNMP header files under
/path/to/net-snmp"
 >
 > So I try again with a bit more specific path:
 >
 > ./configure --with-snmp=/path/to/net-snmp/include/net-snmp/library
 >
 > This now works, and the snmppd configures nicely, and we're ready for a
 > 'make'.
 >
 > Running 'make' now returns this:
 > In file included from snmppd_snmp.c:1:
 > common.h:47: ucd-snmp-config.h: No such file or directory
 > common.h:48: ucd-snmp-includes.h: No such file or directory
 > make[1]: *** [snmppd_snmp.o] Error 1
 > make[1]: Leaving directory `/usr/local/src/snmppd-0.4.2/snmppd'
 > make: *** [all-recursive] Error 1
 >
 > I further tried to patch common.h with the correct paths to
 > ucd-snmp-config.h and ucd-snmp-includes.h but this does not solve
 > the problem as it now fails with yet another error:
 >
 > gcc  -I/path/to/net-snmp/include/net-snmp/library -g -O2
 > -L/path/to/net-snmp/include/net-snmp/library/lib  -o snmppd
 > snmppd_snmp.o snmppd.o snmppd_util.o control.o queue.o threads.o
 > splitter.o  -lnsl -lresolv -lsnmp
 > /usr/i386-slackware-linux/bin/ld: cannot find -lsnmp
 > collect2: ld returned 1 exit status
 > make[1]: *** [snmppd] Error 1
 > make[1]: Leaving directory `/usr/local/src/snmppd-0.4.2/snmppd'
 > make: *** [all-recursive] Error 1
 >
 > I also tried to add all the include-paths to /etc/ld.so.conf, without
 > that helping any more either.
 >
 > On a final notice: I run slackware linux 8.1 on the machine and I
 > have never had such dificulties with any program as with this,
 >
 > I do know this may be a bit offtopic, but as I have no where else
 > to turn (I have allready asked friends, coworkers & even on IRC)
 > I ask you to help me with any input you may have, you may answer
 > either to the list or to me directly. on this email-adress.
 >
 >

 --

Gerard Delmas



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20030410/36592cc1/attachment.html>


More information about the Help mailing list