<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=Windows-1252">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6249.1">
<TITLE>Re: Problems compiling snmppd for use with nagios </TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Hi,</FONT>
</P>
<P><FONT SIZE=2>I'm having exactly the same problem as Anders K. Hanssen.</FONT>
</P>
<P><FONT SIZE=2>I was willing to compile snmpd (snmppd-0.4.2) and I found exactly</FONT>
<BR><FONT SIZE=2>(step by step) the same problems described below.</FONT>
</P>
<P><FONT SIZE=2>I had to install first ucd-snmp-4.2.6 and net-snmp-5.0.8 so when</FONT>
<BR><FONT SIZE=2>doing the ./configure I had to add the :</FONT>
</P>
<P><FONT SIZE=2>--with-snmp=/path_to/net-snmp/include/net-snmp/library</FONT>
</P>
<P><FONT SIZE=2>or even trying</FONT>
</P>
<P><FONT SIZE=2>--with-snmp=/path_to/ucd-snmp/include/ucd-snmp/library</FONT>
</P>
<P><FONT SIZE=2>Finally I got stuck at:</FONT>
<BR><FONT SIZE=2>./configure --prefix /path_to/snmpd --with-snmp=/path_to/ucd-snmp/include</FONT>
</P>
<P><FONT SIZE=2>I tried do include the </FONT>
<BR><FONT SIZE=2>LD_LIBRARY_PATH= /path_to/ucd-snmp/lib:/path_to/net-snmp/include/net-snmp/library:/path_to/ucd-snmp/include/ucd-snmp</FONT>
</P>
<P><FONT SIZE=2>but it seemed not to work either.</FONT>
</P>
<P><FONT SIZE=2>The error "cannot find -lsnmp" I guess it ment to be that gcc can't</FONT>
<BR><FONT SIZE=2>find the libsnmp.so, so I tried to find this library via "find -name "libsnmp*.so" -print"</FONT>
<BR><FONT SIZE=2>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</FONT>
<BR><FONT SIZE=2>source.</FONT>
</P>
<P><FONT SIZE=2>I made a softlink like:</FONT>
<BR><FONT SIZE=2>ln -s /path_to/ucd-snmp/lib/libsnmp-0.4.2.6.so /usr/lib/libsnmp.so</FONT>
</P>
<P><FONT SIZE=2>And filally make amnd make install went ok !!!</FONT>
</P>
<P><FONT SIZE=2>Maybe the LD_LIBRARY_PATH variable is not working fine !</FONT>
</P>
<BR>
<P><FONT SIZE=2>Gerard Delmas</FONT>
</P>
<P><FONT SIZE=2>-------------------</FONT>
</P>
<P><FONT SIZE=2>>Looks like snmppd has not been upgraded to support net-snmp and is still </FONT>
<BR><FONT SIZE=2>> looking for the ucd-snmp headers..</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> try installing the last ucd-snmp version and then try configure again..</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> -sg</FONT>
<BR><FONT SIZE=2>> </FONT>
</P>
<P><FONT SIZE=2>-------------------</FONT>
</P>
<P><FONT SIZE=2>> On Tue, 11 Mar 2003 nagios@gr... wrote:</FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2> > </FONT>
<BR><FONT SIZE=2> > Hi!</FONT>
<BR><FONT SIZE=2> > </FONT>
<BR><FONT SIZE=2> > I dont know if anyone of you use the snmppd with nagios, but I'll try</FONT>
<BR><FONT SIZE=2> > to describe my problem anyway:</FONT>
<BR><FONT SIZE=2> > </FONT>
<BR><FONT SIZE=2> > "Snmppd is SNMP proxy daemon.</FONT>
<BR><FONT SIZE=2> > It loads MIBs upon startup, listens on TCP socket for SNMP GET requests,</FONT>
<BR><FONT SIZE=2> > polls specified host and returns value to caller process."</FONT>
<BR><FONT SIZE=2> > [readme URI: <A HREF="http://slava.local.nsys.by/projects/snmppd/README">http://slava.local.nsys.by/projects/snmppd/README</A> ]</FONT>
<BR><FONT SIZE=2> > </FONT>
<BR><FONT SIZE=2> > On the machine running nagios I want to use this to allow greater</FONT>
<BR><FONT SIZE=2> > performance of the snmp-based checks on a huge number of snmp-</FONT>
<BR><FONT SIZE=2> > enabled networked items.</FONT>
<BR><FONT SIZE=2> > </FONT>
<BR><FONT SIZE=2> > While compiling net-snmp works fine, I get lots of errors when trying</FONT>
<BR><FONT SIZE=2> > to compile snmppd. First of it complains that it can not find net-snmp:</FONT>
<BR><FONT SIZE=2> > </FONT>
<BR><FONT SIZE=2> > "configure: error: can not find SNMP header files under"</FONT>
<BR><FONT SIZE=2> > </FONT>
<BR><FONT SIZE=2> > then it breaks off, and thats all it says.</FONT>
<BR><FONT SIZE=2> > </FONT>
<BR><FONT SIZE=2> > when i try to use ./configure --with-snmp=/path/to/net-snmp I get the</FONT>
<BR><FONT SIZE=2> > following:</FONT>
<BR><FONT SIZE=2> > </FONT>
<BR><FONT SIZE=2> > "configure: error: can not find SNMP header files under /path/to/net-snmp"</FONT>
<BR><FONT SIZE=2> > </FONT>
<BR><FONT SIZE=2> > So I try again with a bit more specific path:</FONT>
<BR><FONT SIZE=2> > </FONT>
<BR><FONT SIZE=2> > ./configure --with-snmp=/path/to/net-snmp/include/net-snmp/library</FONT>
<BR><FONT SIZE=2> > </FONT>
<BR><FONT SIZE=2> > This now works, and the snmppd configures nicely, and we're ready for a</FONT>
<BR><FONT SIZE=2> > 'make'.</FONT>
<BR><FONT SIZE=2> > </FONT>
<BR><FONT SIZE=2> > Running 'make' now returns this:</FONT>
<BR><FONT SIZE=2> > In file included from snmppd_snmp.c:1:</FONT>
<BR><FONT SIZE=2> > common.h:47: ucd-snmp-config.h: No such file or directory</FONT>
<BR><FONT SIZE=2> > common.h:48: ucd-snmp-includes.h: No such file or directory</FONT>
<BR><FONT SIZE=2> > make[1]: *** [snmppd_snmp.o] Error 1</FONT>
<BR><FONT SIZE=2> > make[1]: Leaving directory `/usr/local/src/snmppd-0.4.2/snmppd'</FONT>
<BR><FONT SIZE=2> > make: *** [all-recursive] Error 1</FONT>
<BR><FONT SIZE=2> > </FONT>
<BR><FONT SIZE=2> > I further tried to patch common.h with the correct paths to</FONT>
<BR><FONT SIZE=2> > ucd-snmp-config.h and ucd-snmp-includes.h but this does not solve</FONT>
<BR><FONT SIZE=2> > the problem as it now fails with yet another error:</FONT>
<BR><FONT SIZE=2> > </FONT>
<BR><FONT SIZE=2> > gcc -I/path/to/net-snmp/include/net-snmp/library -g -O2</FONT>
<BR><FONT SIZE=2> > -L/path/to/net-snmp/include/net-snmp/library/lib -o snmppd</FONT>
<BR><FONT SIZE=2> > snmppd_snmp.o snmppd.o snmppd_util.o control.o queue.o threads.o</FONT>
<BR><FONT SIZE=2> > splitter.o -lnsl -lresolv -lsnmp</FONT>
<BR><FONT SIZE=2> > /usr/i386-slackware-linux/bin/ld: cannot find -lsnmp</FONT>
<BR><FONT SIZE=2> > collect2: ld returned 1 exit status</FONT>
<BR><FONT SIZE=2> > make[1]: *** [snmppd] Error 1</FONT>
<BR><FONT SIZE=2> > make[1]: Leaving directory `/usr/local/src/snmppd-0.4.2/snmppd'</FONT>
<BR><FONT SIZE=2> > make: *** [all-recursive] Error 1</FONT>
<BR><FONT SIZE=2> > </FONT>
<BR><FONT SIZE=2> > I also tried to add all the include-paths to /etc/ld.so.conf, without</FONT>
<BR><FONT SIZE=2> > that helping any more either.</FONT>
<BR><FONT SIZE=2> > </FONT>
<BR><FONT SIZE=2> > On a final notice: I run slackware linux 8.1 on the machine and I</FONT>
<BR><FONT SIZE=2> > have never had such dificulties with any program as with this,</FONT>
<BR><FONT SIZE=2> > </FONT>
<BR><FONT SIZE=2> > I do know this may be a bit offtopic, but as I have no where else</FONT>
<BR><FONT SIZE=2> > to turn (I have allready asked friends, coworkers & even on IRC)</FONT>
<BR><FONT SIZE=2> > I ask you to help me with any input you may have, you may answer</FONT>
<BR><FONT SIZE=2> > either to the list or to me directly. on this email-adress.</FONT>
<BR><FONT SIZE=2> > </FONT>
<BR><FONT SIZE=2> > </FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2> -- </FONT>
</P>
<P><FONT SIZE=2>Gerard Delmas</FONT>
</P>
<BR>
<BR>
</BODY>
</HTML>