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

Re: liblthread conflicts on HP-UX 10.20

At 04:24 PM 1/25/99 -0700, Jonathan B Ellis wrote:
>liblthread is conflicting with libpthreads in slapd:

Which version of pthreads?
Which version of OpenLDAP?
What configure options/environment settings are you using?
Is configure complaining?
What's the first error from a fresh make?

>/usr/local/pthreads/bin/pgcc [...] -llthread -lV3
>/bin/ld: Duplicate symbol "pthread_create" in files /tmp_mnt/auto/src/ldap/libraries/liblthread.a(thread.o) and /usr/local/pthreads/lib/libpthread.a(pthread.o)

I suspect ./configure did not like the pthread_create() in the
standard libraries and tried to -DNO_THREADS which mimics pthreads.

You can verify this by checking results in include/portable.h.

You might try to use gcc and passing the appropriate CPP and LDFLAGS
(but not the -lpthread) to configure.

passing -lpthread in LIBS should be avoided so that libraries can (if
possible) be built to support both threaded and non-threaded applications.

>(That it can't find the libldbm is another problem.)

Probably failed to compile.  

>I had this conflict with slurpd and removing -llthread from XLIBS fixed it,
>but apparently slapd actually uses liblthread.  (Go figure. :)

Not a good idea.

>Incidently, slapd/lock.c includes <ac/unistd.h>, which doesn't define
>the macros F_LOCK and F_ULOCK.  I copied those manually from <sys/unistd.h>.

They should be in <unistd.h> which is included by <ac/unistd.h> (on HP-UX 10.20,
per their man page). Your configuration must have gone astray.