php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73564 cannot compile with ldap support
Submitted: 2016-11-19 00:45 UTC Modified: 2024-07-24 21:27 UTC
From: 2easy dot for dot kautzy at gmail dot com Assigned: petk (profile)
Status: Closed Package: Compile Failure
PHP Version: 7.1.0RC6 OS: Debian 8.3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: 2easy dot for dot kautzy at gmail dot com
New email:
PHP Version: OS:

 

 [2016-11-19 00:45 UTC] 2easy dot for dot kautzy at gmail dot com
Description:
------------
configure:

./configure \
        --prefix=/usr/local/php/7.1.0 \
        --sysconfdir=/etc/php/7.1.0 \
        --with-config-file-path=/etc/php/7.1.0 \
        --localstatedir=/var/local/php/7.1.0 \
        --with-openssl \
        --with-zlib \
        --enable-bcmath \
        --with-bz2 \
        --enable-calendar \
        --with-curl \
        --enable-dba \
        --enable-exif \
        --enable-ftp \
        --disable-gcc-global-regs \
        --enable-opcache=no \
        --with-gd \
                --with-jpeg-dir=/usr \
                --with-png-dir=/usr \
                --with-zlib-dir=/usr \
                --with-xpm-dir=/usr \
                --with-freetype-dir=/usr \
                --enable-gd-native-ttf \
        --with-gmp \
        --with-kerberos \
        --with-imap-ssl \
        --with-ldap=/usr/local/openldap \
        --enable-mbstring \
        --with-mhash \
        --with-pgsql \
        --with-mm \
        --enable-shmop \
        --enable-soap \
        --enable-sockets \
        --enable-sysvmsg \
        --enable-sysvsem \
        --enable-sysvshm \
        --with-tidy \
        --with-xmlrpc \
        --with-xsl


###
configure stops with:

configure: error: LDAP build check failed. Please check config.log for more information.

###

part from config.log with errors:

| /* end confdefs.h.  */
| /* Define ldap_control_find to an innocuous variant, in case <limits.h> declares ldap_control_find.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define ldap_control_find innocuous_ldap_control_find
|
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char ldap_control_find (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
|
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|
| #undef ldap_control_find
|
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char ldap_control_find ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined __stub_ldap_control_find || defined __stub___ldap_control_find
| choke me
| #endif
|
| int
| main ()
| {
| return ldap_control_find ();
|   ;
|   return 0;
| }
configure:49005: result: no
configure:49337: checking for ldap_bind_s
configure:49337: cc -o conftest -I/usr/include -g -O2 -fvisibility=hidden  -I/usr/include -L/usr/lib  -Wl,-rpath,/usr/lib/x86_64-linux-gnu/mit-krb5 -L/usr/l
ib/x86_64-linux-gnu/mit-krb5 -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu conftest.c -lldap -lgmp -lX11 -lXpm -lpng -lz -ljpeg -lcurl -l
bz2 -lz -lrt -lm -ldl -lnsl  -lxml2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lcurl -lxml2 -lssl -lcrypto -lfreetype -lz -lpng12  >&5
/usr/lib/x86_64-linux-gnu/libcurl.so: undefined reference to `SSL_CTX_use_certificate_chain_file@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libcurl.so: undefined reference to `SSL_CTX_set_verify@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libcurl.so: undefined reference to `ASN1_STRING_type@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libcurl.so: undefined reference to `CRYPTO_free@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libcurl.so: undefined reference to `SSL_get_shutdown@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libcurl.so: undefined reference to `SSL_get_session@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libcurl.so: undefined reference to `SSL_get_verify_result@OPENSSL_1.0.0'
...
/usr/lib/x86_64-linux-gnu/libcurl.so: undefined reference to `SSL_connect@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libcurl.so: undefined reference to `UI_get_input_flags@OPENSSL_1.0.0'
/usr/lib/x86_64-linux-gnu/libcurl.so: undefined reference to `DES_set_odd_parity@OPENSSL_1.0.0'
collect2: error: ld returned 1 exit status
configure:49337: $? = 1
configure: failed program was:
| /* confdefs.h */





Expected result:
----------------
configure should run through

Actual result:
--------------
configure stops with error:
checking for ldap_parse_result... no
checking for ldap_parse_reference... no
checking for ldap_start_tls_s... no
checking for ldap_control_find... no
checking for ldap_bind_s... no
configure: error: LDAP build check failed. Please check config.log for more information.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-16 23:04 UTC] peterkokot at gmail dot com
Hello, compiling on Debian 8.3 and up is working ok with the current PHP 7.1.10 version using the above configure options except that for successful building of the ldap on Debian the --with-libdir=lib/x86_64-linux-gnu and the --with-ldap options were used.

so instead of above configure options (where the custom openldap installation was specified this works ok and the errors were probably related to something else and all this got fixed on the way between PHP 7.1.x releases.

./configure --prefix=/usr/local/php/7.1.0 --sysconfdir=/etc/php/7.1.0 --with-config-file-path=/etc/php/7.1.0 --localstatedir=/var/local/php/7.1.0 --with-openssl --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-curl --enable-dba --enable-exif --enable-ftp --disable-gcc-global-regs --enable-opcache=no --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-native-ttf --with-gmp --with-kerberos --with-imap-ssl --with-ldap --enable-mbstring --with-mhash --with-pgsql --with-mm --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-tidy --with-xmlrpc --with-xsl --with-libdir=lib/x86_64-linux-gnu/

Hope it helps and we can close this bug as well. Otherwise just reopen it. Thanks.
 [2024-07-24 21:27 UTC] petk@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: petk
 [2024-07-24 21:27 UTC] petk@php.net
Hello, this has been rechecked and it seems to be working ok. In case you're experiencing similar issues, please report back at https://github.com/php/php-src/issues.

Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 01:01:28 2024 UTC