Subject: Re: libpthread and static constructor order
To: J.T. Conklin <jtc@acorntoolworks.com>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: tech-userlevel
Date: 11/02/2007 12:40:06
On Fri, Nov 02, 2007 at 06:57:56AM -0700, J.T. Conklin wrote:
> 
> The ACE / TAO shared libraries were built with GNU libtool, and I
> discovered that libtool links the shared libraries with -nostdlib,
> even with -pthread the libpthread dependency was not recorded.

This is a bug in libfool.  If it is building libraries that depend on
other libraries, it must explicitly link in (well, record dependencies
for) all libraries on which the library it's building depends, and not
assume some other library linked into the unlucky executable that links
the libfool- generated library will *just happen* to properly record a
dependency on libpthread or libc (or libX11, or...).

Thor