[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#4982) link libldap_r explicitly with the threading libraries

libtool should properly handle -pthread.  If it doesn't, that should be
fixed instead of kludging things up with -lpthread.  -pthread tells gcc
to do the right thing.  The right thing might not be to link in - 
(On some versions of FreeBSD, the right think is -lc_r.)  -pthread also
might do more than link in a library.

As OpenLDAP includes its own copy of libtool, a local fix can be  
until the upstream fixes it right.

-- Kurt

On May 24, 2007, at 1:25 AM, rra@stanford.edu wrote:

> Hallvard B Furuseth <h.b.furuseth@usit.uio.no> writes:
>> Hallvard B Furuseth writes:
>>> Is this the second half of the Debian patch you posted in  
>>> ITS#4981 - so
>>> it'd be wrong to apply one one of these patches?
>> Sorry, "wrong to apply _only_ one of".
>> (I.e. does ITS#4981 introduce breakage which ITS#4982 fixes?)  Maybe
>> everything worked well before we switched to libtool...
> No, they should be independent, I think.  I believe that the  
> rationale for
> 4982 is still correct; if you use pthread functions, you need to
> explicitly link against the library to avoid getting unversioned
> references.  Unversioned references will *normally* not cause a  
> problem,
> so they're a bit of a time bomb.  They keep working fine right up  
> until
> the library makes an incompatible change in the data structures,  
> and then
> they break.
> -- 
> Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/ 
> ~eagle/>