Jump to content

Having trouble installing OCI support


Recommended Posts

I'm running CentOS 5.3. 

 

PHP version:

PHP 5.2.9 (cli) (built: Jul  8 2009 05:59:13)

Copyright © 1997-2009 The PHP Group

Zend Engine v2.2.0, Copyright © 1998-2009 Zend Technologies

    with Zend Extension Manager v1.2.2, Copyright © 2003-2007, by Zend Technologies

    with Zend Optimizer v3.3.3, Copyright © 1998-2007, by Zend Technologies

 

Oracle Install Client RPMS (Oracle is not installed on this server, this is just a front end web server):

[root@lamptest1 oci8-1.3.5]# rpm -qa|grep -i oracle

oracle-instantclient11.1-basic-11.1.0.7.0-1

oracle-instantclient11.1-sqlplus-11.1.0.7.0-1

oracle-instantclient11.1-devel-11.1.0.7.0-1

 

I'm trying to avoid building php from source, I found online that OCI support can be installed as a pear module by downloading from http://pecl.php.net/get/oci8.  I grabbed the latest version, untarred it, and ran the following:

 

[root@lamptest1 oci8-1.3.5]# ./configure -with-oci8=shared,instantclient,/usr/lib/oracle/11.1/client/lib

checking for egrep... grep -E

checking for a sed that does not truncate output... /bin/sed

checking for gcc... gcc

checking for C compiler default output file name... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables...

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ANSI C... none needed

checking how to run the C preprocessor... gcc -E

checking for icc... no

checking whether gcc and cc understand -c and -o together... yes

checking for system library directory... lib

checking if compiler supports -R... no

checking if compiler supports -Wl,-rpath,... yes

checking build system type... x86_64-redhat-linux-gnu

checking host system type... x86_64-redhat-linux-gnu

checking target system type... x86_64-redhat-linux-gnu

checking for PHP prefix... /usr

checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib

checking for PHP extension directory... /usr/lib64/php/modules

checking for PHP installed headers prefix... /usr/include/php

checking if debug is enabled... no

checking if zts is enabled... no

checking for re2c... no

configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.

checking for gawk... gawk

checking for Oracle (OCI8) support... yes, shared

checking PHP version... 5.2.9, ok

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking for long int... yes

checking size of long int... 8

checking checking if we're on a 64-bit platform... yes

checking Oracle Instant Client directory... /usr/lib/oracle/11.1/client/lib

checking Oracle Instant Client SDK header directory... /usr/include/oracle/11.1/client

checking Oracle Instant Client version... 11.1

checking for ld used by gcc... /usr/bin/ld

checking if the linker (/usr/bin/ld) is GNU ld... yes

checking for /usr/bin/ld option to reload object files... -r

checking for BSD-compatible nm... /usr/bin/nm -B

checking whether ln -s works... yes

checking how to recognise dependent libraries... pass_all

checking dlfcn.h usability... yes

checking dlfcn.h presence... yes

checking for dlfcn.h... yes

checking for g77... no

checking for f77... no

checking for xlf... no

checking for frt... no

checking for pgf77... no

checking for fort77... no

checking for fl32... no

checking for af77... no

checking for f90... no

checking for xlf90... no

checking for pgf90... no

checking for epcf90... no

checking for f95... no

checking for fort... no

checking for xlf95... no

checking for ifc... no

checking for efc... no

checking for pgf95... no

checking for lf95... no

checking for gfortran... no

checking whether we are using the GNU Fortran 77 compiler... no

checking whether  accepts -g... no

checking the maximum length of command line arguments... 32768

checking command to parse /usr/bin/nm -B output from gcc object... ok

checking for objdir... .libs

checking for ar... ar

checking for ranlib... ranlib

checking for strip... strip

checking if gcc supports -fno-rtti -fno-exceptions... no

checking for gcc option to produce PIC... -fPIC

checking if gcc PIC flag -fPIC works... yes

checking if gcc static flag -static works... yes

checking if gcc supports -c -o file.o... yes

checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes

checking whether -lc should be explicitly linked in... no

checking dynamic linker characteristics... GNU/Linux ld.so

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking if libtool supports shared libraries... yes

checking whether to build shared libraries... yes

checking whether to build static libraries... no

configure: creating libtool

appending configuration tag "CXX" to libtool

appending configuration tag "F77" to libtool

configure: creating ./config.status

config.status: creating config.h

config.status: config.h is unchanged

[root@lamptest1 oci8-1.3.5]#

[root@lamptest1 oci8-1.3.5]# make

/bin/sh /root/download/oci8-1.3.5/libtool --mode=compile gcc  -I. -I/root/download/oci8-1.3.5 -DPHP_ATOM_INC -I/root/download/oci8-1.3.5/include -I/root/download/oci8-1.3.5/main -I/root/download/oci8-1.3.5 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/include/oracle/11.1/client  -I/usr/include/php -DHAVE_CONFIG_H  -g -O2  -c /root/download/oci8-1.3.5/oci8.c -o oci8.lo

mkdir .libs

gcc -I. -I/root/download/oci8-1.3.5 -DPHP_ATOM_INC -I/root/download/oci8-1.3.5/include -I/root/download/oci8-1.3.5/main -I/root/download/oci8-1.3.5 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/include/oracle/11.1/client -I/usr/include/php -DHAVE_CONFIG_H -g -O2 -c /root/download/oci8-1.3.5/oci8.c  -fPIC -DPIC -o .libs/oci8.o

/root/download/oci8-1.3.5/oci8.c: In function 'php_oci_do_connect_ex':

