Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 400773

Summary: dev-lang/php-5.3.9: configure fails with ldap
Product: Gentoo Linux Reporter: Petr Gregor <p.gregy>
Component: [OLD] ServerAssignee: PHP Bugs <php-bugs>
Status: RESOLVED INVALID    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Install log
System information
config.log

Description Petr Gregor 2012-01-25 17:40:24 UTC
If I try to install php 5.3.9 configure fails with:

checking for LDAP support... yes
checking for LDAP Cyrus SASL support... yes
checking for 3 arg ldap_set_rebind_proc... yes
checking for ldap_parse_result... no
checking for ldap_parse_reference... no
checking for ldap_start_tls_s... no
checking for sasl_version in -lsasl2... yes
checking for ldap_bind_s... no
configure: error: LDAP build check failed. Please check config.log for more information.

Reproducible: Always
Comment 1 Petr Gregor 2012-01-25 17:45:02 UTC
Created attachment 299879 [details]
Install log
Comment 2 Petr Gregor 2012-01-25 17:51:08 UTC
Created attachment 299881 [details]
System information
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2012-01-26 17:18:20 UTC
configure: error: LDAP build check failed. Please check config.log for more information.

Please attach that config.log.
Comment 4 Petr Gregor 2012-01-26 17:32:56 UTC
Ok, where do I find it? I looked through the work directory and could not locate it.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2012-01-27 15:53:20 UTC
Maintainers should know where it is.
Comment 6 Ole Markus With (RETIRED) gentoo-dev 2012-01-27 16:19:01 UTC
(In reply to comment #4)
> Ok, where do I find it? I looked through the work directory and could not
> locate it.

Should be in $WORKDIR/sapis-build/<sapi>
Comment 7 Petr Gregor 2012-01-29 17:52:40 UTC
Created attachment 300299 [details]
config.log
Comment 8 Matti Bickel (RETIRED) gentoo-dev 2012-01-31 21:12:57 UTC
configure:55426: checking for LDAP Cyrus SASL support
configure:55441: result: yes
configure:57763: checking for 3 arg ldap_set_rebind_proc
configure:57779: x86_64-pc-linux-gnu-gcc -c -I/usr/include -O2 -march=native -fomit-frame-pointer -pipe -pthread  -D_REENTRANT -I/usr/include conftest.c >&5
configure:57779: $? = 0
configure:57786: result: yes
configure:57797: checking for ldap_parse_result
configure:57797: x86_64-pc-linux-gnu-gcc -o conftest -I/usr/include -O2 -march=native -fomit-frame-pointer -pipe -pthread  -D_REENTRANT -I/usr/include -L/usr/lib64 -Wl,-O1 -Wl,--as-needed conftest.c -lldap -llber -lt1 -lfreetype -lpng -lz -ljpeg -ldb-4.8 -lgdbm -lcurl -lbz2 -lz -lpcre -lcrypt -lrt -lm -ldl -lnsl  -lcrypt -lxml2 -lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lcurl -lidn -lssl -lcrypto -lrt -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkeyutils -lresolv -ldl -lssl -lcrypto -lz -lxml2 -lz -lm -lssl -lcrypto  >&5
/usr/lib64/libldap.so: undefined reference to `sasl_encode@SASL2'
/usr/lib64/libldap.so: undefined reference to `sasl_setprop@SASL2'
/usr/lib64/libldap.so: undefined reference to `sasl_version@SASL2'
/usr/lib64/libldap.so: undefined reference to `sasl_client_init@SASL2'
/usr/lib64/libldap.so: undefined reference to `sasl_errdetail@SASL2'
/usr/lib64/libldap.so: undefined reference to `sasl_getprop@SASL2'
/usr/lib64/libldap.so: undefined reference to `sasl_global_listmech@SASL2'
/usr/lib64/libldap.so: undefined reference to `sasl_decode@SASL2'
/usr/lib64/libldap.so: undefined reference to `sasl_client_new@SASL2'
/usr/lib64/libldap.so: undefined reference to `sasl_client_step@SASL2'
/usr/lib64/libldap.so: undefined reference to `sasl_errstring@SASL2'
/usr/lib64/libldap.so: undefined reference to `sasl_client_start@SASL2'
/usr/lib64/libldap.so: undefined reference to `sasl_dispose@SASL2'

I believe this is the important bit. Seems like ldap isn't linked to sasl as it should. configure determines you're using ldap with cyrus sasl, but you libldap isn't linked against sasl. At least that's what I'm making of this - not having had a look at linkers in quite a while.

So can you please rebuild openldap and try again?
Comment 9 Petr Gregor 2012-02-01 11:47:51 UTC
I rebuilt openldap and it works fine now. How can I avoid things like this? What couses it?

Thanks
Comment 10 Ole Markus With (RETIRED) gentoo-dev 2012-02-01 11:54:49 UTC
(In reply to comment #9)
> I rebuilt openldap and it works fine now. How can I avoid things like this?
> What couses it?
> 

Typically when you upgrade a library and the ABI breaks. When this happens you will have to rebuild all applications depending on the given library. 

The emerge info appearing after a package install should inform you when such rebuilds are required. A good habbit is to run revdep-rebuild after larger emerge jobs. Especially emerge -avuDN world.
Comment 11 Petr Gregor 2012-02-01 12:39:05 UTC
Yes, however that is the first thing I tried. No broken packages were found :(