(Answer) (Category) OpenLDAP Faq-O-Matic : (Category) Trash : (Answer) Enabling pthreads
To compile OpenLDAP on OpenBSD 2.6 with pthreads support enabled, you must add the '-pthread' option into the 'configure' script when it calls gcc. Otherwise, the script will fail, telling you that you don't have pthread support (or that your pthread version is unknown).
On lines 3779, 3825, 3847: insert '-pthread' after '$ac_cpp'
then do a 'CFLAGS=-pthread ./configure --with-threads'
gmake tends to be more agreeable in this case than the standard BSD make when you build the binaries.

tom@foundation.umsl.edu
There is an easier way to enable the use of pthreads on OpenBSD that doesn't involve modifying the configure script:
1.) Set the CPPFLAGS environment variable to '-pthread'
        # export CPPFLAGS=-pthread
2.) Run the configure script with the '--with-threads' option.
        # ./configure --with-threads
That's all there is too it. All the binaries and libraries will compile and link with no errors or warnings about threads at all.
adam.reece@cgi.ca
[Append to This Answer]
This document is: http://www.openldap.org/faq/index.cgi?file=338
[Search] [Appearance]
This is a Faq-O-Matic 2.721.test.
© Copyright 1998-2013, OpenLDAP Foundation, info@OpenLDAP.org