/root/download/oci8-1.3.5/oci8.c:1788: warning: cast from pointer to integer of different size

/root/download/oci8-1.3.5/oci8.c:2015: warning: cast to pointer from integer of different size

/bin/sh /root/download/oci8-1.3.5/libtool --mode=compile gcc  -I. -I/root/download/oci8-1.3.5 -DPHP_ATOM_INC -I/root/download/oci8-1.3.5/include -I/root/download/oci8-1.3.5/main -I/root/download/oci8-1.3.5 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/include/oracle/11.1/client  -I/usr/include/php -DHAVE_CONFIG_H  -g -O2  -c /root/download/oci8-1.3.5/oci8_lob.c -o oci8_lob.lo

gcc -I. -I/root/download/oci8-1.3.5 -DPHP_ATOM_INC -I/root/download/oci8-1.3.5/include -I/root/download/oci8-1.3.5/main -I/root/download/oci8-1.3.5 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/include/oracle/11.1/client -I/usr/include/php -DHAVE_CONFIG_H -g -O2 -c /root/download/oci8-1.3.5/oci8_lob.c  -fPIC -DPIC -o .libs/oci8_lob.o

/bin/sh /root/download/oci8-1.3.5/libtool --mode=compile gcc  -I. -I/root/download/oci8-1.3.5 -DPHP_ATOM_INC -I/root/download/oci8-1.3.5/include -I/root/download/oci8-1.3.5/main -I/root/download/oci8-1.3.5 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/include/oracle/11.1/client  -I/usr/include/php -DHAVE_CONFIG_H  -g -O2  -c /root/download/oci8-1.3.5/oci8_statement.c -o oci8_statement.lo

gcc -I. -I/root/download/oci8-1.3.5 -DPHP_ATOM_INC -I/root/download/oci8-1.3.5/include -I/root/download/oci8-1.3.5/main -I/root/download/oci8-1.3.5 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/include/oracle/11.1/client -I/usr/include/php -DHAVE_CONFIG_H -g -O2 -c /root/download/oci8-1.3.5/oci8_statement.c  -fPIC -DPIC -o .libs/oci8_statement.o

/bin/sh /root/download/oci8-1.3.5/libtool --mode=compile gcc  -I. -I/root/download/oci8-1.3.5 -DPHP_ATOM_INC -I/root/download/oci8-1.3.5/include -I/root/download/oci8-1.3.5/main -I/root/download/oci8-1.3.5 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/include/oracle/11.1/client  -I/usr/include/php -DHAVE_CONFIG_H  -g -O2  -c /root/download/oci8-1.3.5/oci8_collection.c -o oci8_collection.lo

gcc -I. -I/root/download/oci8-1.3.5 -DPHP_ATOM_INC -I/root/download/oci8-1.3.5/include -I/root/download/oci8-1.3.5/main -I/root/download/oci8-1.3.5 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/include/oracle/11.1/client -I/usr/include/php -DHAVE_CONFIG_H -g -O2 -c /root/download/oci8-1.3.5/oci8_collection.c  -fPIC -DPIC -o .libs/oci8_collection.o

/bin/sh /root/download/oci8-1.3.5/libtool --mode=compile gcc  -I. -I/root/download/oci8-1.3.5 -DPHP_ATOM_INC -I/root/download/oci8-1.3.5/include -I/root/download/oci8-1.3.5/main -I/root/download/oci8-1.3.5 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/include/oracle/11.1/client  -I/usr/include/php -DHAVE_CONFIG_H  -g -O2  -c /root/download/oci8-1.3.5/oci8_interface.c -o oci8_interface.lo

gcc -I. -I/root/download/oci8-1.3.5 -DPHP_ATOM_INC -I/root/download/oci8-1.3.5/include -I/root/download/oci8-1.3.5/main -I/root/download/oci8-1.3.5 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/include/oracle/11.1/client -I/usr/include/php -DHAVE_CONFIG_H -g -O2 -c /root/download/oci8-1.3.5/oci8_interface.c  -fPIC -DPIC -o .libs/oci8_interface.o

/bin/sh /root/download/oci8-1.3.5/libtool --mode=link gcc -DPHP_ATOM_INC -I/root/download/oci8-1.3.5/include -I/root/download/oci8-1.3.5/main -I/root/download/oci8-1.3.5 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/include/oracle/11.1/client  -I/usr/include/php -DHAVE_CONFIG_H  -g -O2  -o oci8.la -export-dynamic -avoid-version -prefer-pic -module -rpath /root/download/oci8-1.3.5/modules  oci8.lo oci8_lob.lo oci8_statement.lo oci8_collection.lo oci8_interface.lo -Wl,-rpath,/usr/lib/oracle/11.1/client/lib -L/usr/lib/oracle/11.1/client/lib -lclntsh

gcc -shared  .libs/oci8.o .libs/oci8_lob.o .libs/oci8_statement.o .libs/oci8_collection.o .libs/oci8_interface.o  -L/usr/lib/oracle/11.1/client/lib -lclntsh  -Wl,-rpath -Wl,/usr/lib/oracle/11.1/client/lib -Wl,-soname -Wl,oci8.so -o .libs/oci8.so

/usr/bin/ld: skipping incompatible /usr/lib/oracle/11.1/client/lib/libclntsh.so when searching for -lclntsh

/usr/bin/ld: cannot find -lclntsh

collect2: ld returned 1 exit status

make: *** [oci8.la] Error 1

 

1) What am I missing or doing wrong?

2) Is there a better way to install OCI support

 

Thanks,

Dan

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.