LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-20-2006, 09:29 AM   #16
jugabaga
LQ Newbie
 
Registered: Apr 2006
Posts: 15

Original Poster
Rep: Reputation: 0

I've added this line to mi java warning class before loading netsnmpj.
System.loadLibrary("sensors");

but the error still appearing.
Quote:
try loading libsensors before loading libnetsnmpmibs.so.
the promblem here is that I don't load libnetsnmpmibs.so, not by my own, I just load netsnmpj and in some "magic way" this lib starts to call to the others libs, so I can't contol the loading order. I don't know how the OS does that.

So my last resource is try to compile my own libnetsnmpj.so and try to find out why does my jvm crashes while loading this lib.
 
Old 04-20-2006, 09:33 AM   #17
jugabaga
LQ Newbie
 
Registered: Apr 2006
Posts: 15

Original Poster
Rep: Reputation: 0
I took out the -shared flag but others errors appeared.
I have to look at for gcc options.
 
Old 04-20-2006, 10:23 AM   #18
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Ok, I just downloaded netsnmpj to read the INSTALL file. I ran the demo and got a linker error due to my not having net-snmp installed. Fine.

The libnetsnmpj.so I have has different link dependencies than yours:

tom@deathstar:~/netsnmpj-0.2.1/linux-i386$ ldd libnetsnmpj.so
linux-gate.so.1 => (0xffffe000)
libnetsnmp.so.5 => not found
libcrypto.so.2 => not found
libnetsnmpagent.so.5 => not found
libnetsnmphelpers.so.5 => not found
libnetsnmpmibs.so.5 => not found
libdl.so.2 => /lib/libdl.so.2 (0xb7f3d000)
librpmdb-4.1.so => not found
librpm-4.1.so => not found
librpmio-4.1.so => not found
libpopt.so.0 => /usr/lib/libpopt.so.0 (0xb7f37000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7f22000)
libm.so.6 => /lib/libm.so.6 (0xb7efd000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7ee9000)
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0xb7e31000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0xb7e26000)
libc.so.6 => /lib/libc.so.6 (0xb7d02000)
/lib/ld-linux.so.2 (0x80000000)
tom@deathstar:~/netsnmpj-0.2.1/linux-i386$

As you can see, libsensors isn't listed. Perhaps it's not listed since I don't have net-snmp installed. It doesn't look like netsnmpj is being supported since the mailing list archives don't seem very active.

Are you able to run the netsnmpj demos ok?

tom@deathstar:~/netsnmpj-0.2.1$ java -Djava.library.path=linux-i386 -cp netsnmpj.jar org.netsnmp.swingui.snmpget
java.lang.UnsatisfiedLinkError: /home/tom/netsnmpj-0.2.1/linux-i386/libnetsnmpj.so: libnetsnmp.so.5: cannot open shared object file: No such file or directory
##
## could not find libnetsnmp.so. Please checked your LD_LIBRARY_PATH setting(unix/linux
## or your PATH setting under MS-Windows. It may also be that
## net-snmp does not appear to be installed. If so, please install net-snmp 5.0.7 or higher
## before proceeding further. See http://net-snmp.sourceforge.net
##
tom@deathstar:~/netsnmpj-0.2.1$

Peace...
 
Old 04-20-2006, 11:31 AM   #19
jugabaga
LQ Newbie
 
Registered: Apr 2006
Posts: 15

Original Poster
Rep: Reputation: 0
there are 3, I think, distributions
1 netsnmp-0.2.1 for fc
2 netsnm-0.2.5-beta for debian
3 netsnm-0.2.5-beta for RH9

there is not any reference to libsensors.so in this files. But when I try to use any of those files I get the error in the libnetsnmpmibs.so=> sensors_get_label or rpmdbClose. depending on the version.

I have net-snmp installed, it works for some commands, such as: snmpget, walk, table, etc. snmp installs these 3 libs.
libnetsnmpagent.so.5
libnetsnmphelpers.so.5
libnetsnmpmibs.so.5

Running the makefile from the source code, got via CVS and after fixing some references in it, I get my own libnetsnmpj.so but it references sensors {-lsensors}. But it crashes without any reason. in the libc.so.6 file.

