开发者

Installing PDO_OCI on OpenSuse 11.4 64bit

I tried many tutorials on how to install PDO_OCI on my openSuse 11.4 64bit machine and I couldn't get it to work.

What I do is:

wget http://pecl.php.net/get/PDO_OCI
tar -xzvf PDO_OCI-1.0.tgz
cd PDO_OCI-1.0/
phpize

and I get this output:

    Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
configure.in:3: warning: prefer named diversions
config.m4:179: warning: AC_CACHE_VAL(pdo_inc_path, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
aclocal.m4:2746: PHP_CHECK_PDO_INCLUDES is expanded from...
config.m4:179: the top level
configure.in:3: warning: prefer named diversions
config.m4:179: warning: AC_CACHE_VAL(pdo_inc_path, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
aclocal.m4:2746: PHP_CHECK_PDO_INCLUDES is expanded from...
config.m4:179: the top level

Despite the warnings I run:

./configure --with-pdo-oci

and it goes fine. Then I run make and it stops:

/bin/sh /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/libtool --mode=compile gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo  -DHAVE_CONFIG_H  -g -O2   -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/pdo_oci.c -o pdo_oci.lo 
mkdir .libs
 gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/pdo_oci.c  -fPIC -DPIC -o .libs/pdo_oci.o
/bin/sh /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/libtool --mode=compile gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo  -DHAVE_CONFIG_H  -g -O2   -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/oci_driver.c -o oci_driver.lo 
 gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/serve开发者_高级运维r//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/oci_driver.c  -fPIC -DPIC -o .libs/oci_driver.o
/bin/sh /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/libtool --mode=compile gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo  -DHAVE_CONFIG_H  -g -O2   -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/oci_statement.c -o oci_statement.lo 
 gcc -std=gnu99 -I/usr/include/php/ext -I. -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo -DHAVE_CONFIG_H -g -O2 -c /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/oci_statement.c  -fPIC -DPIC -o .libs/oci_statement.o
/bin/sh /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/libtool --mode=link gcc -std=gnu99 -DPHP_ATOM_INC -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/include -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0/main -I/home/goran/PDO_OCI-1.0/PDO_OCI-1.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/public -I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//rdbms/demo  -DHAVE_CONFIG_H  -g -O2   -o pdo_oci.la -export-dynamic -avoid-version -prefer-pic -module -rpath /home/goran/PDO_OCI-1.0/PDO_OCI-1.0/modules  pdo_oci.lo oci_driver.lo oci_statement.lo -Wl,-rpath,/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib -lclntsh
gcc -std=gnu99 -shared  .libs/pdo_oci.o .libs/oci_driver.o .libs/oci_statement.o  -L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib -lclntsh  -Wl,-rpath -Wl,/usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib -Wl,-soname -Wl,pdo_oci.so -o .libs/pdo_oci.so
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib/libclntsh.so when searching for -lclntsh
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: cannot find -lclntsh
collect2: ld returned 1 exit status
make: *** [pdo_oci.la] Error 1

Any help is appreciated.


Have you tried either installing via. Yast (best option) or pecl (pecl install PDO_OCI)?


I patched config.m4 as follows:

--- config.m4.orig      2012-11-26 11:04:49.237538293 -0500
+++ config.m4   2012-11-26 11:31:35.693839416 -0500
@@ -208,15 +208,15 @@
     -L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD
   ])

-  ifdef([PHP_CHECK_PDO_INCLUDES],
+  ifdef([PHP_CHECK_PDO_INCLUDES_CV],
   [
-    PHP_CHECK_PDO_INCLUDES
+    PHP_CHECK_PDO_INCLUDES_CV
   ],[
     AC_MSG_CHECKING([for PDO includes])
     if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
       pdo_inc_path=$abs_srcdir/ext
-    elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
-      pdo_inc_path=$abs_srcdir/ext
+    elif test -f $abs_srcdir/../pdo/php_pdo_driver.h; then
+      pdo_inc_path=$abs_srcdir/../../ext
     elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
       pdo_inc_path=$prefix/include/php/ext
     else

Then invoked in php5-5.3.10/ext/pdo_oci:

autoconf -f
./configure
cp /usr/include/oracle/11.1.0.1/client64/* include/
make

Here is a relevant bug report.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