Re: Stepping into my compiled libnetsnmpagent.so.5 with gdb when there is a

This is a discussion on Re: Stepping into my compiled libnetsnmpagent.so.5 with gdb when there is a within the SNMP Coders forums, part of the Networking and Network Related category; --0__=09BBE53FDFF3D24F8f9e8a93df938690918c09BBE53FDF F3D24F Content-type: text/html; charset=US-ASCII Content-Disposition: inline Content-transfer-encoding: quoted-printable <html&...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2005
Alan.Anderson@radisys.com
 
Posts: n/a
Default Re: Stepping into my compiled libnetsnmpagent.so.5 with gdb when there is a

--0__=09BBE53FDFF3D24F8f9e8a93df938690918c09BBE53FDF F3D24F
Content-type: text/html; charset=US-ASCII
Content-Disposition: inline
Content-transfer-encoding: quoted-printable

<html><body>
<p>Robert,<br>
Thanks for getting back to me on this. I updated my make file as your w=
ebsite suggests. But now I am back to the link order problem and unreso=
lved externals. I think it is a link order problem because if I rearran=
ge how I list the snmp libraries, I get different unresolved externals.=
<br>
<br>
Thanks,<br>
<br>
Alan<br>
<br>
Here is my link output.
<ul><tt>bld1-dsm&gt; make</tt><br>
<tt>cc -o example-demon example-demon.o nstAgentSubagentObject.o -L/vob=
s/vob3/net-snmp/doc/tutorial/../../tfs/x86/agent/.libs -L/vobs/vob3/net=
-snmp/doc/tutorial/../../tfs/x86/snmplib/.libs -L/vobs/vob3/net-snmp/do=
c/tutorial/../../tfs/x86/agent/helpers/.libs -Wl,-Bstatic -lnetsnmpagen=
t -lnetsnmpmibs -lnetsnmphelpers -lnetsnmp -Wl,-Bdynamic -ldl -lcrypto =
-lm/vobs/vob3/net-snmp/doc/tutorial/../../tfs/x86/agent/.libs/libnetsnm=
pmibs.a(extensible.o)(.text+0x76d): In function `var_extensible_shell':=
</tt><br>
<tt>/vobs/vob3/net-snmp/src/agent/mibgroup/ucd-snmp/extensible.c:470: u=
ndefined reference to `run_shell_command'</tt><br>
<tt>/vobs/vob3/net-snmp/doc/tutorial/../../tfs/x86/agent/.libs/libnetsn=
mpmibs.a(extensible.o)(.text+0x7d9):/vobs/vob3/net-snmp/src/agent/mibgr=
oup/ucd-snmp/extensible.c:467: undefined reference to `run_exec_command=
'</tt><br>
<tt>/vobs/vob3/net-snmp/doc/tutorial/../../tfs/x86/agent/.libs/libnetsn=
mpmibs.a(extensible.o)(.text+0x821):/vobs/vob3/net-snmp/src/agent/mibgr=
oup/ucd-snmp/extensible.c:459: undefined reference to `run_shell_comman=
d'</tt><br>
<tt>/vobs/vob3/net-snmp/doc/tutorial/../../tfs/x86/agent/.libs/libnetsn=
mpmibs.a(extensible.o)(.text+0x853):/vobs/vob3/net-snmp/src/agent/mibgr=
oup/ucd-snmp/extensible.c:456: undefined reference to `run_exec_command=
'</tt><br>
<tt>/vobs/vob3/net-snmp/doc/tutorial/../../tfs/x86/agent/.libs/libnetsn=
mpmibs.a(extensible.o)(.text+0xbb4): In function `var_extensible_reloca=
table':</tt><br>
<tt>/vobs/vob3/net-snmp/src/agent/mibgroup/ucd-snmp/extensible.c:597: u=
ndefined reference to `run_shell_command'</tt><br>
<tt>/vobs/vob3/net-snmp/doc/tutorial/../../tfs/x86/agent/.libs/libnetsn=
mpmibs.a(extensible.o)(.text+0xcc1):/vobs/vob3/net-snmp/src/agent/mibgr=
oup/ucd-snmp/extensible.c:594: undefined reference to `run_exec_command=
'</tt><br>
<tt>/vobs/vob3/net-snmp/doc/tutorial/../../tfs/x86/agent/.libs/libnetsn=
mpmibs.a(extensible.o)(.text+0xd2e):/vobs/vob3/net-snmp/src/agent/mibgr=
oup/ucd-snmp/extensible.c:587: undefined reference to `run_shell_comman=
d'</tt><br>
<tt>/vobs/vob3/net-snmp/doc/tutorial/../../tfs/x86/agent/.libs/libnetsn=
mpmibs.a(extensible.o)(.text+0xd74):/vobs/vob3/net-snmp/src/agent/mibgr=
oup/ucd-snmp/extensible.c:584: undefined reference to `run_exec_command=
'</tt><br>
<tt>/vobs/vob3/net-snmp/doc/tutorial/../../tfs/x86/agent/.libs/libnetsn=
mpmibs.a(extend.o)(.text+0x3ab): In function `extend_load_cache':</tt><=
br>
<tt>/vobs/vob3/net-snmp/src/agent/mibgroup/agent/extend.c:218: undefine=
d reference to `run_shell_command'</tt><br>
<tt>/vobs/vob3/net-snmp/doc/tutorial/../../tfs/x86/agent/.libs/libnetsn=
mpmibs.a(extend.o)(.text+0x4b3):/vobs/vob3/net-snmp/src/agent/mibgroup/=
agent/extend.c:220: un</tt><br>
<tt>defined reference to `run_exec_command'</tt><br>
<tt>collect2: ld returned 1 exit status</tt><br>
<tt>make: *** [example-demon] Error 1</tt><br>
<tt>bld1-dsm&gt;</tt><br>
</ul>
I think I have something wrong with the way I as configuring the system=
.. I am trying to configure so I can work outside of the net-snmp develo=
pment tree. The make file snippet I am using to configure the system is=
:
<ul><tt>NET_SNMP_ROOT=3D/vobs/vob3/net-snmp</tt><br>
<tt>NET_SNMP_SRC=3D/vobs/vob3/net-snmp/src</tt><br>
<tt>NET_SNMP_COM=3D/vobs/vob3/net-snmp/common</tt><br>
<tt>MIBDIRS=3D/vobs/vob3/net-snmp/src/mibs:/vobs/vob3/net-snmp/doc/tuto=
rial</tt><br>
<tt>SNMPCONFPATH=3D/vobs/vob3/net-snmp/common/etc/snmp</tt><br>
<tt>NETSNMPDIR=3D/vobs/vob3/net-snmp/tfs/x86</tt><br>
<tt>NETSNMPCONFIG=3D/vobs/vob3/net-snmp/tfs/x86/net-snmp-config</tt><br=
>

<tt>PERL5LIB=3D/vobs/vob3/net-snmp/tfs/x86/lib/perl5/site_perl/5.8.0/i3=
86-linux-thread-multi</tt><br>
<br>
<tt>build: mkdir</tt><br>
<tt> echo ******* This line should be removed at some point... --ala</t=
t><br>
<tt> cp -f ${NET_SNMP_ROOT}/doc/tutorial/nstAgentModuleObject.? ${NET_S=
NMP_ROOT}/src/agent/mibgroup</tt><br>
<tt> cd ${NETSNMPDIR} ; ${NET_SNMP_SRC}/configure \</tt><br>
<tt> --with-mib-modules=3D&quot;nstAgentModuleObject&quot; \</tt><br>
<tt> &nbsp; &nbsp;--with-default-snmp-version=3D&quot;2&quot; \</tt><b=
r>
<tt> --with-sys-contact=3D&quot;support@myhome.com&quot; \</tt><br>
<tt> &nbsp; &nbsp;--with-sys-location=3D&quot;No where&quot; \</tt><br=
>

<tt> &nbsp; &nbsp;--with-logfile=3D&quot;none&quot; \</tt><br>
<tt> &nbsp; &nbsp;--with-persistent-directory=3D&quot;${NETSNMPDIR}/va=
r/net-snmp&quot; \</tt><br>
<tt> &nbsp; &nbsp;${NET_SNMP_OPTS} \</tt><br>
<tt> --prefix=3D&quot;${NETSNMPDIR}&quot; </tt><br>
<tt> cd ${NETSNMPDIR} ; ${MAKE}</tt><br>
</ul>
<img src=3D"cid:00__=3D09BBE53FDFF3D24F8f9e8a93df93@rad isys.com" width=3D=
"16" height=3D"16" alt=3D"Inactive hide details for Robert Story &lt;rs=
tory@freesnmp.com&gt;">Robert Story &lt;rstory@freesnmp.com&gt;<br>
<br>
<br>

<table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0">=

<tr valign=3D"top"><td style=3D"background-image:url(cid:10__=3D09BBE53=
FDFF3D24F8f9e8a93df93@radisys.com); background-repeat: no-repeat; " wid=
th=3D"40%">
<ul>
<ul>
<ul>
<ul><b><font size=3D"2">Robert Story &lt;rstory@freesnmp.com&gt;</font>=
</b><font size=3D"2"> </font>
<p><font size=3D"2">02/18/2005 11:09 AM</font>
<table border=3D"1">
<tr valign=3D"top"><td width=3D"168" bgcolor=3D"#FFFFFF"><div align=3D"=
center"><font size=3D"2">Please respond to<br>
net-snmp-coders@lists.sourceforge.net</font></div></td></tr>
</table>
</ul>
</ul>
</ul>
</ul>
</td><td width=3D"60%">
<table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0">=

<tr valign=3D"top"><td width=3D"1%" valign=3D"middle"><img src=3D"cid:2=
0__=3D09BBE53FDFF3D24F8f9e8a93df93@radisys.com" border=3D"0" height=3D"=
1" width=3D"58" alt=3D""><br>
<div align=3D"right"><font size=3D"2">To</font></div></td><td width=3D"=
100%"><img src=3D"cid:20__=3D09BBE53FDFF3D24F8f9e8a93df93@rad isys.com" =
border=3D"0" height=3D"1" width=3D"1" alt=3D""><br>
<font size=3D"2">Alan.Anderson@radisys.com</font></td></tr>

<tr valign=3D"top"><td width=3D"1%" valign=3D"middle"><img src=3D"cid:2=
0__=3D09BBE53FDFF3D24F8f9e8a93df93@radisys.com" border=3D"0" height=3D"=
1" width=3D"58" alt=3D""><br>
<div align=3D"right"><font size=3D"2">cc</font></div></td><td width=3D"=
100%"><img src=3D"cid:20__=3D09BBE53FDFF3D24F8f9e8a93df93@rad isys.com" =
border=3D"0" height=3D"1" width=3D"1" alt=3D""><br>
<font size=3D"2">net-snmp-coders@lists.sourceforge.net</font></td></tr>=


<tr valign=3D"top"><td width=3D"1%" valign=3D"middle"><img src=3D"cid:2=
0__=3D09BBE53FDFF3D24F8f9e8a93df93@radisys.com" border=3D"0" height=3D"=
1" width=3D"58" alt=3D""><br>
<div align=3D"right"><font size=3D"2">Subject</font></div></td><td widt=
h=3D"100%"><img src=3D"cid:20__=3D09BBE53FDFF3D24F8f9e8a93df93@rad isys.=
com" border=3D"0" height=3D"1" width=3D"1" alt=3D""><br>
<font size=3D"2">Re: Stepping into my compiled libnetsnmpagent.so.5 wit=
h gdb when there is a system shared library of the same name?</font></t=
d></tr>
</table>

<table border=3D"0" cellspacing=3D"0" cellpadding=3D"0">
<tr valign=3D"top"><td width=3D"58"><img src=3D"cid:20__=3D09BBE53FDFF3=
D24F8f9e8a93df93@radisys.com" border=3D"0" height=3D"1" width=3D"1" alt=
=3D""></td><td width=3D"336"><img src=3D"cid:20__=3D09BBE53FDFF3D24F8f9=
e8a93df93@radisys.com" border=3D"0" height=3D"1" width=3D"1" alt=3D""><=
/td></tr>
</table>
</td></tr>
</table>
<br>
<tt>On Fri, 18 Feb 2005 08:52:12 -0600 Alan.Anderson@radisys.com wrote:=
<br>
AAC&gt; I tried static linking but I got lost in a maze of link order p=
roblems. I<br>
AAC&gt; would rather get the dynamic debugging going but I am open to s=
tatic<br>
AAC&gt; linking if some one could help with the link order.<br>
<br>
I always use static linking when testing, for exactly this reason. Debu=
gging<br>
shared libs is a pain. Here is the makefile I use:<br>
<br>
</tt><tt><a href=3D"http://www.freesnmp.com/net-snmp/faqs/#static">h=
ttp://www.freesnmp.com/net-snmp/faqs/#static</a></tt><tt><br>
<br>
-- <br>
Robert Story; NET-SNMP Junkie<br>
Support: &lt;</tt><tt><a href=3D"http://www.net-snmp.org/">http://www.n=
et-snmp.org/</a></tt><tt>&gt; &lt;irc://irc.freenode.net/#net-snmp&gt;<=
br>
Archive: &lt;</tt><tt><a href=3D"http://sourceforge.net/mailarchive/for=
um.php?forum=3Dnet-snmp-coders">http://sourceforge.net/mailarchive/foru=
m.php?forum=3Dnet-snmp-coders</a></tt><tt>&gt;<br>
<br>
You are lost in a twisty maze of little standards, all different. <br>
</tt><br>
</body></html>=

--0__=09BBE53FDFF3D24F8f9e8a93df938690918c09BBE53FDF F3D24F
Content-type: image/gif;
name="graycol.gif"
Content-Disposition: inline; filename="graycol.gif"
Content-ID: <00__=09BBE53FDFF3D24F8f9e8a93df93@radisys.com>
Content-transfer-encoding: base64

R0lGODlhEAAQAKECAMzMzAAAAP///wAAACH5BAEAAAIALAAAAAAQABAAAAIXlI+py+0PopwxUbpu
ZRfKZ2zgSJbmSRYAIf4fT3B0aW1pemVkIGJ5IFVsZWFkIFNtYX J0U2F2ZXIhAAA7

--0__=09BBE53FDFF3D24F8f9e8a93df938690918c09BBE53FDF F3D24F
Content-type: image/gif;
name="pic27232.gif"
Content-Disposition: inline; filename="pic27232.gif"
Content-ID: <10__=09BBE53FDFF3D24F8f9e8a93df93@radisys.com>
Content-transfer-encoding: base64

R0lGODlhWABDALP/AAAAAK04Qf79/o+Gm7WuwlNObwoJFCsoSMDAwGFsmIuezf///wAAAAAAAAAA
AAAAACH5BAEA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E6QWLSECehcWIYxIQES6zhbn1iIm THEQyqJ4eIxJJoUBc+3CbBuwZE
V5cJPPkIjFDdeEabQbd6WgICTxiiz0f5dBKquXF6k4senwEhYG nKEFJeGrxUZy8dB8gmAXI/sPvH
ESfCwVt5hTgYiqQqtdRNHQIU1PJ33ZqmzgE90OwLaoJcnMop1W iMmgkPHQRIrwgFuNV90A3doNKT
mrKIN07AnGcI9BQjhCBN4RfA1qIZnMqorJCogKfGQnxSCDilTV IA0yl5ciTovgLuBDKFUDE9aQcw
9SA+rjSNf9/M1gxrj6VwDTS0IUSElMzBfsj0NFXR2kwsV1A5IF1grLgLL/r1R40BZEnuBWgmQEyb
jqRwSAt6bqMCOFkvKFN2GPPkUzIm/SCF8z8pVzpbjVnMsy0vOr1hw3SaSRUhpY09v0z0J1FnwzPl
fmh+xl4WtR0zGu24I4KbMQm3lnVu2oNWxI9W/lcyzA+mCKF4DBikxb/+UWtOGRiFP8qEwAayIgIA
Ow==

--0__=09BBE53FDFF3D24F8f9e8a93df938690918c09BBE53FDF F3D24F
Content-type: image/gif;
name="ecblank.gif"
Content-Disposition: inline; filename="ecblank.gif"
Content-ID: <20__=09BBE53FDFF3D24F8f9e8a93df93@radisys.com>
Content-transfer-encoding: base64

R0lGODlhEAABAIAAAAAAAP///yH5BAEAAAEALAAAAAAQAAEAAAIEjI8ZBQA7

--0__=09BBE53FDFF3D24F8f9e8a93df938690918c09BBE53FDF F3D24F--



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:43 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0