Re: JPL Error With Thread.
[email protected] (Brian Jepson) Sat, 18 Sep 1999 18:24:52 -0400 (EDT)
| Newsgroups | perl.jpl |
|---|---|
| Message-ID | <Pine.LNX.4.10.9909181817200.1225-100000@cx384756-a.sking1.ri.home.com> |
On Fri, 17 Sep 1999, Larry Wall wrote: > I don't believe that mixing Java threads and Perl threads is supported > yet. If you compile Perl without the Perl threads, then it just uses > whatever Java thread happens to call it. I managed to mix a threaded Perl with a threaded Java on Solaris, mainly by moving -lthread to the front of the list of libraries when I linked Perl. Since I think (don't ask me where I got this idea, so don't quote me as any sort of authority) that libpthread.so is a wrapper around libthread.so, I think this might be OK. I am pretty sure I posted something about this to p5p (via [email protected]), but I don't follow p5p, so I'm not sure if there was any followup on it. In a nutshell, Sun recommends (er, demands) that you put -lthread first if you plan to call Java, because it includes some functions that override functions in libc. It looked to me like Perl was loading other libraries before libpthread, so the functions in libc weren't getting overwritten (which made me wonder if this might cause problems for Perl itself). But, I really don't know - I'm a novice when it comes to this stuff. In any case, there are instructions in the JPL README that let the AWT test in JNI/test.pl put up a java.awt.Frame on Solaris 7 (but perhaps this only works on one particular SPARC IPX sitting on one particular floor in one particular house in Kingston, RI :-) Brian Jepson * ([email protected]) * http://users.ids.net/~bjepson