https://bugs.openldap.org/show_bug.cgi?id=9510
Issue ID: 9510 Summary: Build fails with slibtool and --disable-shared with undefined pthread references Product: OpenLDAP Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: --- Component: build Assignee: bugs@openldap.org Reporter: orbea@riseup.net Target Milestone: ---
Created attachment 810 --> https://bugs.openldap.org/attachment.cgi?id=810&action=edit Build log with rdlibtool.
When building openldap with --disable-shared and slibtool (https://dev.midipix.org/cross/slibtool) the build fails with many undefined pthread references.
My understanding is that building static libraries exposes undefined references that otherwise would be exposed with -no-undefined. I am not sure how GNU libtool avoids this, perhaps it silently adds -lpthread? For the record GNU libtool will silently ignore -no-undefind while slibtool will not.
This exposes several related issues in openldap.
* libldap has no configure check indicating it requires --with-threads. * libldap does add $(LTHREAD_LIBS) to its $(LINK_LIBS), but then actually fails to use it. * The client tools requires threads, but they also have no configure check indicating so. * The client tools do not have a configure check to disable them, but there is a --without-threads. * The client tools really do needs $(LTHREAD_LIBS) added to the $(LINK_LIBS)
I made a MR that fixes these problems or see the attached patch.
https://git.openldap.org/openldap/openldap/-/merge_requests/303
https://bugs.openldap.org/show_bug.cgi?id=9510
--- Comment #1 from orbea@riseup.net --- Created attachment 811 --> https://bugs.openldap.org/attachment.cgi?id=811&action=edit https://git.openldap.org/openldap/openldap/-/merge_requests/303
Build fix patch that allows the build to succeed with either GNU libtool or slibtool when using --disable-shared.
https://bugs.openldap.org/show_bug.cgi?id=9510
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WONTFIX Status|UNCONFIRMED |RESOLVED
https://bugs.openldap.org/show_bug.cgi?id=9510
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED