.so files in the distribution reference old vertions of
libcrypto and others, as a result
libnetsnmpmibs.so.5: undefined symbol: sensors_get_label
I don't know why if i have the same version required by
the netsnmpj.
If i try to build on my own i get this errors about
variations in declarations:
/usr/include/net-snmp/agent/table.h:150: error:
‘netsnmp_container’ no se declaró en este ámbito
/usr/include/net-snmp/agent/table.h:150: error: ‘c’ no
se declaró en este
ámbito/usr/include/net-snmp/agent/table.h:151: error:
expected primary-expression before ‘*’ token
/usr/include/net-snmp/agent/table.h:151: error:
‘tblreq’ no se declaró en este ámbito
/usr/include/net-snmp/agent/table.h:151: error: se
trata la lista de expresiones initializer como una
expresión compuesta
Logged In: NO
I got it, there is a missing include clause in the file
/usr/include/net-snmp/agent/table.h
this file needs this line:
#include <net-snmp/library/container.h>
now it is possible to compile the files and get the
libnetsnmpj.so.
Logged In: YES
user_id=1500776
i have tried to use the libnetsnmpj.so libs included in the
2 distributions from sourceforge (one for debian). when i
use those libs, they reference old version libs. in that
case I use 'ln -s ' to reference new libs with old names.
but sometimes there are erros like this:
java.lang.UnsatisfiedLinkError: .../libnetsnmpj.so:
/usr/lib/libnetsnmpmibs.so.5: undefined symbol: rpmdbClose.
i think it is because i have a newer version and rpmdbClose
is no longer avaliable.
that is why i try to complile my own libnetsnmpj.so but it
takes a lot of time to fix the references inside makefile.
i use the makefiles, and i get libjnisupport.a and then I
compile libnetsnmpj.so but when i try it with the java code
I get this error:
#
# An unexpected error has been detected by HotSpot Virtual
Machine:
#
# SIGSEGV (0xb) at pc=0x00289e53, pid=6015, tid=3086646176
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05
interpreted mode)
# Problematic frame:
# C [libc.so.6+0x69e53] index+0x63
when loading the libnetsnmpj.so
any Sugestions????
Logged In: YES
user_id=1500776
My work friend has found the problem, the problem is that in
the NetSNMP.cc file inside the JNI_OnLoad function the call
to init_snmp(OL) is using OL and in this call the JVM
crashes. So if you change the OL for init_snmp("something")
everything works!!
I don't know the true reason of this, but i think it is for
the changes in the snmp code, now verion 3.
Also, all the bins from sourceforge are missing to include
libsensors.so in the compiling command -lsensors. I had to
build my own so file for this reason.