Hi,

Thanks for reply.

Ok, then we go for another check:

What is the output of

nm snmpd | grep netsnmp_oid_stash_no_free

/not/usr/sbin> nm snmpd | grep netsnmp_oidstash_no_free
004d1cc4 T netsnmp_oid_stash_no_free

and

nm /home/wpWlsBridge.so | grep netsnmp_oid_stash_no_free

/not/usr/sbin> nm /home/wpWlsBridge.so | grep netsnmp_oidstash_no_free
                U netsnmp_oid_stash_no_free

/not/usr/sbin> nm /home/wpWlsCore.so | grep netsnmp_oidstash_no_free
                U netsnmp_oid_stash_no_free


Finally, I describe my work again.



step 1:Download Net-SNMP 5.1.1 from this address: http://directory.fsf.org/net-snmp.html

step 2: modified source code:



Locate file: net-snmp-5.1.1/agent/mibgroup/ucd-snmp/dlmod.c
Replace block:
#ifdef RTLD_NOW
       dlm->handle = dlopen(dlm->path, RTLD_NOW);
#else
       dlm->handle = dlopen(dlm->path, RTLD_LAZY);
#endif
with block:
#ifdef RTLD_NOW
       dlm->handle = dlopen(dlm->path, RTLD_GLOBAL | RTLD_NOW);
#else
       dlm->handle = dlopen(dlm->path, RTLD_GLOBAL | RTLD_LAZY);
#endif

Replace block:
#ifdef RTLD_NOW
           dlm->handle = dlopen(tmp_path, RTLD_NOW);
#else
           dlm->handle = dlopen(tmp_path, RTLD_LAZY);
#endif
with block:
#ifdef RTLD_NOW
           dlm->handle = dlopen(tmp_path, RTLD_GLOBAL | RTLD_NOW);
#else
           dlm->handle = dlopen(tmp_path, RTLD_GLOBAL | RTLD_LAZY);
#endif


step 3: export PATH=/opt/montavista/pro/devkit/mips/mips2_fp_be/bin:$PATH

step 4: ./configure --target=mips-linux --with-cc=mips2_fp_be-gcc --host=mips --with-endianness=big --prefix=/not/usr/ --with-install-prefix=/tmp

step 5:  make LDFLAGS="-all-static"
step 6:  make install
step 7:  cd /tmp
step 8: tar cvf net-snmp-target.tar not

Then copy the tar file to my target, and on my target
step 9: cd /
step 10: tar xvf net-snmp-target.tar



iTAS Tewen



永鈦鑫   iTAS Corporation
新竹科學園區工業東三路6號
NO. 6, Industry E. Rd. III, Science Park, Hsin-Chu, Taiwan 300, R.O.C.
Tel:03-6662595 Ext.1208
E-mail:[EMAIL PROTECTED]
----- Original Message ----- From: "Magnus Fromreide" <[EMAIL PROTECTED]>
To: "Tewen Hsieh" <[EMAIL PROTECTED]>
Cc: <net-snmp-coders@lists.sourceforge.net>
Sent: Monday, May 19, 2008 2:42 PM
Subject: Re: dlmod error


On fre, 2008-05-16 at 14:01 +0800, Tewen Hsieh wrote:
Hi,

Thanks for reply.

> Coud you please includ the output of ldd on both the agent and the .so.

/not/usr/sbin> ls
snmpd      snmptrapd
/not/usr/sbin> ldd ./snmpd

Ok. This looks reasonable.

> I'd guess that there is some problem with the library resolve paths.
> If you start snmpd as
>
> LD_LIBRARY_PATH=/not/usr/lib ./snmpd -f -L -DwpWlsCore,dlmod
>
> and repeats the test, does it work then?

I have tried this, but it still  showed the same error message.

> It might help to add --with-ldflags=-Wl,-rpath,/not/usr/lib but that
> could also be bad - I do not know enough to answer better.

I also tried this, but still the same error.

Ok, then we go for another check:

What is the output of

nm snmpd | grep netsnmp_oid_stash_no_free

and

nm /home/wpWlsBridge.so | grep netsnmp_oid_stash_no_free

/MF


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to