Issue 3290 - libldap builds without thread libraries
Summary: libldap builds without thread libraries
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-19 01:06 UTC by torsten@debian.org
Modified: 2009-02-17 05:26 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description torsten@debian.org 2004-08-19 01:06:11 UTC
Full_Name: Torsten Landschoff
Version: CVS HEAD
OS: Debian unstable
URL: http://people.debian.org/~torsten/patches/openldap/linkthread_266688.diff
Submission from: (NULL) (217.186.154.28)


As noted in Debian bug #266688 the libldap library contains symbols from
libpthread but is not linked against the thread libraries. The problem still
exists in CVS HEAD as of today. 

The simple diff follows and is available for download:

Index: Makefile.in
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/Makefile.in,v
retrieving revision 1.71
diff -u -r1.71 Makefile.in
--- Makefile.in 16 Mar 2004 16:44:34 -0000      1.71
+++ Makefile.in 19 Aug 2004 01:01:46 -0000
@@ -47,7 +47,7 @@
 XLIBS = $(LIBRARY) $(LDAP_LIBLBER_LA) $(LDAP_LIBLUTIL_A)
 XXLIBS = $(SECURITY_LIBS) $(LUTIL_LIBS)
 NT_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
-UNIX_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
+UNIX_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
$(LTHREAD_LIBS)
 
 apitest:       $(XLIBS) apitest.o
        $(LTLINK) -o $@ apitest.o $(LIBS)

Greetings, 
  Torsten

Comment 1 Kurt Zeilenga 2004-08-19 05:56:19 UTC
At 03:06 AM 8/19/2004, torsten@debian.org wrote:
>Full_Name: Torsten Landschoff
>Version: CVS HEAD
>OS: Debian unstable
>URL: http://people.debian.org/~torsten/patches/openldap/linkthread_266688.diff
>Submission from: (NULL) (217.186.154.28)
>
>
>As noted in Debian bug #266688 the libldap library contains symbols from
>libpthread but is not linked against the thread libraries.

Which symbols?

>The problem still exists in CVS HEAD as of today. 
>
>The simple diff follows and is available for download:

A more appropriate fix would be to remove the dependencies.
-lldap should not have any dependencies on POSIX thread
facilities. 

Comment 2 Howard Chu 2004-08-19 06:21:52 UTC
libldap does not use any thread functions at all. I see no references to 
any pthread functions in any of my builds of libldap. Perhaps you mean 
libldap_r. Please provide more substantial evidence of any problem here. 
Otherwise, I can only conclude that your Debian package is built 
incorrectly.

torsten@debian.org wrote:

>Full_Name: Torsten Landschoff
>Version: CVS HEAD
>OS: Debian unstable
>URL: http://people.debian.org/~torsten/patches/openldap/linkthread_266688.diff
>Submission from: (NULL) (217.186.154.28)
>
>
>As noted in Debian bug #266688 the libldap library contains symbols from
>libpthread but is not linked against the thread libraries. The problem still
>exists in CVS HEAD as of today. 
>
>The simple diff follows and is available for download:
>
>Index: Makefile.in
>===================================================================
>RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/Makefile.in,v
>retrieving revision 1.71
>diff -u -r1.71 Makefile.in
>--- Makefile.in 16 Mar 2004 16:44:34 -0000      1.71
>+++ Makefile.in 19 Aug 2004 01:01:46 -0000
>@@ -47,7 +47,7 @@
> XLIBS = $(LIBRARY) $(LDAP_LIBLBER_LA) $(LDAP_LIBLUTIL_A)
> XXLIBS = $(SECURITY_LIBS) $(LUTIL_LIBS)
> NT_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
>-UNIX_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
>+UNIX_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
>$(LTHREAD_LIBS)
> 
> apitest:       $(XLIBS) apitest.o
>        $(LTLINK) -o $@ apitest.o $(LIBS)
>
>Greetings, 
>  Torsten
>
>
>  
>


-- 
  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support

Comment 3 Torsten Landschoff 2004-08-19 15:54:51 UTC
Hi Howard, 

On Wed, Aug 18, 2004 at 11:21:52PM -0700, Howard Chu wrote:
> libldap does not use any thread functions at all. I see no references to 
> any pthread functions in any of my builds of libldap. Perhaps you mean 
> libldap_r. Please provide more substantial evidence of any problem here. 
> Otherwise, I can only conclude that your Debian package is built 
> incorrectly.

I just found the culprit. The gnutls support code uses pthread
functions. Sorry for the fuss...

Greetings

	Torsten

Comment 4 Howard Chu 2004-08-19 19:38:41 UTC
changed state Open to Closed
Comment 5 Howard Chu 2009-02-17 05:26:56 UTC
moved from Incoming to Archive.Incoming