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

Building in IRIX (ITS#1879)

Full_Name: Jose R. Valverde
Version: 2.1.2
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (

Configuring OpenLDAP 2.1.2 under IRIX fails to find pthread_detach.
Using LDFLAGS "-lpthread" doesn't help. The problem can be reproduced
(and understood) by repeating the "configure" steps on the command line:

configure compiles conftest.c with

[g]cc -o conftest -g -O2 -I/usr/local/include -D_SGI_MP_SOURCE \
-D_SGI_REENTRANT_FUNCTIONS  -lpthread conftest.c

which fails. The reason is that -lpthread should appear AFTER conftest.c
to resolve the symbol: manually issuing

[g]cc -o conftest -g -O2 -I/usr/local/include -D_SGI_MP_SOURCE \
-D_SGI_REENTRANT_FUNCTIONS  conftest.c -lpthread

resolves correctly.

I've just hardcoded (via an if [1]) the answer as a quick fix for me, but
a better approach would be making $ac_link use the correct order (i.e. 
substituting LDFLAGS _after_ the test source to compile.

I'm not all through yet, let's see what else might pop up. I'll keep you

Thanks for such a wonderful package.