Bug 3196 - [patch] Build fails with Solaris ldap library
Summary: [patch] Build fails with Solaris ldap library
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.20b
Hardware: All Solaris
: P3 normal
Target Milestone: none
Assignee: Tim Potter
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-19 10:32 UTC by Alex Deiter
Modified: 2005-11-22 10:14 UTC (History)
0 users

See Also:


Attachments
Proposed patch (5.70 KB, patch)
2005-10-19 10:53 UTC, Alex Deiter
no flags Details
Proposed patch for Samba-3.0.21pre1 (5.80 KB, patch)
2005-10-20 11:13 UTC, Alex Deiter
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Deiter 2005-10-19 10:32:29 UTC
Samba build fails with Solaris ldap library:

$ ./configure  --with-included-popt --with-ldap
...
checking for LDAP support... yes
checking ldap.h usability... yes
checking ldap.h presence... yes
checking for ldap.h... yes
checking lber.h usability... yes
checking lber.h presence... yes
checking for lber.h... yes
checking for ber_scanf in -llber... no
checking for ldap_init in -lldap... yes
checking for ldap_domain2hostlist... no
checking for ldap_set_rebind_proc... yes
checking whether ldap_set_rebind_proc takes 3 arguments... 3
checking for ldap_initialize... no
configure: error: libldap is needed for LDAP support

Thanks!
Comment 1 Alex Deiter 2005-10-19 10:53:43 UTC
Created attachment 1528 [details]
Proposed patch

This patch allow build samba with Solaris ldap library:

$ tar xzf samba-3.0.20b.tar.gz
$ cd samba-3.0.20b
$ patch -p1 < samba-solaris-ldap.patch
patching file source/configure.in
patching file source/include/config.h.in
patching file source/include/includes.h
patching file source/libads/ldap.c
patching file source/passdb/pdb_ldap.c
patching file source/passdb/pdb_nds.c
patching file source/utils/net_lookup.c
$ cd source
$ ./autogen.sh
./autogen.sh: running script/mkversion.sh
./script/mkversion.sh: 'include/version.h' created for Samba("3.0.20b")
./autogen.sh: running autoheader
./autogen.sh: running autoconf
Now run ./configure and then make.
$ ./configure --with-included-popt --with-ldap
...
checking for LDAP support... yes
checking ldap.h usability... yes
checking ldap.h presence... yes
checking for ldap.h... yes
checking lber.h usability... yes
checking lber.h presence... yes
checking for lber.h... yes
checking for ber_scanf in -llber... no
checking for ldap_init in -lldap... yes
checking for ldap_set_rebind_proc... yes
checking whether ldap_set_rebind_proc takes 3 arguments... 3
checking whether LDAP support is used... yes
checking for Active Directory and krb5 support... auto
checking for ldap_initialize... no
configure: WARNING: Active Directory Support requires ldap_initialize
checking for ldap_domain2hostlist... no
configure: WARNING: Active Directory Support requires ldap_domain2hostlist
checking for ldap_add_result_entry... no
configure: WARNING: Active Directory Support requires ldap_add_result_entry
checking whether to build experimental passdb libraries... no
...
Using libraries:
    LIBS = -lsendfile -lsec -lgen -lresolv -lsocket -lnsl -ldl
    LDAP_LIBS = -lldap
    AUTH_LIBS =
...
$ make
...
$ ldd bin/smbd
	libthread.so.1 =>	 /usr/lib/64/libthread.so.1
	libldap.so.5 =>  /usr/lib/64/libldap.so.5
	libsendfile.so.1 =>	 /usr/lib/64/libsendfile.so.1
	libsec.so.1 =>	 /usr/lib/64/libsec.so.1
	libgen.so.1 =>	 /usr/lib/64/libgen.so.1
	libresolv.so.2 =>	 /usr/lib/64/libresolv.so.2
	libsocket.so.1 =>	 /usr/lib/64/libsocket.so.1
	libnsl.so.1 =>	 /usr/lib/64/libnsl.so.1
	libdl.so.1 =>	 /usr/lib/64/libdl.so.1
	libc.so.1 =>	 /usr/lib/64/libc.so.1
	librt.so.1 =>	 /usr/lib/64/librt.so.1
	libmd5.so.1 =>	 /usr/lib/64/libmd5.so.1
	libmp.so.2 =>	 /usr/lib/64/libmp.so.2
	libaio.so.1 =>	 /usr/lib/64/libaio.so.1
	/usr/platform/SUNW,Sun-Fire-V210/lib/sparcv9/libc_psr.so.1
	/usr/platform/SUNW,Sun-Fire-V210/lib/sparcv9/libmd5_psr.so.1

Patch successfully tested on Solaris 9/04 + Sun ONE Directory Server 5.2.
Tested functions:

1. Domain controller with ldap passdb backend for Windows XP SP2.
2. net lookup|user|group 
3. pdbedit
4. smbpasswd
5. usrmgr.exe functions

Thanks!
Comment 2 Alex Deiter 2005-10-20 11:13:14 UTC
Created attachment 1530 [details]
Proposed patch for Samba-3.0.21pre1

Proposed patch for Samba-3.0.21pre1. Tested with Solaris 9/04 + Sun One
Directory Server 5.2.

Thanks a lot!
Comment 3 Gerald (Jerry) Carter (dead mail address) 2005-11-22 10:14:07 UTC
I'm checking the patch in but I really wonder how useful 
this is.