3 Replies Latest reply on Nov 28, 2012 3:31 AM by cj

    OCI 1.4.9 build problem

    Gogala Mladen
      I've recently installed oci8 on my Fedora box, with Oracle instant client Configuration script complained that it cannot see header files, although the necessary instant client packages are installed:

      [mgogala@medo ~]$ rpm -qa|grep oracle

      I ended up copying the contents of /usr/include/oracle/11.2/client64 to /usr/lib/oracle/11.2/client64. I also had to copy all the libraries from /usr/lib/oracle/11.2/client64/lib to /usr/lib/oracle/11.2/client64. My PHP is 5.4.8:

      [mgogala@medo ~]$ php -v
      PHP 5.4.8 (cli) (built: Oct 18 2012 11:47:02)
      Copyright (c) 1997-2012 The PHP Group
      Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
      [mgogala@medo ~]$

      This was not what I would call a "seamless build". Apparently, the configuration script expects instant client to be just an unpacked blob, like for Debian derivatives, not a structured package with bin and lib directories and the headers under /usr/include.

      I am running 64 bit FC 17:
      [mgogala@medo ~]$ uname -a
      Linux medo.home.com 3.6.6-1.fc17.x86_64 #1 SMP Mon Nov 5 21:59:35 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
      [mgogala@medo ~]$
        • 1. Re: OCI 1.4.9 build problem
          What was your configure command or response to the PECL prompt?
          Also can you confirm where you got the RPMs from?
          Normally for Instant Client RPMs on RHEL/Oracle Linux I'd use:
          with-oci8=instantclient (or just with-oci8 if I don't have ORACLE_HOME set) and let the install heuristics locate the libs and header files.
          I'm more than happy to add new heuristics for common scenarios, if patches
          for platforms I don't have access to are sent in.

          If you use --with-oci8=instantclient,/somedir then, yes, it will look fot
          the 'blob' installed from the Instant Client zips.

          If the issue is the doc or inline help, send in suggestions for improvement.
          • 2. Re: OCI 1.4.9 build problem
            Gogala Mladen
            Yes, that was the way I used it: -with-oci8=instantclient,/usr/lib/oracle/11.2/client64
            My ORACLE_HOME was set to instantclient,/usr/lib/oracle/11.2/client64, PATH was set to $ORACLE_HOME/bin and LD_LIBRARY_PATH was set to $ORACLE_HOME/lib. TWO_TASK was set to "RAC11", which is a pair of virtual machines running RAC
            Instant client RPM packages were downloaded from the Oracle Technology Network. Next time around, I will do as you described.
            • 3. Re: OCI 1.4.9 build problem
              Try with-oci8=instantclient,/usr/lib/oracle/11.2/client64/lib instead of with-oci8=instantclient,/usr/lib/oracle/11.2/client64

              I don't like to see ORACLE_HOME set for Instant Client. It's confusing to overload the variable's meaning. Use TNS_ADMIN if you need tnsnames.ora and/or sqlnet.ora files.