[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
-I./../libldap
-DLDAP_LIBRARY -c version.c  -DDLL_EXPORT -DPIC -o .libs/version.lo
gcc -fno-common -I../../include -I../../include -DLDAP_R_COMPILE
-I./../libldap
-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
-versio
n-info 2:109:0 -rpath /usr/local/lib -o libldap_r.la threads.lo rdwr.lo
tpool.lo
 thr_posix.lo thr_cthreads.lo thr_thr.lo thr_lwp.lo thr_nt.lo thr_pth.lo
thr_stu
b.lo bind.lo open.lo result.lo error.lo compare.lo search.lo controls.lo
message
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
version.lo
../../libraries/liblber/liblber.la    -lssl -lcrypto

*** Warning: This library needs some functionality provided by
../../libraries/l
iblber/liblber.la.
*** I have the capability to make that library automatically link in
when
*** 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
ibraries
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
modify.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
request.o
os-ip.o url.o sortctrl.o vlvctrl.o init.o options.o print.o string.o
util-int.o
schema.o charray.o tls.o os-local.o dnssrv.o utf-8.o utf-8-conv.o
version.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
-I./../
libldap     -c -o apitest.o apitest.c
/bin/sh /home/mgr/openldap-2.1.9/libtool --mode=link gcc -static
-fno-common
 -o apitest apitest.o libldap_r.la ../../libraries/liblber/liblber.la
../../libr
aries/liblutil/liblutil.a   -lssl -lcrypto
gcc -fno-common -o apitest.exe apitest.o  ./.libs/libldap_r.a
/home/mgr/openldap
-2.1.9/libraries/liblber/.libs/liblber.a
../../libraries/liblber/.libs/liblber.a
 ../../libraries/liblutil/liblutil.a -lssl -lcrypto
./.libs/libldap_r.a(util-int.o)(.text+0x2c):util-int.c: undefined
reference to `
_ldap_int_resolv_mutex'
./.libs/libldap_r.a(util-int.o)(.text+0xa0):util-int.c: undefined
reference to `
_ldap_int_resolv_mutex'
./.libs/libldap_r.a(util-int.o)(.text+0xc0):util-int.c: undefined
reference to `
_ldap_int_resolv_mutex'
./.libs/libldap_r.a(util-int.o)(.text+0x142):util-int.c: undefined
reference to
`_ldap_int_resolv_mutex'
collect2: ld returned 1 exit status
make[2]: *** [apitest] Error 1
make[2]: Leaving directory
`/home/mgr/openldap-2.1.9/libraries/libldap_r'
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?

Thanks,

Matt Ross