[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: Bind Fails on AIX 5.1 due to getaddrinfo parm



Using the configure command that Howard suggested:

    CC=xlc_r                          \
    CPPFLAGS="-I/usr/local/include    \
        -I/usr/local/ssl/include      \
        -I/usr/local/BerkeleyDB.4.2/include" \
    LDFLAGS="-L/usr/local/ssl/lib     \
             -L/usr/local/lib         \
             -L/usr/local/BerkeleyDB.4.2/lib" \
    MKDEP=/dnload/ldap_dir/openldap-2.2.13/build/mkdep.aix \
    ac_cv_func_getaddrinfo=no         \
    ./configure --with-cyrus-sasl     \
            --enable-bdb              \
            --with-kerberos           \
            --disable-shared          \
            --enable-static           \
            --disable-ipv6 

test000 runs successfully.

Thanks,
-tony
-----Original Message-----
From: Howard Chu [mailto:hyc@symas.com] 
Sent: Wednesday, August 11, 2004 11:36 PM
To: Bennett, Tony - CNF
Cc: OpenLDAP-software@OpenLDAP.org
Subject: Re: Bind Fails on AIX 5.1 due to getaddrinfo parm

Bennett, Tony - CNF wrote:

> I just downloaded, configured, and built openLdap 2.2.13 on an AIX 5.1

> system.  The configuration directives were as follows (which I used 
> successfully on 2.1.30):
>         CC=xlc_r        \
>         CPPFLAGS="-I/usr/local/include \
>                   -I/usr/local/ssl/include \
>                   -I/usr/local/BerkeleyDB.4.2/include" \
>             LDFLAGS="-L/usr/local/ssl/lib     \
>                      -L/usr/local/lib \
>                      -L/usr/local/BerkeleyDB.4.2/lib" \
>             MKDEP=/dnload/ldap_dir/openldap-2.1.30/build/mkdep.aix \
>         ./configure --with-cyrus-sasl  \
>                     --enable-bdb       \
>                     --with-kerberos    \
>                     --disable-shared   \
>                     --enable-static    \
>                     --disable-ipv6
> 
> When running "make test", I failed with a bind error
"test000-rootdse".
> 
> The ldapsearch.out file shows the following (when I add a "-d 247" 
> argument):
>         ldap_create
>         ldap_url_parse_ext(ldap://localhost:9011)
>         ldap_bind_s
>         ldap_simple_bind_s
>         ldap_sasl_bind_s
>         ldap_sasl_bind
>         ldap_send_initial_request
>         ldap_new_connection
>         ldap_int_open_connection
>         ldap_connect_to_host: TCP localhost:9011
>         ldap_connect_to_host: getaddrinfo failed: Invalid flags in
hints
>         ldap_perror
>         ldap_bind: Can't contact LDAP server (-1)
> 
> The message "Invalid flags in hints" means the hints.ai_flags contains

> an invalid value.
> hints is an argument to getaddrinfo().
> 
> The source file "./libraries/libldap/os-ip.c" sets hints.ai_flags to 
> "AI_ADDRCONFIG".
> 
> If I comment out that line, rebuild, and retest... then the test 
> completes successfully.
> 
> -tony
> 
Hm, I think I ran into this recently as well. getaddrinfo() on AIX
appears to be rather broken, the easiest fix is to tell configure not to
use it. Set ac_cv_func_getaddrinfo=no when running configure.

-- 
   -- Howard Chu
   Chief Architect, Symas Corp.       Director, Highland Sun
   http://www.symas.com               http://highlandsun.com/hyc
   Symas: Premier OpenSource Development and Support