Bug 690 - Cannot build ldapsam.so
Summary: Cannot build ldapsam.so
Status: RESOLVED INVALID
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.0
Hardware: All Solaris
: P3 normal
Target Milestone: none
Assignee: Gerald (Jerry) Carter (dead mail address)
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-27 23:39 UTC by Claude Frantz
Modified: 2005-11-14 09:28 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Claude Frantz 2003-10-27 23:39:40 UTC
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.
Comment 1 Gerald (Jerry) Carter (dead mail address) 2003-11-04 19:51:46 UTC
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` ?
Comment 2 Claude Frantz 2003-11-06 06:01:00 UTC
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 !
Comment 3 Gerald (Jerry) Carter (dead mail address) 2003-11-06 06:29:53 UTC
configure error with libraries.  Closing.
Comment 4 Claude Frantz 2003-11-10 00:59:28 UTC
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 ?
Comment 5 Gerald (Jerry) Carter (dead mail address) 2005-11-14 09:28:34 UTC
database cleanup