(Answer) (Category) OpenLDAP Faq-O-Matic : (Category) OpenLDAP Software FAQ : (Category) Installation : (Category) Platform Hints : (Category) Silicon Graphics IRIX : (Answer) How do I get OpenLDAP to compile --with-threads?
Getting the pthread stuff to compile and work properly under IRIX requires a
few things:

1. that you build Berekely DB with _SGI_MP_SOURCE defined (the package
   automatically does this for you).  I've found it works just fine with 2.3.6,
   2.4.14, and 2.6.4 (with the 10 patches).

2. you define CPPFLAGS="-D_SGI_MP_SOURCE -D_SGI_REENTRANT_FUNCTIONS".  SGI
   recommends these, but I can't remember where I read it.  It may have been
   in their technical documentation library (see http://www.sgi.com).

3. you explicitly add -lpthread during configure, or it won't find a few
   of the pthread_* functions that it should.  The reason behind this one is that
   libc.so has weak definitions for most of the pthread_* routines, but not
   all (notably pthread_kill, pthread_detach, pthread_join).  But they are
   defined (*all* routines), with a global binding.  So you want -lpthread.

Now, one thing to think about here is that all your programs will now be linked
with libpthread.so.

I've found that the only places you need to have -lpthread in the AC_LIBS line
are in these Makefiles:

        servers/slapd/Makefile
        servers/slapd/tools/Makefile
        servers/slurpd/Makefile

You'll still need to do #1-3 even if you don't bother with the Makefile stuff.

This will get threads to build properly under IRIX.
For IRIX64, 6.5.6 OpenLDAP 1.2.11.
If you set the following environment variables, you get a happy ldap
configure with threads:


CPPFLAGS=-D_SGI_MP_SOURCE -D_SGI_REENTRANT_FUNCTIONS
LIBS=-lpthread


This will give you an N32 slapd.
peter@gol.com
[Append to This Answer]
Previous: (Answer) Performance with ACLs is really horrible. What do I do?
This document is: http://www.openldap.org/faq/index.cgi?file=87
[Search] [Appearance]
This is a Faq-O-Matic 2.721.test.
© Copyright 1998-2013, OpenLDAP Foundation, info@OpenLDAP.org