A: Not, when I try to run an example I get the error.
that is why I wanted to link libsensors.so to the compiled libnetsnmp.so using binutils (which is impossible).

Now I'am trying to make a static lib making changes to the make file.
 
Old 04-20-2006, 03:57 PM   #20
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally Posted by jugabaga
I have net-snmp installed, it works for some commands, such as: snmpget, walk, table, etc. snmp installs these 3 libs.
libnetsnmpagent.so.5
libnetsnmphelpers.so.5
libnetsnmpmibs.so.5
What does ldd show when run against those three libraries? I'm wondering if libnetsnmpmibs.so.5 references libsensors.

Quote:
A: Not, when I try to run an example I get the error.
that is why I wanted to link libsensors.so to the compiled libnetsnmp.so using binutils (which is impossible).
You're dealing with dynamic librariesso going with static libraries is the only way to ultimately get what you're after, unless we figure out how to get libsensors.so loaded.

Quote:
Now I'am trying to make a static lib making changes to the make file.
Good luck...

Peace...
 
Old 04-21-2006, 03:39 PM   #21
jugabaga
LQ Newbie
 
Registered: Apr 2006
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
I'm wondering if libnetsnmpmibs.so.5 references libsensors.
Not.
ldd /usr/lib/libnetsnmpmibs.so.5
linux-gate.so.1 => (0x00fb6000)
libcrypto.so.5 => /lib/libcrypto.so.5 (0x006d1000)
libc.so.6 => /lib/libc.so.6 (0x00400000)
libdl.so.2 => /lib/libdl.so.2 (0x00111000)
libz.so.1 => /usr/lib/libz.so.1 (0x0090f000)
/lib/ld-linux.so.2 (0x001fe000)

there is not a libsensors!But the reference to the function sensors_get_label exists.What does it means?
[root@one ~]# ldd /usr/lib/libnetsnmpagent.so
linux-gate.so.1 => (0x00c07000)
libcrypto.so.5 => /lib/libcrypto.so.5 (0x0021a000)
libc.so.6 => /lib/libc.so.6 (0x00c8b000)
libdl.so.2 => /lib/libdl.so.2 (0x00aef000)
libz.so.1 => /usr/lib/libz.so.1 (0x007cb000)
/lib/ld-linux.so.2 (0x001fe000)
[root@one ~]# ldd /usr/lib/libnetsnmphelpers.so
linux-gate.so.1 => (0x006fa000)
libcrypto.so.5 => /lib/libcrypto.so.5 (0x00585000)
libc.so.6 => /lib/libc.so.6 (0x002f7000)
libdl.so.2 => /lib/libdl.so.2 (0x00777000)
libz.so.1 => /usr/lib/libz.so.1 (0x00cdb000)
/lib/ld-linux.so.2 (0x001fe000)


Also, I have compiled the source files,and then I get a libnetsnmpj.a file using the
"ar" command. the problem is that I can't load it with the System.loadLibrary command.
Q: there is any way to load static libs in java?, I've checked the classpath and it's ok.
 
Old 04-21-2006, 04:38 PM   #22
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
At this point, I would ask your libsensors question on the net-snmp mailing list. Tell them you're using netsnmpj and you're having problems tracking down the libsensors dependency so you can build a shared library WITH libsensors in it. I would also contact the netsnmpj maintainer and see if they could provide additional assistance.

It's obvious no one else using either of those SNMP libraries is reading this thread.

Peace...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
symbol lookup error: /usr/lib/libgtk-x11.2.0.so.0: undefined symbol:... IamI Slackware 17 02-29-2008 11:10 AM
undefined symbol: __gxx_personality_v0 yll Programming 2 02-05-2008 09:53 AM
Undefined symbol movitto Programming 2 02-18-2006 01:11 AM
snort failed: snort: symbol lookup error: undefined symbol: usmAES192PrivProtocol Emmanuel_uk Linux - Security 1 07-10-2005 10:29 AM
undefined symbol: _Unwind_Resume aa2bi Linux - Newbie 2 07-09-2004 02:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration