The fundamental difference between the two boxes where snmptrapd is working on one but not the other is the linking.
The library on the working box links to /usr/lib/libnetsnmphelpers.so.5 which has the symbol that I am missing on the non working box. The non working box does not link to this library and tries to pick up the symbol from another library /usr/lib/libnetsnmpagent.so.5 and fails. [EMAIL PROTECTED] suggested that I do a ... LD_PRELOAD=/usr/local/lib/libnetsnmphelpers.so.5 / usr/local/sbin/snmptrapd which works i.e. snmptrapd loads correctly. What I can't work out is why snmptrapd links to a different set of libraries on the two boxes. Do you have a Solaris box you can test this on. Which libraries do you see linked by snmptrapd? Regards Andy On Wed, 2005-02-02 at 20:52 +0000, Andy Ford wrote: > Hi Bruce, Robert > > I have now done ... > > rm -f /lib/*netsnmp* > > rm -f /usr/lib/*netsnmp* > rm -f /usr/bin/snmp* > rm -f /usr/sbin/snmp* > > rm -f /usr/local/lib/*netsnmp* > rm -f /usr/local/bin/snmp* > rm -f /usr/local/sbin/snmp* > > > untar-ed a clean version of net-snmp > > set PATH=/usr/sbin:/usr/local/bin:/usr/ccs/bin:/usr/bin > > >./configure --with-gnu-ld --enable-shared --enable-embedded-perl > --with-perl-modules --with-cc=gcc --disable-developer > --with-mib-modules="host disman/event-mib ucd-snmp/diskio smux agentx > mibII/mta_sendmail" --with-default-snmp-version="1" > --with-sys-contact="[EMAIL PROTECTED]" > --with-sys-location="customer_site" --with-logfile="/var/log/snmpd.log" > --with-persistent-directory="/var/net-snmp"; make; make install > > I have attached the output from the configure/make/make install (many > warnings but no errors). This does seem a little presumptuous (that > you'll take the time to look over the output) and I apologise for that. > > I get the same error when I run snmptrapd ... > > > /usr/local/sbin/snmptrapd > ld.so.1: /usr/local/sbin/snmptrapd: fatal: relocation error: > file /usr/local/lib/libnetsnmpagent.so.5: symbol netsnmp_register_null: > referenced symbol not found > Killed > > >crle > Configuration file [3]: /var/ld/ld.config > Default Library Path (ELF): /usr/lib:/usr/local/lib/ > Trusted Directories (ELF): /usr/lib/secure (system default) > > Command line: > crle -c /var/ld/ld.config -l /usr/lib:/usr/local/lib/ > > > echo $LD_LIBRARY_PATH > /usr/local/lib:/usr/lib > > On the box that the snmptrapd is running, ldd indicates that other > libraries are being linked (this is for Robert as Bruce has already seen > this)... > > Working snmptrapd... > > ldd /usr/sbin/snmptrapd > libnetsnmptrapd.so.5 => /usr/lib/libnetsnmptrapd.so.5 > libnetsnmpagent.so.5 => /usr/lib/libnetsnmpagent.so.5 > libnetsnmpmibs.so.5 => /usr/lib/libnetsnmpmibs.so.5 > libnetsnmphelpers.so.5 => /usr/lib/libnetsnmphelpers.so.5 > libnetsnmp.so.5 => /usr/lib/libnetsnmp.so.5 > libkvm.so.1 => /usr/lib/libkvm.so.1 > libkstat.so.1 => /usr/lib/libkstat.so.1 > libz.so.1 => /usr/lib/libz.so.1 > libelf.so.1 => /usr/lib/libelf.so.1 > libsocket.so.1 => /usr/lib/libsocket.so.1 > libnsl.so.1 => /usr/lib/libnsl.so.1 > libdl.so.1 => /usr/lib/libdl.so.1 > libm.so.1 => /usr/lib/libm.so.1 > libc.so.1 => /usr/lib/libc.so.1 > libadm.so.1 => /usr/lib/libadm.so.1 > libmp.so.2 => /usr/lib/libmp.so.2 > /usr/platform/SUNW,UltraAX-i2/lib/libc_psr.so.1 > > Non working snmptrapd > >ldd /usr/local/sbin/snmptrapd > libnetsnmptrapd.so.5 => /usr/local/lib/libnetsnmptrapd.so.5 > libnetsnmpagent.so.5 => /usr/local/lib/libnetsnmpagent.so.5 > libnetsnmpmibs.so.5 => /usr/local/lib/libnetsnmpmibs.so.5 > libnetsnmp.so.5 => /usr/local/lib/libnetsnmp.so.5 > libsocket.so.1 => /usr/lib/libsocket.so.1 > libnsl.so.1 => /usr/lib/libnsl.so.1 > libdl.so.1 => /usr/lib/libdl.so.1 > libm.so.1 => /usr/lib/libm.so.1 > libc.so.1 => /usr/lib/libc.so.1 > libmp.so.2 => /usr/lib/libmp.so.2 > /usr/platform/SUNW,UltraAX-i2/lib/libc_psr.so.1 > > This indicates something is different with the build - surely! > > Thanks again for taking time to look at this as I am truly stumped > > Regards > > Andy > > On Wed, 2005-02-02 at 15:11 +0000, Robert Story wrote: > > On Tue, 01 Feb 2005 17:54:19 +0000 Andy wrote: > > AF> > On Tue, 2005-02-01 at 14:03 +0000, Andy Ford wrote: > > AF> > > I have installed the net-snmp (from cvs today) distribution > > AF> > > successfully on a SunOS 5.8 Generic_117000-01 sun4u sparc > > AF> > > SUNW,UltraAX-i2 box. Unfortunately, when I run snmptrapd I get > > the > > AF> > > following error... > > AF> > > > > AF> > > ld.so.1: /usr/sbin/snmptrapd: fatal: relocation error: > > AF> > > file /usr/lib/libnetsnmpagent.so.5: symbol > > netsnmp_register_null: > > AF> > > referenced symbol not found > > AF> > > AF> I have now installed to /usr/local and have the binaries > > AF> in /usr/local/sbin. I have also used crle to modify the library > > search > > AF> path. > > AF> > > AF> /usr/local/sbin/snmptrapd still fails with the same error > > > > This smells of multiple conflicting libraries installed. Are you sure > > you > > didn't have some binary package pre-installed? If so, remove it. Then > > remove > > all existing versions (rm -f /lib/*netsnmp* /usr/lib/*netsnmp* > > /usr/local/lib/*snmp*), and re-install net-snmp. If you've installed > > before to > > /usr/bin and /usr/local/bin, you'll have to do some manual cleanup of > > the > > applications... > > > > -- > > Robert Story; NET-SNMP Junkie > > Support: <http://www.net-snmp.org/> > > <irc://irc.freenode.net/#net-snmp> > > Archive: > > <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users> > > > > You are lost in a twisty maze of little standards, all different. > > > > -- perl -e "print qq^bIG VeRN ! ^^qq^#'#Yv#=<D+ ^" This e-mail is private and may be confidential and is for the intended recipient only. If misdirected, please notify us by telephone and confirm that it has been deleted from your system and any copies destroyed. If you are not the intended recipient you are strictly prohibited from using, printing, copying, distributing or disseminating this e-mail or any information contained in it. We use reasonable endeavours to virus scan all e-mails leaving the Company but no warranty is given that this e-mail and any attachments are virus free. You should undertake your own virus checking. The right to monitor e-mail communications through our network is reserved by us. ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users