Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 04-12-2006, 07:23 PM   #1
LQ Newbie
Registered: Apr 2006
Posts: 15

Rep: Reputation: 0
compiling netsnmpj, crash JVM

I'm trying to build my own lib, working with makefiles I get a file, but when I try to run the examples from java, the JVM crashes, which make me think that maybe I'm compliling in a bad way....
I got some other files and they throws warnings, my file crashes!!!

here is the stact trace:

Stack: [0xbfa3b000,0xbfc3b000), sp=0xbfc34f14, free space=2023k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [] index+0x63
C [] init_snmp_enum+0x7c
C [] init_snmp+0x31e
C [] JNI_OnLoad+0xfd
C [] Java_java_lang_ClassLoader_00024NativeLibrary_load+0x1fd
j java.lang.ClassLoader$NativeLibrary.load(Ljava/lang/StringV+0
j java.lang.ClassLoader.loadLibrary0(Ljava/lang/Class;Ljava/io/FileZ+300
j java.lang.ClassLoader.loadLibrary(Ljava/lang/Class;Ljava/lang/String;Z)V+268
j java.lang.Runtime.loadLibrary0(Ljava/lang/Class;Ljava/lang/StringV+54
j java.lang.System.loadLibrary(Ljava/lang/StringV+7
j org.netsnmp.Warnings.loadNativeLibraryOrProvideWarning(Ljava/lang/StringV+1
j org.netsnmp.NetSNMPSession.<clinit>()V+44
v ~StubRoutines::call_stub
V []
V []
V []
V []
V []
V []
V []
j org.netsnmp.examples.GetSysDescr.main([Ljava/lang/StringV+30
v ~StubRoutines::call_stub
V []
V []
V []
V []
V []
C [java+0x1803]
C [] __libc_start_main+0xc6

here is the compiling command:

g++ -g -shared -o linux-i386-dbg/ -Xlinker -O -Xlinker 1 --startgroup linux-i386-dbg/NetSNMP.o linux-i386-dbg/nativeThread.o linux-i386-dbg/exception.o linux-i386-dbg/lock.o linux-i386-dbg/NetSNMPjClasses.o linux-i386-dbg/NetSNMPjSession_read.o linux-i386-dbg/NetSNMPjSession_send.o linux-i386-dbg/NetSNMPPDU.o linux-i386-dbg/NetSNMPjSession.o linux-i386-dbg/session_to_jobject.o linux-i386-dbg/agentX.o linux-i386-dbg/NetSNMPOID.o linux-i386-dbg/NetSNMPMIB.o \
-L/usr/lib -lnetsnmp -lcrypto -lrpm -lrpmio -lpopt -lz -lm -L/usr/lib/lib -lwrap -L/usr/lib -lnetsnmpagent -lnetsnmpmibs -lnetsnmphelpers -lnetsnmp -ldl -lcrypto -lrpm -lrpmio -lpopt -lz -lm -lsensors -L/usr/lib/lib -lwrap -lwrap -L/root/proyJava/JNISupport/linux-i386-dbg -ljnisupport -lpthread --endgroup

this did not show any errors, what could be wrong???

Old 04-12-2006, 07:33 PM   #2
LQ Newbie
Registered: Apr 2006
Posts: 15

Original Poster
Rep: Reputation: 0
another problem with compliled libs

while using the compiled libs that come with the binary distribution, all the app load or netsnampj.

this lib calls to, and says that there are 2 functions without a definition:

rpmdbClose and sensors_get_label

I have read the lib with KHexEdit and I found that a reference exists.

Q:Why does this errors keep comming if the reference exists??

this is the error msg.

java.lang.UnsatisfiedLinkError: /root/netsnmpj-0.2.1/linux-i386/ /usr/lib/ undefined symbol: sensors_get_label


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how to build netsnmpj minil Linux - Software 1 04-10-2006 01:35 PM
give a NEWB a crash course in Compiling APPS rpmheadache Linux - Software 3 02-22-2005 11:58 AM
Ms Jvm kpharda Linux - Software 2 03-18-2004 05:29 PM
xmms crash xine crash mplayer crash paledread Linux - Software 9 03-09-2004 08:09 AM
jvm zaman Linux - Software 1 07-07-2003 01:27 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:36 AM.

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