oci8 extension not lib64 savvy
| Bug #41941 | oci8 extension not lib64 savvy | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2007-07-09 17:29 UTC | Modified: | 2008-01-16 00:43 UTC |
|
||||||||||
| From: | wdierkes at 5dollarwhitebox dot org | Assigned: | sixd (profile) | |||||||||||
| Status: | Closed | Package: | OCI8 related | |||||||||||
| PHP Version: | 5.2.3 | OS: | Redhat Enterprise Linux | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2007-07-09 17:29 UTC] wdierkes at 5dollarwhitebox dot org
Description: ------------ Related to Bug 35471 - could not open/comment on that bug report. Oracle InstantClient 10.2.0.3 (RPM) Redhat Enterprise Linux 3/4 x86_64 configure .... --with-oci8=shared,instantclient,/usr/lib64/oracle/10.2.0.3/client/lib When compiling php-5.2.3 on x86_64, configure fails with the following: ... checking Oracle Instant Client directory... /usr/lib64/oracle/10.2.0.3/client/lib checking Oracle Instant Client SDK header directory... configure: error: Oracle Instant Client SDK header files not found The issue is at the following line (around line 345-350) in php-5.2.3/ext/oci8/config.m4: OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/lib/oracle/\(.*\)/client/lib[/]*$!/usr/include/oracle/\1/client!'` Obviously, $OCISDKRPMINC is hardcoded to sed up the line based on '/usr/lib'. This should be 32bit/64bit savvy, or can just as easily be done differently. The following patch resolved the issue: http://devel.5dollarwhitebox.org/patches/php-5.2.3-oci8-lib64.patch --- php-5.2.3/ext/oci8/config.m4.oci8 2007-05-04 06:30:37.000000000 -0500 +++ php-5.2.3/ext/oci8/config.m4 2007-07-09 11:49:26.000000000 -0500 @@ -345,7 +345,8 @@ AC_MSG_CHECKING([Oracle Instant Client SDK header directory]) dnl Header directory for Instant Client SDK RPM install - OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/lib/oracle/\(.*\)/client/lib[/]*$!/usr/include/oracle/\1/client!'` + INSTANT_CLIENT_VERSION=`echo "$PHP_OCI8_INSTANT_CLIENT" | awk -F / {' print $5 '}` + OCISDKRPMINC="/usr/include/oracle/${INSTANT_CLIENT_VERSION}/client" dnl Header directory for Instant Client SDK zip file install OCISDKZIPINC=$PHP_OCI8_INSTANT_CLIENT/sdk/include A cleaner and more flexible solution would be to add a '--oci8-include' option along with the standard '--with-oci8' option. Basically... the directory passed to '--with-oci8' directs configure to the path where the library files are.... The rest of the code is assuming that the header files are in a set location '/usr/include/oracle/<version>/client'... there should be an option to override this location of oci.h. Reproduce code: --------------- configure .... --with-oci8=shared,instantclient,/usr/lib64/oracle/10.2.0.3/client/lib Expected result: ---------------- configure properly finds oci.h in the default include dir for oracle. Actual result: -------------- checking Oracle Instant Client directory... /usr/lib64/oracle/10.2.0.3/client/lib checking Oracle Instant Client SDK header directory... configure: error: Oracle Instant Client SDK header files not found
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2007-07-09 23:03 UTC] sixd@php.net
[2007-07-09 23:14 UTC] wdierkes at 5dollarwhitebox dot org
I built, and maintain the RPMS (internally) based off of a FedoraCore SPEC with minimal changes (I believe they dropped the package though as it was hard to find). The 'lib' directory is based off of the '%{_libdir}' RPM macro (as it should be) placing the library data in '/usr/lib64' on an x86_64 box (as it should as well). This issue is not with the RPM... rather the fact that '/usr/lib' is hardcoded in the config.m4 line (as described above) that determines the '/usr/include...' path for oci.h.[2007-07-23 18:03 UTC] sixd@php.net
[2007-11-29 21:28 UTC] sixd@php.net
[2007-11-29 22:56 UTC] tony2001@php.net
[2007-12-12 05:59 UTC] Fedora at FamilleCollet dot com
[2008-01-16 00:43 UTC] sixd@php.net