ID:               41941
 Updated by:       [EMAIL PROTECTED]
 Reported By:      wdierkes at 5dollarwhitebox dot org
 Status:           Assigned
 Bug Type:         OCI8 related
 Operating System: Redhat Enterprise Linux
 PHP Version:      5.2.3
 Assigned To:      sixd
 New Comment:

We're not going to add support for any unofficial Instant Client rpms
(there is enough hassle with the official ones, so please don't add even
more).

The support for official 64bit OIC rpms is currently being tested.


Previous Comments:
------------------------------------------------------------------------

[2007-11-29 21:28:09] [EMAIL PROTECTED]

Update: Oracle has released Instant Client x86_64 RPMs on the OTN
website.  OCI8 should use the directory structure in these official
RPMs. 

------------------------------------------------------------------------

[2007-07-23 18:03:17] [EMAIL PROTECTED]

Status update: I'm pushing for official Oracle 64 bit RPMs to be
released and am waiting to see what directory structure they will have.

------------------------------------------------------------------------

[2007-07-09 23:14:12] 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-09 23:03:28] [EMAIL PROTECTED]

Oracle doesn't distribute x64 RPMs for Instant Client, though there has
been some discussion about it.  Who created the RPMs you are using?

------------------------------------------------------------------------

[2007-07-09 17:29:16] 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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=41941&edit=1

Reply via email to