[Samba] how to enable Active Directory support building samba on AIX?

Peter Waeckerle peter.waeckerle at ch.ibm.com
Tue Mar 4 10:46:51 MST 2014

I don't really understand (yet) the contence of config.log :- (
There are #undefine statements for ldap_init, but I have no idea why.

Why does configure say "ldap_initialize : not found" when even I can see it
 * in open.c:
ldap_init LDAP_P(( /* deprecated, use ldap_create or ldap_initialize */
        LDAP_CONST char *host,
        int port ));

ldap_open LDAP_P((      /* deprecated, use ldap_create or ldap_initialize
        LDAP_CONST char *host,
        int port ));

LDAP_F( int )
ldap_create LDAP_P((
        LDAP **ldp ));

LDAP_F( int )
ldap_initialize LDAP_P((
        LDAP **ldp,
        LDAP_CONST char *url ));

It IS there!!! Why does it not find it? - This slowly is driving me
crazy ;- ) It finds the other functions, why not init?
Or is this message wrong? Should it be "don't know how to handle" or
"function returned NULL or whatever"?

Anyway I've uploaded config.log to
https://bugzilla.samba.org/show_bug.cgi?id=10047 . I hope this is ok...

How do I set "-lldap -llber" correctly on LDFLAGS?

I have tried with
export LDFLAGS="-lldap -llber -L/usr/local/samba/samba-4.1.5/lib"

but I can't see any difference. Still the same error: "LDAP support ist not

Maybe you could also post your build commands for ldap. I still think there
may be something wrong with it.

Thanks and regards

From:	Mike Noonan <mike.p.noonan at gmail.com>
To:	Peter Waeckerle/Switzerland/IBM at IBMCH
Cc:	samba-technical at lists.samba.org
Date:	04.03.2014 16:21
Subject:	Re: [Samba] how to enable Active Directory support building
            samba on AIX?

Hi Peter,
Could you have a look in bin/config.log and see what the build error is?
It should find ldap_init
I'm also on 7.1 ML02 using xlc 12.1
However I have -lldap -llber set as well on  LDFLAGS

On Tue, Mar 4, 2014 at 1:54 PM, Peter Waeckerle <peter.waeckerle at ch.ibm.com
> wrote:

  unfortunatly I connot confirm that this patch works. Inserting the two
  lines with "headers='ldap.h...' does not make any difference.

  I'm using AIX 7.1 ML02, xlc 12.1.

  First I build openldap 2.4.39 into /usr/local/samba/samba-4.1.5. This
  to work correctly, there is no error with configure and make:

  ./configure --prefix=/usr/local/samba/samba-4.1.5 \
  --localstatedir=/var/samba/openldap \
            --mandir=/usr/local/samba/samba-4.1.5/man --with-threads=no \
            --enable-null --enable-dnssrv --enable-bdb=no \
            --enable-static --enable-backends=no

  Then I configure samba with:

  export LDFLAGS=-L/usr/local/samba/samba-4.1.5/lib
  export CFLAGS=-I/usr/local/samba/samba-4.1.5/include

  waf configure --prefix=/usr/local/samba/samba-4.1.5 \
            --sysconfdir=/usr/local/samba/conf \
            --localstatedir=/var/samba/smb \
            --mandir=/usr/local/samba/samba-4.1.5/man \
            --with-privatedir=/usr/local/samba/conf \
            --with-configdir=/usr/local/samba/conf \
            --with-piddir=/var/samba/smb/pids \
            --with-logfilebase=/var/samba/smb/logs \
            --with-ldap \

  configure DOES detect the library, it DOES detect the header files and
  the variables which it checks are OK. It just DOES NOT detect the init
  (ialize) functions, although all is present in ldap.h:

  Checking for header ldap.h   : yes
  Checking for header lber.h   : yes
  Checking for header ldap_pvt.h  : no
  Checking for ber_tag_t     : ok
  Checking for library lber  : yes
  Checking for ber_scanf    : ok
  Checking for ber_sockbuf_add_io     : ok
  Checking for variable LDAP_OPT_SOCKBUF    : ok
  Checking for variable LBER_OPT_LOG_PRINT_FN     : ok
  Checking for library ldap   : yes
  Checking for ldap_init        : not found
  Checking for ldap_init_fd : not found
  Checking for ldap_initialize  : not found
  Checking for ldap_set_rebind_proc : not found
  Checking for ldap_add_result_entry  : ok
  Checking whether ldap_set_rebind_proc takes 3 arguments   : ok
  Active Directory support not available: LDAP support ist not available.
  /usr/samba-4.1.5/source3/wscript:753: error: Active Directory support not
  found. Use --without-ads for building without Active Directory support.

  I suspect the init function somehow is not working correctly, but I don't
  know how to check.


  From:   Andrew Bartlett <abartlet at samba.org>
  To:     Christian Ambach <ambi at samba.org>
  Cc:     Mike Noonan <mike.p.noonan at gmail.com>,
              samba-technical at lists.samba.org, Jelmer Vernooij
              <jelmer at samba.org>, Peter Waeckerle/Switzerland/IBM at IBMCH
  Date:   03.03.2014 23:12
  Subject:        Re: [Samba] how to enable Active Directory support
              samba on AIX?
  Sent by:        samba-technical-bounces at lists.samba.org

  On Mon, 2014-03-03 at 21:55 +0100, Christian Ambach wrote:
  > Am 03.03.14 03:01, schrieb Andrew Bartlett:
  > > On Sun, 2014-03-02 at 19:12 +0100, Mike Noonan wrote:
  > >> Gents,
  > >> If that's not the way to do things please let me know.
  > >>
  > >> I suppose I'll become fairly active on this list as we are busy
  > >> getting samba 4.1.x to behave on AIX 7.1 using the native compiler.
  > >>
  > Is this the same issue as in Bug 10047?
  > (https://bugzilla.samba.org/show_bug.cgi?id=10047)
  > Maybe the CC list on that bug can help to verify the patch as I do not
  > have direct access to AIX machines any more and so it becomes kind of
  > unefficient when making educated guesses and asking somebody else to
  > verify if the attempt works out or not.
  > > Thanks!  Can you add your signed-off-by per
  > >
  > > https://wiki.samba.org/index.php/CodeReview
  > >
  > > Then I'll just wait on Christian's OK and we can get this merged.
  > > Thanks for helping to keep Samba portable!
  > I can give my ok, but it would be better to have reports from AIX users
  > that the problem is really solved before we include it.

  Indeed!  I wasn't aware you had moved out of the AIX world.


  Andrew Bartlett

  Andrew Bartlett
  Authentication Developer, Samba Team  http://samba.org
  Samba Developer, Catalyst IT

Mike Noonan
Mobile: +31 65 332 9220
Mike.P.Noonan at gmail.com

More information about the samba-technical mailing list