[PATCH] AIX Fix configure --with-ldap false negative
uri at samba.org
Tue Mar 1 07:24:52 UTC 2016
On 02/29/2016 10:54 PM, Guillaume G Taillon wrote:
> Configure can't find ldap_init, ldap_init_fd, ldap_initialize and
> ldap_set_rebind_proc but is able to find ldap.h, lber.h, etc.
> bin/config.log reveals that when it tries to compile their test, ld can't
> any of lber's symbols. Adding lber as a library in CHECK_FUNCS_IN fixes
> problem (see patch). I don't see why lber is required here, could this be
> openldap (2.4.43) that's not properly built?
RB+ me on this one.
I encountered this issue while using gcc to cross-compile. The test (and
later, samba build) links against libldap.so, and libldap has libber.so
as dependency. With gcc native linker, the linker automatically finds
this extra-dependency, but with a gcc cross-compiler, the linker doesn't
find it (even if -L is provided - it uses -L to search for libraries
specified by -l, but not for dependencies of those libraries).
The solution for gcc was the the -rpath-link flag (so for each dir d
specified by -L I would also add a flag -rpath-link=d, causing my
cross-linker to behave like a native one).
IIRC the older autoconf-based build system had switches for extra ldap libs.
I think that Samba depends specifically on OpenLDAP client libs in some
subtle ways (i.e. not on generic ldap, although it's a standardized
interface). Therefore we can modify the build system to link
specifically against -lldap and -llber.
> You might also want to close
> Guillaume Xavier Taillon
> AIX Sys Admin, Intern
> IBM Bromont
> gtaillon at ca.ibm.com
> De : Guillaume G Taillon/Bromont/IBM at IBMCA
> A : samba-technical at lists.samba.org
> Date : 02/29/2016 03:23 PM
> Objet : [PATCH] AIX Fix configure --with-ldap false negative
> Envoyé par : "samba-technical"
> <samba-technical-bounces at lists.samba.org>
More information about the samba-technical