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

undefined reference to `_ldap_int_resolv_mutex' compiling with Cygwin

I have Cygwin 1.3.170-1 and GCC 3.2-3 and OpenSSL-devel 0.9.6h-1 that I
installed today. I am trying to compile the libraries and tools only of
OpenLDAP 2.1.9, as I am building a Windows GUI application to handle
adding and removing user accounts via LDAP. I have made sure GNURegex
4.4-2 is installed as per the FAQ and I was configuring like this:

CFLAGS="-fno-common" ./configure --with-tls --disable-ldbm
--disable-slapd --disable-slurpd

I used '-fno-common' as I have already read posts (mainly MacOS X
related) saying this fixed the problem I am having. For me it has made
no difference with or without this flag.

To make I do:

make depend; make

This eventually comes back with this error:

gcc -fno-common -I../../include -I../../include -DLDAP_R_COMPILE
-DLDAP_LIBRARY -c version.c  -DDLL_EXPORT -DPIC -o .libs/version.lo
gcc -fno-common -I../../include -I../../include -DLDAP_R_COMPILE
-DLDAP_LIBRARY -c version.c -o version.o >/dev/null 2>&1
mv -f .libs/version.lo version.lo
/bin/sh /home/mgr/openldap-2.1.9/libtool  --mode=link gcc -fno-common
n-info 2:109:0 -rpath /usr/local/lib -o libldap_r.la threads.lo rdwr.lo
 thr_posix.lo thr_cthreads.lo thr_thr.lo thr_lwp.lo thr_nt.lo thr_pth.lo
b.lo bind.lo open.lo result.lo error.lo compare.lo search.lo controls.lo
s.lo references.lo extended.lo cyrus.lo modify.lo add.lo modrdn.lo
delete.lo aba
ndon.lo cache.lo sasl.lo sbind.lo kbind.lo unbind.lo filter.lo free.lo
sort.lo g
etdn.lo getentry.lo getattr.lo getvalues.lo addentry.lo request.lo
os-ip.lo url.
lo sortctrl.lo vlvctrl.lo init.lo options.lo print.lo string.lo
util-int.lo sche
ma.lo charray.lo tls.lo os-local.lo dnssrv.lo utf-8.lo utf-8-conv.lo
../../libraries/liblber/liblber.la    -lssl -lcrypto

*** Warning: This library needs some functionality provided by
*** I have the capability to make that library automatically link in
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin
shared l
rm -fr .libs/libldap_r.la .libs/libldap_r.* .libs/libldap_r.*
ar cru .libs/libldap_r.a  threads.o rdwr.o tpool.o thr_posix.o
thr_cthreads.o th
r_thr.o thr_lwp.o thr_nt.o thr_pth.o thr_stub.o bind.o open.o result.o
error.o c
ompare.o search.o controls.o messages.o references.o extended.o cyrus.o
 add.o modrdn.o delete.o abandon.o cache.o sasl.o sbind.o kbind.o
unbind.o filte
r.o free.o sort.o getdn.o getentry.o getattr.o getvalues.o addentry.o
os-ip.o url.o sortctrl.o vlvctrl.o init.o options.o print.o string.o
schema.o charray.o tls.o os-local.o dnssrv.o utf-8.o utf-8-conv.o
ranlib .libs/libldap_r.a
creating libldap_r.la
(cd .libs && rm -f libldap_r.la && ln -s ../libldap_r.la libldap_r.la)
gcc -fno-common -I../../include        -I../../include  -DLDAP_R_COMPILE
libldap     -c -o apitest.o apitest.c
/bin/sh /home/mgr/openldap-2.1.9/libtool --mode=link gcc -static
 -o apitest apitest.o libldap_r.la ../../libraries/liblber/liblber.la
aries/liblutil/liblutil.a   -lssl -lcrypto
gcc -fno-common -o apitest.exe apitest.o  ./.libs/libldap_r.a
 ../../libraries/liblutil/liblutil.a -lssl -lcrypto
./.libs/libldap_r.a(util-int.o)(.text+0x2c):util-int.c: undefined
reference to `
./.libs/libldap_r.a(util-int.o)(.text+0xa0):util-int.c: undefined
reference to `
./.libs/libldap_r.a(util-int.o)(.text+0xc0):util-int.c: undefined
reference to `
./.libs/libldap_r.a(util-int.o)(.text+0x142):util-int.c: undefined
reference to
collect2: ld returned 1 exit status
make[2]: *** [apitest] Error 1
make[2]: Leaving directory
make[1]: *** [all-common] Error 1
make[1]: Leaving directory `/home/mgr/openldap-2.1.9/libraries'
make: *** [all-common] Error 1

What else do I need to do to get this compiled?


Matt Ross