Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 380581 - dev-lang/php 5.3.8 USE="pdo oci8-instant-client" - checking for oci.h... configure: error: I'm too dumb to figure out where the include dir is in your Instant Client install
Summary: dev-lang/php 5.3.8 USE="pdo oci8-instant-client" - checking for oci.h... conf...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
: 381007 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-08-25 02:11 UTC by Victor
Modified: 2012-02-27 22:04 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
php-5.3-pdo_oci.patch (php-5.3-pdo_oci.patch,490 bytes, patch)
2011-10-12 14:23 UTC, Joerg Neikes
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Victor 2011-08-25 02:11:39 UTC
# emerge dev-lang/php -pv

checking for MySQL support for PDO... yes, shared
checking for PDO includes... (cached) /var/tmp/portage/dev-lang/php-5.3.8/work/sapis-build/cli/ext
checking Oracle OCI support for PDO... yes, shared
checking Oracle Install-Dir... instantclient,/usr,11.2.0.2
checking if that is sane... yes
checking size of long int... (cached) 8
checking for oci.h... configure: error: I'm too dumb to figure out where the include dir is in your Instant Client install

The same error - https://bugs.gentoo.org/show_bug.cgi?id=118848

Reproducible: Always
Comment 1 Rafał Mużyło 2011-08-25 07:35:03 UTC
How can you tell it's the same problem ?
Full build log and config.log, please.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2011-08-31 16:13:56 UTC
*** Bug 381007 has been marked as a duplicate of this bug. ***
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2011-08-31 16:14:33 UTC
More info on duplicate bug #381007.
Comment 4 Patrick ALLAERT 2011-09-14 05:56:05 UTC
This has been introduced in rev 309818 which happened between 5.3.6 and 5.3.7:
$ svn diff -c 309818 https://svn.php.net/repository/php/php-src/trunk/
Index: ext/pdo_oci/config.m4
===================================================================
--- ext/pdo_oci/config.m4       (revision 309817)
+++ ext/pdo_oci/config.m4       (revision 309818)
@@ -71,28 +71,34 @@
   fi
 
   if test "instantclient" = "`echo $PDO_OCI_DIR | cut -d, -f1`" ; then
+    AC_CHECK_SIZEOF(long int, 4)
+    if test "$ac_cv_sizeof_long_int" = "4" ; then
+      PDO_OCI_CLIENT_DIR="client"
+    else
+      PDO_OCI_CLIENT_DIR="client64"
+    fi
     PDO_OCI_IC_PREFIX="`echo $PDO_OCI_DIR | cut -d, -f2`"
     PDO_OCI_IC_VERS="`echo $PDO_OCI_DIR | cut -d, -f3`"
     AC_MSG_CHECKING([for oci.h])
-    if test -f $PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client/oci.h ; then
-      PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client)
-      AC_MSG_RESULT($PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client)
-    elif test -f $PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include/oci.h ; then
-      PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include)
-      AC_MSG_RESULT($PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include)
+    if test -f $PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/oci.h ; then
+      PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR)
+      AC_MSG_RESULT($PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR)
+    elif test -f $PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/include/oci.h ; then
+      PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/include)
+      AC_MSG_RESULT($PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/include)
     elif test -f $PDO_OCI_IC_PREFIX/sdk/include/oci.h ; then
       PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/sdk/include)
       AC_MSG_RESULT($PDO_OCI_IC_PREFIX/sdk/include)
-    elif test -f $PDO_OCI_IC_PREFIX/client/include/oci.h ; then
-      PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/client/include)
-      AC_MSG_RESULT($PDO_OCI_IC_PREFIX/client/include)
+    elif test -f $PDO_OCI_IC_PREFIX/$PDO_OCI_CLIENT_DIR/include/oci.h ; then
+      PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/$PDO_OCI_CLIENT_DIR/include)
+      AC_MSG_RESULT($PDO_OCI_IC_PREFIX/$PDO_OCI_CLIENT_DIR/include)
     else
       AC_MSG_ERROR([I'm too dumb to figure out where the include dir is in your Instant Client install])
     fi
-    if test -f "$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib/libclntsh.so" ; then
-    PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib"
-    elif test -f "$PDO_OCI_IC_PREFIX/client/lib/libclntsh.so" ; then
-      PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/client/lib"
+    if test -f "$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/lib/libclntsh.so" ; then
+    PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/lib"
+    elif test -f "$PDO_OCI_IC_PREFIX/$PDO_OCI_CLIENT_DIR/lib/libclntsh.so" ; then
+      PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/$PDO_OCI_CLIENT_DIR/lib"
     elif test -f "$PDO_OCI_IC_PREFIX/libclntsh.so" ; then
       PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX"
     else

The real question is now: is oracle-instantclient-basic supposed to be installed with a "client64" path?

I mentioned this error in PHP bug http://bugs.php.net/44989 which is the related bug report.
Comment 5 Ivan Bagaev 2011-09-14 07:14:17 UTC
In my case oracle-instant-client instal into /usr/lib64/oracle/11.2.0.2/client
Comment 6 Patrick ALLAERT 2011-09-14 15:33:52 UTC
(In reply to comment #5)
> In my case oracle-instant-client instal into /usr/lib64/oracle/11.2.0.2/client

Same here (with 11.2.0.3), hence why /usr/lib64/oracle/11.2.0.2/client64 doesn't match it.
Comment 7 Joerg Neikes 2011-10-12 14:22:51 UTC
like in https://bugs.gentoo.org/show_bug.cgi?id=381007

ln -s /usr/lib64/oracle/10.2.0.3/client/include /usr/include/oracle/10.2.0.3/client64
ln -s /usr/lib/oracle/10.2.0.3/client/ /usr/lib/oracle/10.2.0.3/client64

use static path:
PDO_OCI_IC_PREFIX='/usr/lib/oracle/10.2.0.3'
PDO_OCI_IC_PREFIX='/usr/lib/oracle/11.2.0.2'
The version must be set for your oracle client.

And add own patch:


mkdir -p /etc/portage/patches/dev-lang/php-5.3.8
cp php-5.3-pdo_oci.patch /etc/portage/patches/dev-lang/php-5.3.8

This works for me.
Comment 8 Joerg Neikes 2011-10-12 14:23:27 UTC
Created attachment 289659 [details, diff]
php-5.3-pdo_oci.patch
Comment 9 Ivan Bagaev 2012-01-04 03:32:48 UTC
I used USE='oci8' for a workaround, but since version 5.3.9_r3 this flag is removed. I think it's wrong.
Comment 10 Ivan Bagaev 2012-01-19 11:43:05 UTC
My variant ebuild with patch to resolve this problem:
http://code.google.com/p/miramir-layman/
Comment 11 Matti Bickel (RETIRED) gentoo-dev 2012-02-22 21:45:44 UTC
Simply letting php figure it out itself worked for me: http://paste.pocoo.org/show/555195/

This relies on the fact that oracle-instantclient-basic supplies an /etc/env.d file with ORACLE_HOME pointing to the correct directory.

If that turns out to work for somebody beside me, I'll commit it this week.
Comment 12 Matti Bickel (RETIRED) gentoo-dev 2012-02-27 22:04:33 UTC
Applied my patch.