Subject: Re: libpthread busted?
To: Nathan J. Williams <>
From: Thor Lancelot Simon <>
List: tech-userlevel
Date: 03/05/2003 14:38:04
On Wed, Mar 05, 2003 at 01:49:34PM -0500, Nathan J. Williams wrote:
> > In other words, if there are Perl modules that may use threading, and
> > we want to support those modules at all, we need to link libpthread into
> > the Perl interpreter.
> The point of the problem is that the Perl SDL module does *not* use or
> export any of SDL's threading interfaces to the Perl interpreter and
> therefore has no need for libpthread.

I don't agree that it *matters* whether the caller uses a threading
interface; the threading interface is still present in the dynamically
loaded object, which from my point of view makes it clearly a bug to
try to load it from an executable that isn't linked to libpthread.

I also don't agree with Bill's contention that this means that we need
N different versions of every library or executable on the system.  What
it _really_ means, it seems to me, is quite simple: if you aren't linked
to libpthread, don't try to dynamically load code that contains thread
calls.  If you want to be able to dynamically load such code, even if
the main body of your program doesn't use threads, there is a simple way
to make it safe to do so: just link to libpthread in the first place and
it will all work fine.

 Thor Lancelot Simon	                            
   But as he knew no bad language, he had called him all the names of common
 objects that he could think of, and had screamed: "You lamp!  You towel!  You
 plate!" and so on.              --Sigmund Freud