I'm compiling samba a24 (and CVS, 8:00 GMT, 05/26) in Debian 3.0 (2.4.18, gcc version egcs-2.92.11)UltraSparc IIi. ./configure --with-ldapsam The system has an openldap 2.0.27 compiled, installed and *heavily* tested, also with the ldd. At last, the only way to generate a configure/Makefile that includes the ldap support was two fixes to the "configure.in": diff -u configure.in-DIST configure.in --- configure.in-DIST Sat May 24 11:38:07 2003 +++ configure.in Mon May 26 10:12:31 2003 @@ -2301,13 +2301,13 @@ AC_MSG_RESULT($with_ldap_support) if test x"$with_ldap_support" = x"yes"; then -ac_save_LIBS="$LIBS" +ac_save_LIBS="$LIBS -lresolv" LIBS="" ################################################################## # we might need the lber lib on some systems. To avoid link errors # this test must be before the libldap test - AC_CHECK_LIB(lber, ber_scanf, [LIBS="$LIBS -llber"]) + AC_CHECK_LIB(lber, ber_scanf, [LIBS="$LIBS -llber -lresolv"]) ######################################################## # now see if we can find the ldap libs in standard paths
Can you send some more debugging info on what is happening? I can't reproduce this on my debian system here. From config.log: configure:22811: checking for ber_scanf in -llber configure:22844: gcc -o conftest -g -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/usr/include -Wl,-rpath,/usr/lib conftest.c -llber >&5configure:22847: $? = 0 configure:22850: test -s conftest configure:22853: $? = 0 configure:22864: result: yes I have the following openldap packages installed: ii libldap2 2.0.27-4 OpenLDAP libraries (without TLS support). ii libldap2-dev 2.0.27-4 OpenLDAP development libraries.
Upon further review of the autoconf code, it looks like -lresolv should be added to the library list at a very early stage. There should be a line like: checking for dn_expand in -lresolv... yes Do you get this? I wonder if your libresolv doesn't contain dn_expand???
I've worked out why this isn't working. It's because in the Kerberos detection code the LIBS variables is set to "" while the detection is occuring. I'll try and test up and commit a fix tomorrow.
This should be fixed now but I don't have a system to check it on.
Whoops - my last message was entered in the wrong bug. I'm still working on a fix for this. Sorry.
Created attachment 36 [details] configure.in patch Here's a patch which should fix the problem. It was a similar bug to one of the Kerberos configure.in problems. Let me know how it goes!
Created attachment 39 [details] better ldap,krb5 and ads detection
this patch should fix this problem and adds better ldap,krb5 and ads autodetection... it also removes ADSLIBS from Makefile.in we should only use LDAPLIBS and KRB5LIBS this is much easier logic! It would be good if this would be tested on different platforms and old and new heimdal and MIT krb5 implementations. For me it works, but I don't want to introduce new bugs... metze
Created attachment 40 [details] better krb5 ldap detection
here's a new diff as the last has also other stuff in it :-( metze
I tested (2.4.18, gcc egcs-2.92.11)UltraSparc IIi with the CVS (03/07/14, 11:47 GMT) as ./configure --with-quotas --prefix=/usr/local/etc2/samba_3 --with-ldapsam" -- with openldap-2.0.27 don't make the ldapsam's build "... pdb_ldap... no" -- with openldap-2.1.22 does: "checking how to build pdb_ldap... static"
I've checked in Metze's latest patch. Does this work for you Ignacio?
With the CVS 8:30 GMT builds the ldapsam stuff ok: "checking how to build pdb_ldap... static" libs: libldap*.so.2.0.17 liblber.so.2.0.17 Thanks
Cool - I'm glad this is finally sorted out.
originally reported against 3.0aph24. Bugzilla spring cleaning. Removing old alpha versions.
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.