Use

   strace -f -e trace=file <program>

to see what file activity there is. Also make sure that your library is
actually being found with

   ldd <program>

(Looks like it is.)

--- Vladimir

--------
Vladimir G. Ivanovic                        http://leonora.org/~vladimir
2770 Cowper St.                                         [EMAIL PROTECTED]
Palo Alto, CA 94306-2447                                 +1 650 678 8014

"WQ" == William Quan <William> writes:

  WQ> This message is in MIME format. Since your mail reader does not understand
  WQ> this format, some or all of this message may not be legible.

  WQ> ------_=_NextPart_001_01C1ECB0.FB7C9690
  WQ> Content-Type: text/plain;
  WQ>   charset="iso-8859-1"

  WQ> Juergen,
  WQ> Thanks for your help. 

  WQ> The LD_DEBUG shows the following:
  WQ>   31212:  symbol=putpmsg;  lookup in file=/lib/libc.so.6
  WQ>   31212:  binding file /home/imslab/jets1000dev/dlpi/libdlpi.so to
  WQ> /lib/libc.so.6: symbol `putpmsg'
  WQ>   do_attach: put_msg(): Function not implemented
  WQ> This is exactly as predicted. 

  WQ> However, when I attempt to do the command: 'LD_PRELOAD=/usr/lib/libLiS.so
  WQ> ... java'
  WQ> The process hangs(long pause and no sign of completion in sight)- so i kill
  WQ> the process.
  WQ> Q3.)Any ideas as to what might be the cause for this hangup using
  WQ> LD_PRELOAD?

  WQ> Q4.)How do I build my own startup program for the linux JVM, linked against
  WQ> libLiS.so ??
  WQ> This sounds like I need to rebuild the java executable? Am I understanding
  WQ> you correctly?


  WQ> -----Original Message-----
  WQ> From: Juergen Kreileder [mailto:[EMAIL PROTECTED]]
  WQ> Sent: Thursday, April 25, 2002 4:37 PM
  WQ> To: Quan, William [NGC:B866:EXCH]
  WQ> Cc: '[EMAIL PROTECTED]'
  WQ> Subject: Re: Linux JVM: JNI allow putmsg() syscalls in native code?


  WQ> William Quan <[EMAIL PROTECTED]> writes:

  >> Q1.) Why is the JVM eclipsing my getmsg() and putmsg() syscalls with
  >> this from libc?

  WQ> This not Java specific, you'll get the same problem when dlopening a
  WQ> library which is linked against libLiS.so.  The first getmsg which
  WQ> gets found is from libc.
  WQ> If you set LD_DEBUG=symbols,bindings you can see what's happening.
  WQ> (E.g. "LD_DEBUG=symbols,bindings java ... 2>&1 | grep getmsg")

  WQ> In order to get getmsg() from libLiS.so you either have to set
  WQ> LD_PRELOAD=libLiS.so or create a new startup program (which you'll use
  WQ> instead of "java") that is linked with libLiS.so.

  >> Q2.) Does the following restriction apply to the linux 1.3.1 (native
  >> threads)?

  WQ> No, the restriction only applies to the green threads VM.  


  WQ>         Juergen

  WQ> -- 
  WQ> Juergen Kreileder, Blackdown Java-Linux Team
  WQ> http://www.blackdown.org/java-linux.html
  WQ> Run Java 2 SE v1.3.1 on your iPAQ:
  WQ> http://www.handhelds.org/pipermail/ipaq/2001-June/007221.html

  WQ> ------_=_NextPart_001_01C1ECB0.FB7C9690
  WQ> Content-Type: text/html;
  WQ>   charset="iso-8859-1"
  WQ> Content-Transfer-Encoding: quoted-printable

  WQ> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
  WQ> <HTML>
  WQ> <HEAD>
  WQ> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
  WQ> charset=3Diso-8859-1">
  WQ> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
  WQ> 5.5.2654.89">
  WQ> <TITLE>RE: Linux JVM: JNI allow putmsg() syscalls in native =
  WQ> code?</TITLE>
  WQ> </HEAD>
  WQ> <BODY>

  WQ> <P><FONT SIZE=3D2>Juergen,</FONT>
  WQ> <BR><FONT SIZE=3D2>Thanks for your help. </FONT>
  WQ> </P>

  WQ> <P><FONT SIZE=3D2>The LD_DEBUG shows the following:</FONT>
  WQ> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
  WQ> SIZE=3D2>31212:&nbsp; symbol=3Dputpmsg;&nbsp; lookup in =
  WQ> file=3D/lib/libc.so.6</FONT>
  WQ> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
  WQ> SIZE=3D2>31212:&nbsp; binding file =
  WQ> /home/imslab/jets1000dev/dlpi/libdlpi.so to /lib/libc.so.6: symbol =
  WQ> `putpmsg'</FONT>
  WQ> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
  WQ> SIZE=3D2>do_attach: put_msg(): Function not implemented</FONT>
  WQ> <BR><FONT SIZE=3D2>This is exactly as predicted. </FONT>
  WQ> </P>

  WQ> <P><FONT SIZE=3D2>However, when I attempt to do the command: =
  WQ> 'LD_PRELOAD=3D/usr/lib/libLiS.so ... java'</FONT>
  WQ> <BR><FONT SIZE=3D2>The process hangs(long pause and no sign of =
  WQ> completion in sight)- so i kill the process.</FONT>
  WQ> <BR><FONT SIZE=3D2>Q3.)Any ideas as to what might be the cause for this =
  WQ> hangup using LD_PRELOAD?</FONT>
  WQ> </P>

  WQ> <P><FONT SIZE=3D2>Q4.)How do I build my own startup program for the =
  WQ> linux JVM, linked against libLiS.so ??</FONT>
  WQ> <BR><FONT SIZE=3D2>This sounds like I need to rebuild the java =
  WQ> executable? Am I understanding you correctly?</FONT>
  WQ> </P>
  WQ> <BR>

  WQ> <P><FONT SIZE=3D2>-----Original Message-----</FONT>
  WQ> <BR><FONT SIZE=3D2>From: Juergen Kreileder [<A =
  WQ> HREF=3D"mailto:[EMAIL PROTECTED]";>mailto:[EMAIL PROTECTED]</A>]</FONT>
  WQ> <BR><FONT SIZE=3D2>Sent: Thursday, April 25, 2002 4:37 PM</FONT>
  WQ> <BR><FONT SIZE=3D2>To: Quan, William [NGC:B866:EXCH]</FONT>
  WQ> <BR><FONT SIZE=3D2>Cc: '[EMAIL PROTECTED]'</FONT>
  WQ> <BR><FONT SIZE=3D2>Subject: Re: Linux JVM: JNI allow putmsg() syscalls =
  WQ> in native code?</FONT>
  WQ> </P>
  WQ> <BR>

  WQ> <P><FONT SIZE=3D2>William Quan &lt;[EMAIL PROTECTED]&gt; =
  WQ> writes:</FONT>
  WQ> </P>

  WQ> <P><FONT SIZE=3D2>&gt; Q1.) Why is the JVM eclipsing my getmsg() and =
  WQ> putmsg() syscalls with</FONT>
  WQ> <BR><FONT SIZE=3D2>&gt; this from libc?</FONT>
  WQ> </P>

  WQ> <P><FONT SIZE=3D2>This not Java specific, you'll get the same problem =
  WQ> when dlopening a</FONT>
  WQ> <BR><FONT SIZE=3D2>library which is linked against libLiS.so.&nbsp; The =
  WQ> first getmsg which</FONT>
  WQ> <BR><FONT SIZE=3D2>gets found is from libc.</FONT>
  WQ> <BR><FONT SIZE=3D2>If you set LD_DEBUG=3Dsymbols,bindings you can see =
  WQ> what's happening.</FONT>
  WQ> <BR><FONT SIZE=3D2>(E.g. &quot;LD_DEBUG=3Dsymbols,bindings java ... =
  WQ> 2&gt;&amp;1 | grep getmsg&quot;)</FONT>
  WQ> </P>

  WQ> <P><FONT SIZE=3D2>In order to get getmsg() from libLiS.so you either =
  WQ> have to set</FONT>
  WQ> <BR><FONT SIZE=3D2>LD_PRELOAD=3DlibLiS.so or create a new startup =
  WQ> program (which you'll use</FONT>
  WQ> <BR><FONT SIZE=3D2>instead of &quot;java&quot;) that is linked with =
  WQ> libLiS.so.</FONT>
  WQ> </P>

  WQ> <P><FONT SIZE=3D2>&gt; Q2.) Does the following restriction apply to the =
  WQ> linux 1.3.1 (native</FONT>
  WQ> <BR><FONT SIZE=3D2>&gt; threads)?</FONT>
  WQ> </P>

  WQ> <P><FONT SIZE=3D2>No, the restriction only applies to the green threads =
  WQ> VM.&nbsp; </FONT>
  WQ> </P>
  WQ> <BR>

  WQ> <P><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
  WQ> Juergen</FONT>
  WQ> </P>

  WQ> <P><FONT SIZE=3D2>-- </FONT>
  WQ> <BR><FONT SIZE=3D2>Juergen Kreileder, Blackdown Java-Linux Team</FONT>
  WQ> <BR><FONT SIZE=3D2><A HREF=3D"http://www.blackdown.org/java-linux.html"; =
  WQ> TARGET=3D"_blank">http://www.blackdown.org/java-linux.html</A></FONT>
  WQ> <BR><FONT SIZE=3D2>Run Java 2 SE v1.3.1 on your iPAQ:</FONT>
  WQ> <BR><FONT SIZE=3D2><A =
  WQ> HREF=3D"http://www.handhelds.org/pipermail/ipaq/2001-June/007221.html"; =
  WQ> TARGET=3D"_blank">http://www.handhelds.org/pipermail/ipaq/2001-June/0072=
  WQ> 21.html</A></FONT>
  WQ> </P>

  WQ> </BODY>
  WQ> </HTML>
  WQ> ------_=_NextPart_001_01C1ECB0.FB7C9690--


  WQ> ----------------------------------------------------------------------
  WQ> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
  WQ> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to