Bug #49876 [Com]: configure fails --with-ldap Cannot find ldap libraries in /usr/lib

From: Date: Wed, 13 Sep 2017 22:09:47 +0000
Subject: Bug #49876 [Com]: configure fails --with-ldap Cannot find ldap libraries in /usr/lib
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211143@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=49876&edit=1 ID: 49876 Comment by: dzuelke at gmail dot com Reported by: graham dot simpson at hsbcib dot com Summary: configure fails --with-ldap Cannot find ldap libraries in /usr/lib Status: Not a bug Type: Bug Package: Compile Failure Operating System: SuSE Linux 10 SP 2 x86_64 PHP Version: 5.3.0 Block user comment: N Private report: N New Comment: Anyone want to try my PR at https://github.com/php/php-src/pull/2754 ? Previous Comments: ------------------------------------------------------------------------ [2016-01-26 16:19:19] keaton dot paul dot victor at gmail dot com I found this useful, see last comment to solve issue of: configure: error: Cannot find ldap.h - ------------------------------------------------------------------------ [2015-04-26 15:09:29] 6822089 at qq dot com 注意:开始我用--with-ldap安装编译的时候一直报错 configure: error: Cannot find ldap libraries in /usr/lib. 或者configure: error: Cannot find ldap.h 而经过检查openldap-devel都是安装的,当时因为一直没解决我就先放弃了ldap. 后面想还是尝试一下ldap扩展,于是源包目录,安装过程是成功的。 cd /opt/soft/php-5.6.8/ext/ldap /data/php/bin/phpize ./configure --with-php-config=/data/php/bin/php-config --with-ldap --with-libdir=lib64 主要是--with-libdir=lib64 ------------------------------------------------------------------------ [2014-02-11 08:06:51] vbvbrj at gmail dot com I have to same bug with compile --with-ldap on Debian x64. LDAP libraries resides in /urs/lib/x86_64-linux-gnu . I don't want to use --with-libdir, as it breaks other paths to libs for other packages, ie --with-mysql=/opt/mysql, --with-opensll=/opt/openssl The cnfigure script must be updated to handle this path for LDAP. For meantime a workaround: git checkout master; ./buildconf --force; sed -i -e 's~^\([[:space:]]*\)\(if test -f \$LDAP_LIBDIR/liblber\.a || test -f \$LDAP_LIBDIR/liblber\.\$SHLIB_SUFFIX_NAME; then\)$~\1if test -f \$LDAP_LIBDIR/x86_64-linux-gnu/liblber\.a || test -f \$LDAP_LIBDIR/x86_64-linux-gnu/liblber\.\$SHLIB_SUFFIX_NAME; then\n\1 LDAP_LIBDIR=$LDAP_LIBDIR/x86_64-linux-gnu\n\1fi\n\n\1\2~' configure; ./configure --prefix=/opt/php --with-ldap ------------------------------------------------------------------------ [2011-11-21 09:49:54] yunosh@php.net Nevermind, looks like libldap seems to be the only library used for building PHP that installs into /usr/lib/x86_64-linux-gnu and does *not* provide a ldap-config script or similar to determine the actual library path, like libcurl does for example. ------------------------------------------------------------------------ [2011-11-21 09:28:46] yunosh@php.net I would like to bring this up again, considering to re-open this ticket. The LDAP extension seems to be the only extension that does *not* find the header file and libraries on 64bit distros by default, i.e. without explicitly specifying the library path. This is still true for all 5.3 versions and even 5.4.0RC1. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=49876 -- Edit this bug report at https://bugs.php.net/bug.php?id=49876&edit=1

« previous php.bugs (#211143) next »