Bug #80926 [Nab]: Unable to compile PDO oci and LDAP
| From: | tmp6 at turnov dot org | Date: | Tue, 06 Apr 2021 15:25:56 +0000 |
| Subject: | Bug #80926 [Nab]: Unable to compile PDO oci and LDAP | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-233230@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80926&edit=1
ID: 80926
User updated by: tmp6 at turnov dot org
Reported by: tmp6 at turnov dot org
Summary: Unable to compile PDO oci and LDAP
Status: Not a bug
Type: Bug
Package: Compile Failure
Operating System: Ubuntu 18.04.5 LTS
PHP Version: 8.0.3
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Not possible to use current ldap libraries from Oracle
/bin/bash /usr/local/src/php-8.0.3/libtool --silent --preserve-dup-deps --mode=compile cc
-Iext/ldap/ -I/usr/local/src/php-8.0.3/ext/ldap/ -I/usr/local/src/php-8.0.3/include
-I/usr/local/src/php-8.0.3/main -I/usr/local/src/php-8.0.3 -I/usr/local/src/php-8.0.3/ext/date/lib
-I/usr/include/libxml2 -I/usr/include/x86_64-linux-gnu -I/usr/local/lib/oracle/21.1/client64/include
-I/usr/local/include -I/usr/local/src/php-8.0.3/ext/mbstring/libmbfl
-I/usr/local/src/php-8.0.3/ext/mbstring/libmbfl/mbfl -I/usr/local/include/oracle/21.1/client64
-I/usr/lib/x86_64-linux-gnu/libzip/include -I/usr/local/src/php-8.0.3/TSRM
-I/usr/local/src/php-8.0.3/Zend -Wno-clobbered -Wall -Wextra -Wno-strict-aliasing
-Wno-implicit-fallthrough -Wno-unused-parameter -Wno-sign-compare -g -O2 -fvisibility=hidden
-DZEND_SIGNALS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /usr/local/src/php-8.0.3/ext/ldap/ldap.c -o
ext/ldap/ldap.lo
/usr/local/src/php-8.0.3/ext/ldap/ldap.c: In function â_close_ldap_linkâ:
/usr/local/src/php-8.0.3/ext/ldap/ldap.c:104:2: warning: implicit declaration of function
âldap_destroyâ; did you mean âldap_perrorâ? [-Wimplicit-function-declaration]
ldap_destroy(ld->link);
^~~~~~~~~~~~
ldap_perror
/usr/local/src/php-8.0.3/ext/ldap/ldap.c: In function â_php_ldap_control_to_arrayâ:
/usr/local/src/php-8.0.3/ext/ldap/ldap.c:147:30: error:
âLDAP_CONTROL_PASSWORDPOLICYRESPONSEâ undeclared (first use in this function); did you
mean âLDAP_CONTROL_PWDEXPIRINGâ?
if (strcmp(ctrl->ldctl_oid, LDAP_CONTROL_PASSWORDPOLICYRESPONSE) == 0) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LDAP_CONTROL_PWDEXPIRING
....
Previous Comments:
------------------------------------------------------------------------
[2021-04-06 08:55:58] cmb@php.net
If you want to build both LDAP and OCI, you need to use the Oracle
LDAP libraries, i.e. you need to pass the path to configure;
something like:
./configure --with-ldap=/usr/lib/oracle/21.1/client64/lib â¦
------------------------------------------------------------------------
[2021-04-01 08:23:06] tmp6 at turnov dot org
Description:
------------
It's unable to compile LDAP and PDO oci together.
/bin/bash /usr/local/src/php-8.0.3/libtool --silent --preserve-dup-deps --mode=compile cc -Imain/
-I/usr/local/src/php-8.0.3/main/ -I/usr/local/src/php-8.0.3/include -I/usr/local/src/php-8.0.3/main
-I/usr/local/src/php-8.0.3 -I/usr/local/src/php-8.0.3/ext/date/lib -I/usr/include/libxml2
-I/usr/local/include/oracle/21.1/client64 -I/usr/local/src/php-8.0.3/TSRM
-I/usr/local/src/php-8.0.3/Zend -Wno-clobbered -Wall -Wextra -Wno-strict-aliasing
-Wno-implicit-fallthrough -Wno-unused-parameter -Wno-sign-compare -g -O2 -fvisibility=hidden
-DZEND_SIGNALS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c main/internal_functions_cli.c -o
main/internal_functions_cli.lo
In file included from /usr/local/src/php-8.0.3/ext/ldap/php_ldap.h:26:0,
from main/internal_functions_cli.c:37:
/usr/local/include/oracle/21.1/client64/ldap.h:48:0: warning: "LBER_CLASS_UNIVERSAL"
redefined
#define LBER_CLASS_UNIVERSAL 0x00
...
In file included from /usr/local/src/php-8.0.3/ext/ldap/php_ldap.h:23:0,
from main/internal_functions_cli.c:37:
/usr/include/lber.h:335:1: note: previous declaration of âber_scanfâ was here
ber_scanf LDAP_P((
^~~~~~~~~
Makefile:1222: recipe for target 'main/internal_functions_cli.lo' failed
make: *** [main/internal_functions_cli.lo] Error 1
Test script:
---------------
PHPVER=8.0.3
./configure \
--prefix=/opt/php-$PHPVER \
--with-config-file-path=/opt/php-$PHPVER/etc \
--with-config-file-scan-dir=/opt/php-$PHPVER/etc/conf.d \
--with-pdo-oci=shared,instantclient,/usr/local/lib/oracle/21.1/client64/lib \
--with-ldap
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80926&edit=1