On Sat, Nov 26, 2005, Adam D. Morley wrote:

> checking for ldap_initialize... no
> configure: error: libldap is needed for LDAP support
> error: Bad exit status from /opt/openpkg/RPM/TMP/rpm-tmp.19697 (%build)
>
> RPM build errors:
>     Bad exit status from /opt/openpkg/RPM/TMP/rpm-tmp.19697 (%build)
>
> This is on:
> bash-3.00# uname -a
> SunOS tester 5.10 Generic_118822-20 sun4u sparc SUNW,UltraAX-i2
>
> config.log is attached.  What's odd is when I try and build the conftest
> program manually, I see:
>
> bash-3.00# /opt/openpkg/bin/cc -o conftest -O2 -pipe -D_SAMBA_BUILD_
> -I/opt/openpkg/include -I/opt/openpkg/include/openssl
> -DOPENSSL_DISABLE_OLD_DES_SUPPORT -D_LARGEFILE_SOURCE -D_REENTRANT
> -D_FILE_OFFSET_BITS=64 -L/opt/openpkg/lib -lthread conftest.c -llber
> -lsec -lresolv -lsocket -lnsl
> /var/tmp//ccWaRY05.o: In function `main':
> conftest.c:(.text+0x4): undefined reference to `ldap_initialize'
> conftest.c:(.text+0xc): undefined reference to `ldap_initialize'
> /var/tmp//ccWaRY05.o:(.data+0x0): undefined reference to
> `ldap_initialize'
> collect2: ld returned 1 exit status
>
> Which makes me go, "Hmm," especially since:
>
> bash-3.00# ls -l /opt/openpkg/lib/libldap*
> -rw-r--r--   1 opkg     opkg      304432 Nov 24 11:23
> /opt/openpkg/lib/libldap.a-rw-r--r--   1 opkg     opkg         896 Nov
> 24 11:25 /opt/openpkg/lib/libldap.la
> -rw-r--r--   1 opkg     opkg      338668 Nov 24 11:23
> /opt/openpkg/lib/libldap_r.a
> -rw-r--r--   1 opkg     opkg         902 Nov 24 11:25
> /opt/openpkg/lib/libldap_r.la

Well, the library is named libldap, hence a "-lldap" is needed.
The "-llber" is for the companion library liblber.a only.
Your problem actually is:

> [...]
> configure:30075: checking for ldap_init in -lldap
> configure:30103: /opt/openpkg/bin/cc -o conftest -O2 -pipe -D_SAMBA_BUILD_ 
> -I/opt/openpkg/include -I/opt/openpkg/include/openssl 
> -DOPENSSL_DISABLE_OLD_DES_SUPPORT -D_LARGEFILE_SOURCE -D_REENTRANT 
> -D_FILE_OFFSET_BITS=64 -L/opt/openpkg/lib -lthread conftest.c -lldap -llber   
> -lsec -lgen -lresolv -lsocket -lnsl  >&5
> /opt/openpkg/lib/libldap.a(tls.o): In function `ldap_pvt_tls_destroy':
> tls.c:(.text+0x68): undefined reference to `SSL_CTX_free'
> tls.c:(.text+0x70): undefined reference to `EVP_cleanup'
> tls.c:(.text+0x78): undefined reference to `ERR_remove_state'
> tls.c:(.text+0x80): undefined reference to `ERR_free_strings'
> /opt/openpkg/lib/libldap.a(tls.o): In function `ldap_pvt_tls_init':
> [...]

This means an additional LIBS="-lssl -lcrypto" is required because our
OpenLDAP uses OpenSSL...

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com

______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
User Communication List                      openpkg-users@openpkg.org

Reply via email to