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

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

Full_Name: Russ Allbery
Version: 2.3.35
OS: Debian
Submission from: (NULL) (

Since 2.2.23, Debian has been carrying the following patch to the libldap_r
build process to explicitly link the library against the thread libraries.  The
comment at the time is:

  * libraries/libldap_r/Makefile.in: Code that uses pthreads *must* be
    linked with -pthread, even if it's a library; without this, the
    libldap_r library ends up with dangling unversioned reference to
    pthread_create() which gets resolved to a wrong version that causes
    segfaults on 64-bit platforms.  Closes: #304549.

See http://bugs.debian.org/304549 for the specific problems that this caused.

--- openldap2.3-2.3.11~/libraries/libldap_r/Makefile.in 2005-12-01
13:48:50.000000000 +0100
+++ openldap2.3-2.3.11/libraries/libldap_r/Makefile.in  2005-12-02
10:05:17.637342000 +0100
@@ -56,7 +56,7 @@
 .links : Makefile
        @for i in $(XXSRCS); do \