Re: HOST-RESOURCES-MIB::hrDeviceStatus

"Jimbo Cham" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Before I mess with teh configure.in file I have to get it to compile and
link. I modified the makefile and all compiles but I just cant get the thing
to link. This is the snippet ..
I know the library has these functions


cd agent
(cd .libs && rm -f libnetsnmpmibs.so.5.1.2)
gcc -shared mibgroup/mibII/system_mib.lo mibgroup/mibII/sysORTable.lo
mibgroup/mibII/at.lo mibgroup/mibII/interfaces.lo mibgroup/mibII/snmp_mib.lo
mibgroup/mibII/tcp.lo mibgroup/mibII/icmp.lo mibgroup/mibII/ip.lo
mibgroup/mibII/udp.lo mibgroup/mibII/vacm_vars.lo
mibgroup/mibII/setSerialNo.lo mibgroup/ucd-snmp/memory.lo
mibgroup/ucd-snmp/vmstat.lo mibgroup/ucd-snmp/proc.lo
mibgroup/ucd-snmp/versioninfo.lo mibgroup/ucd-snmp/pass.lo
mibgroup/ucd-snmp/pass_persist.lo mibgroup/ucd-snmp/disk.lo
mibgroup/ucd-snmp/loadave.lo mibgroup/ucd-snmp/extensible.lo
mibgroup/ucd-snmp/errormib.lo mibgroup/ucd-snmp/file.lo
mibgroup/ucd-snmp/dlmod.lo mibgroup/ucd-snmp/proxy.lo
mibgroup/ucd-snmp/logmatch.lo mibgroup/snmpv3/snmpEngine.lo
mibgroup/snmpv3/snmpMPDStats.lo mibgroup/snmpv3/usmStats.lo
mibgroup/snmpv3/usmUser.lo mibgroup/notification/snmpNotifyTable.lo
mibgroup/notification/snmpNotifyFilterTable.lo
mibgroup/notification/snmpNotifyFilterProfileTable.lo
mibgroup/target/snmpTargetAddrEntry.lo
mibgroup/target/snmpTargetParamsEntry.lo mibgroup/target/target.lo
mibgroup/target/target_counters.lo mibgroup/agent/nsTransactionTable.lo
mibgroup/agent/nsModuleTable.lo mibgroup/agent/nsDebug.lo
mibgroup/agent/nsCache.lo mibgroup/agent/nsLogging.lo
mibgroup/agentx/master.lo mibgroup/agentx/subagent.lo
mibgroup/utilities/override.lo mibgroup/host/hr_system.lo
mibgroup/host/hr_storage.lo mibgroup/host/hr_device.lo
mibgroup/host/hr_other.lo mibgroup/host/hr_proc.lo
mibgroup/host/hr_network.lo mibgroup/host/hr_print.lo
mibgroup/host/hr_disk.lo mibgroup/host/hr_partition.lo
mibgroup/host/hr_filesys.lo mibgroup/host/hr_swrun.lo
mibgroup/host/hr_swinst.lo mibgroup/util_funcs.lo
mibgroup/mibII/kernel_linux.lo mibgroup/mibII/tcpTable.lo
mibgroup/mibII/ipAddr.lo mibgroup/mibII/var_route.lo
mibgroup/mibII/route_write.lo mibgroup/mibII/udpTable.lo
mibgroup/mibII/vacm_context.lo mibgroup/utilities/execute.lo
mibgroup/header_complex.lo mibgroup/agentx/protocol.lo
mibgroup/agentx/client.lo mibgroup/agentx/master_admin.lo
mibgroup/agentx/agentx_config.lo mib_modules.lo auto_nlist.lo
-L/home/muniba/smartmontools-5.37 -lsmartctl -lstdc++ -Wl,-soname -Wl,
libnetsnmpmibs.so.5 -o .libs/libnetsnmpmibs.so.5.1.2
(cd .libs && rm -f libnetsnmpmibs.so.5 && ln -s libnetsnmpmibs.so.5.1.2
libnetsnmpmibs.so.5)
(cd .libs && rm -f libnetsnmpmibs.so && ln -s libnetsnmpmibs.so.5.1.2
libnetsnmpmibs.so)
gcc -g -O2 -I/usr/include/rpm -Dlinux -I/usr/include/rpm
-L/home/muniba/smartmontools-5.37 snmpd.o -lsmartctl -lstdc++
./.libs/libnetsnmpagent.so ./.libs/libnetsnmpmibs.so
helpers/.libs/libnetsnmphelpers.so ../snmplib/.libs/libnetsnmp.so
/usr/lib/librpm.so -L/usr/src/build/600995-i386/install/usr/lib -L/usr/lib
/usr/lib/librpmdb.so -L/usr/local/lib -lselinux /usr/lib/librpmio.so
/usr/lib/libbeecrypt.so -ldl -lrt -lpthread /usr/lib/libpopt.so -lbz2 -lz
-lcrypto -lelf -lm -Wl,--rpath -Wl,/usr/local/lib -o .libs/snmpd

./.libs/libnetsnmpmibs.so: undefined reference to `deviceopen'
./.libs/libnetsnmpmibs.so: undefined reference to `guess_device_type'
collect2: ld returned 1 exit status

nm libsmartctl.a | grep deviceopen
00000338 T _Z10deviceopenPKcPc

nm libsmartctl.a | grep guess_device_type
00002680 T _Z17guess_device_typePKc



On 6/15/07, Thomas Anders <[email protected]> wrote:
>
> Jimbo Cham wrote:
> > Will modify hr_disk.c accordingly. How do I configure the agent to
> > compile with the libsmartctl.a that hr_disk will be using ? I could hard
> > code it in the Makefile but that gets lost on the next configure
>
> For SVN trunk, add something like
>
> NETSNMP_SEARCH_LIBS(xxx, smartctl,,,,LMIBLIBS)
>
> (xxx being the fuction from libsmartctl you intend to use)
>
> to configure.in (around the place of the lmSensors tests) and re-run
> autoconf and autoheader (2.61).
>
>
> +Thomas
>
> --
> Thomas Anders (thomas.anders at blue-cable.de)
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.