次の構成ステートメントを使用します。
./configure --prefix=/home/a2r/www/PHP-5.5.0 --with-apxs2=/home/a2r/apache/bin/apxs --enable-ftp --with-curl --with-zlib --with-gd --with-ldap --with-mm --with-pgsql --with-jpeg-dir=/home/a2r/www --with-png-dir=/home/a2r/www --with-imap=/home/a2r/www/imap-2007f --with-imap-ssl --with-oci8=instantclient,/home/a2r/www/oracle/instantclient --enable-opcache=no
./configure は正常に実行されますが、make を実行すると次のエラーが発生します。
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:96:1: warning: "LBER_ERROR" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:53:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:97:1: warning: "LBER_DEFAULT" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:54:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:100:1: warning: "LBER_BOOLEAN" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:72:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:101:1: warning: "LBER_INTEGER" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:73:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:102:1: warning: "LBER_BITSTRING" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:74:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:103:1: warning: "LBER_OCTETSTRING" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:75:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:104:1: warning: "LBER_NULL" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:76:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:105:1: warning: "LBER_ENUMERATED" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:77:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:106:1: warning: "LBER_SEQUENCE" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:78:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:107:1: warning: "LBER_SET" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:79:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:145:1: warning: "NULLBER" redefined
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:27,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/usr/include/lber.h:96:1: warning: this is the location of the previous definition
In file included from /home/a2r/www/php-5.5.0/ext/ldap/php_ldap.h:30,
from /home/a2r/www/php-5.5.0/ext/ldap/ldap.c:45:
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:191: error: redefinition of `struct berval'
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:1011: error: conflicting types for 'ber_init'
/usr/include/lber.h:174: error: previous declaration of 'ber_init' was here
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:1011: error: conflicting types for 'ber_init'
/usr/include/lber.h:174: error: previous declaration of 'ber_init' was here
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:1012: error: conflicting types for 'ber_peek_tag'
/usr/include/lber.h:150: error: previous declaration of 'ber_peek_tag' was here
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:1012: error: conflicting types for 'ber_peek_tag'
/usr/include/lber.h:150: error: previous declaration of 'ber_peek_tag' was here
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:1013: error: conflicting types for 'ber_skip_tag'
/usr/include/lber.h:148: error: previous declaration of 'ber_skip_tag' was here
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:1013: error: conflicting types for 'ber_skip_tag'
/usr/include/lber.h:148: error: previous declaration of 'ber_skip_tag' was here
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:1014: error: conflicting types for 'ber_scanf'
/usr/include/lber.h:168: error: previous declaration of 'ber_scanf' was here
/home/a2r/www/oracle/instantclient/sdk/include/ldap.h:1014: error: conflicting types for 'ber_scanf'
/usr/include/lber.h:168: error: previous declaration of 'ber_scanf' was here
make: *** [ext/ldap/ldap.lo] Error 1
configure コマンドから Instantclient の部分 (最後の 2 つ) を削除すると、./configure、make、および make install が正しく実行されているように見えます。
これについて私が行った調査から、ldap と OCI8 がうまく連携しないことが既知の「問題」であるように見えます: https://forums.oracle.com/thread/2368820
これが私の問題であると思われる場合、oci8 を使用せずに configure を実行し、後でそれを動的 .so モジュールとして追加するにはどうすればよいですか? 現在、php.ini ファイルさえ存在していないようです。前もって感謝します。