I'm building the software in the "source" directory, entering the line "./configure --with-pam --without-nisplus --with-ldapsam --prefix=/usr/local/samba-numa --with-libiconv=/usr/local/include --with-quotas --with-libsmbclient". This invocation does not build the module "ldapsam.so" which will be needed while running smbd. When I try to compile this module, entering "make bin/ldapsam.so", many error messages appear: Compiling passdb/pdb_ldap.c with -fPIC passdb/pdb_ldap.c: In function `get_userattr_key2string': passdb/pdb_ldap.c:118: `SCHEMAVER_SAMBAACCOUNT' undeclared (first use in this function) passdb/pdb_ldap.c:118: (Each undeclared identifier is reported only once passdb/pdb_ldap.c:118: for each function it appears in.) passdb/pdb_ldap.c:119: `attrib_map_v22' undeclared (first use in this function) passdb/pdb_ldap.c:119: warning: return makes pointer from integer without a cast passdb/pdb_ldap.c:121: `SCHEMAVER_SAMBASAMACCOUNT' undeclared (first use in this function) passdb/pdb_ldap.c:122: `attrib_map_v30' undeclared (first use in this function) passdb/pdb_ldap.c:122: warning: return makes pointer from integer without a cast passdb/pdb_ldap.c:119: warning: unreachable code at beginning of switch statement passdb/pdb_ldap.c: In function `get_userattr_list': passdb/pdb_ldap.c:138: `SCHEMAVER_SAMBAACCOUNT' undeclared (first use in this function) passdb/pdb_ldap.c:139: `attrib_map_v22' undeclared (first use in this function) passdb/pdb_ldap.c:139: warning: return makes pointer from integer without a cast passdb/pdb_ldap.c:141: `SCHEMAVER_SAMBASAMACCOUNT' undeclared (first use in this function) passdb/pdb_ldap.c:142: `attrib_map_v30' undeclared (first use in this function) passdb/pdb_ldap.c:142: warning: return makes pointer from integer without a cast passdb/pdb_ldap.c:139: warning: unreachable code at beginning of switch statement passdb/pdb_ldap.c: In function `get_objclass_filter': passdb/pdb_ldap.c:161: `SCHEMAVER_SAMBAACCOUNT' undeclared (first use in this function) passdb/pdb_ldap.c:162: `LDAP_OBJ_SAMBAACCOUNT' undeclared (first use in this function) passdb/pdb_ldap.c:164: `SCHEMAVER_SAMBASAMACCOUNT' undeclared (first use in this function) passdb/pdb_ldap.c:165: `LDAP_OBJ_SAMBASAMACCOUNT' undeclared (first use in this function) passdb/pdb_ldap.c:162: warning: unreachable code at beginning of switch statement passdb/pdb_ldap.c: In function `ldapsam_search_suffix_by_sid': passdb/pdb_ldap.c:241: `LDAP_ATTR_USER_SID' undeclared (first use in this function) .....etc..... This results in an error ending and the module is not built.
This builds fine on my RH Linux box (OpenLDAP 2.1 libs). The errors you site would be caused if ldap support is not detected during the build. What server platform is this? what is the output from `smb -b | grep LDAP` ?
Many thanks, Jerry, for your comments. While looking to config.log, I was able to confirm your suspicion about the non recognition of the LDAP installation. I have set the environment variable LD_LIBRARY_PATH and I have run "./configure" with the same arguments as mentioned previously. Now, the LDAP installation was recognized. After running "make" the ldapsam.so module was not built as previously. I have added "bin/ldapsam.so" in the "PDB_MODULES =" line. Now the module can be built. I'm continuing to test with the now running software. Thanks again Jerry !
configure error with libraries. Closing.
IMHO, I think that the matter cannot be considered closed at the present time. It is the job of the "./configure" call to determine, in some limits, which components are available and where they are located. In the case I have encountred, these components are all located on very common places. I think the "./configure" call should be able to locate them there. It probably have done it but further it was not able to run some tests because the LD_LIBRARY_PATH environment variable was not set right. Although this variable is a very ugly Solaris related matter, I think that it is part of the job of the "./configure" call to set it right before running some tests. Further I think that the "./configure" call should not silently ignore such errors when "--with-ldapsam" is set as argument to the call. Further I think that it is the job of this procedure to set the "PDB_MODULES =" line, in the Makefile, in the right manner and, in the case of the "--with-ldapsam" argument, "bin/ldapsam.so" is required. Right ?
database cleanup