php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68124 Can not compile OCI8 with Remi's PHP 5.6
Submitted: 2014-10-01 16:51 UTC Modified: 2014-10-05 18:40 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: afaurtosh at ucmerced dot edu Assigned: sixd (profile)
Status: Not a bug Package: OCI8 related
PHP Version: 5.6.0 OS: RHEL 6.5
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: afaurtosh at ucmerced dot edu
New email:
PHP Version: OS:

 

 [2014-10-01 16:51 UTC] afaurtosh at ucmerced dot edu
Description:
------------
When you follow the following procedure, to download and create the oci8 extension. It does hits an error. Below is the error, it seems that OCI8 can not be complied with PHP5.6 properly. 

I believe it is because ifdef HAVE_OCI8_DTRACE is somehow set.. when it shouldn't be.

This is the code that throws the error
------------------------------------
#ifdef HAVE_OCI8_DTRACE
#include "oci8_dtrace_gen.h"
#endif


This is the error that 5.6 when making it with 5.6 throws.
-------------------------------------
/bin/sh /opt/oracle/oci8-2.0.8/libtool --mode=compile cc  -I. -I/opt/oracle/oci8-2.0.8 -DPHP_ATOM_INC -I/opt/oracle/oci8-2.0.8/include -I/opt/oracle/oci8-2.0.8/main -I/opt/oracle/oci8-2.0.8 -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/12.1/client64  -DHAVE_CONFIG_H  -g -O2   -c /opt/oracle/oci8-2.0.8/oci8.c -o oci8.lo 
libtool: compile:  cc -I. -I/opt/oracle/oci8-2.0.8 -DPHP_ATOM_INC -I/opt/oracle/oci8-2.0.8/include -I/opt/oracle/oci8-2.0.8/main -I/opt/oracle/oci8-2.0.8 -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/12.1/client64 -DHAVE_CONFIG_H -g -O2 -c /opt/oracle/oci8-2.0.8/oci8.c  -fPIC -DPIC -o .libs/oci8.o
In file included from /opt/oracle/oci8-2.0.8/oci8.c:46:
/opt/oracle/oci8-2.0.8/php_oci8_int.h:48:29: error: oci8_dtrace_gen.h: No such file or directory
make: *** [oci8.lo] Error 1



Test script:
---------------
# go to the following website #
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html

# Download the basic and SDK version #
Download oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
Download oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm

sudo pear download pecl/oci8
sudo tar xvzf oci8-2.0.8.tgz 
cd oci8-2.0.8/
sudo phpize
sudo ./configure --with-oci8=shared,instantclient,/usr/lib/oracle/12.1/client64/lib/
make

Expected result:
----------------
When your run the script above it should make an oci8.so extension, as outlined here: http://php.net/manual/en/oci8.installation.php

It worked after i downgraded to php5.5 and it was able to compile correctly.

Actual result:
--------------
look at the button of the description

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-10-01 17:20 UTC] afaurtosh at ucmerced dot edu
Updated the test script with installing the rpm

# go to the following website #
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html

# Download the basic and SDK version #
Download oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
Download oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm

sudo rpm -ivh oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
sudo rpm -ivh oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm

sudo pear download pecl/oci8
sudo tar xvzf oci8-2.0.8.tgz 
cd oci8-2.0.8/
sudo phpize
sudo ./configure --with-oci8=shared,instantclient,/usr/lib/oracle/12.1/client64/lib/
make
 [2014-10-02 15:15 UTC] sixd@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: sixd
 [2014-10-02 15:15 UTC] sixd@php.net
What 'configure' options was PHP built with? What Systemtap / DTrace RPMs are installed?

Have you tried ./configure --enable-dtrace --with-oci8=...?

Also see http://php.net/manual/en/oci8.dtrace.php
 [2014-10-02 16:21 UTC] afaurtosh at ucmerced dot edu
-Status: Feedback +Status: Assigned
 [2014-10-02 16:21 UTC] afaurtosh at ucmerced dot edu
I installed php on my RHEL6.5 using the following commands:

sudo yum --enablerepo=remi,remi-php56 install php-fpm


====================================================================================
 Package                      Arch      Version                Repository      Size
====================================================================================
Installing:
 php-fpm                      x86_64    5.6.0-1.el6.remi.2     remi-php56     1.3 M
Installing for dependencies:
 php-cli                      x86_64    5.6.0-1.el6.remi.2     remi-php56     3.7 M
 php-common                   x86_64    5.6.0-1.el6.remi.2     remi-php56     1.0 M
 php-pear                     noarch    1:1.9.5-3.el6.remi     remi           375 k
 php-pecl-jsonc               x86_64    1.3.6-1.el6.remi.5.6.1 remi-php56      47 k
 php-pecl-zip                 x86_64    1.12.4-2.el6.remi.5.6  remi-php56     269 k
 php-process                  x86_64    5.6.0-1.el6.remi.2     remi-php56      56 k
 php-xml                      x86_64    5.6.0-1.el6.remi.2     remi-php56     208 k



sudo yum --enablerepo=remi,remi-php56 install php-devel

=====================================================================================
 Package                       Arch     Version                  Repository    Size
=====================================================================================
Installing:
 php-devel                     x86_64   5.6.0-1.el6.remi.2       remi-php56   1.2 M
Installing for dependencies:
 php-pecl-jsonc-devel          x86_64   1.3.6-1.el6.remi.5.6.1   remi-php56   25 k


I also don't think I have any Systemtap / DTrace RPMs installed, I can post my rpm -qa command if needed tho.

When I tried the command sudo ./configure --enable-dtrace --with-oci8=shared,instantclient,/usr/lib/oracle/12.1/client64/lib/

I got the following warning at the end: 

configure: WARNING: unrecognized options: --enable-dtrace

along with the same warning after I did a sudo make:

libtool: compile:  cc -I. -I/local/users/appadmin/oci8-2.0.8 -DPHP_ATOM_INC -I/local/users/appadmin/oci8-2.0.8/include -I/local/users/appadmin/oci8-2.0.8/main -I/local/users/appadmin/oci8-2.0.8 -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/12.1/client64 -DHAVE_CONFIG_H -g -O2 -c /local/users/appadmin/oci8-2.0.8/oci8.c  -fPIC -DPIC -o .libs/oci8.o
In file included from /local/users/appadmin/oci8-2.0.8/oci8.c:46:
/local/users/appadmin/oci8-2.0.8/php_oci8_int.h:48:29: error: oci8_dtrace_gen.h: No such file or directory
make: *** [oci8.lo] Error 1
 [2014-10-02 16:33 UTC] afaurtosh at ucmerced dot edu
Another thing I should note, is when I do run the ./configure command, it processes a lot of checks... I noticed that one of them was:

checking OCI8 DTrace support... no

So during the checks, it knows that I don't have DTrace support. However, it seems odd that #ifdef HAVE_OCI8_DTRACE is being defined, seems like a bug with how HAVE_OCI8_DTRACE is being defined.
 [2014-10-02 20:35 UTC] afaurtosh at ucmerced dot edu
I found out the bug! It's not a php bug, it's a configuration setting that is coming from the remi repository.

When you install "sudo yum --enablerepo=remi,remi-php56 install php-fpm"

It comes with a configuration php file.

The file is located in /usr/include/php/main/php_config.h 

This config has HAVE_OCI8_DTRACE defined

/* Defined to 1 if PHP OCI8 DTrace support was enabled during configuration */
#define HAVE_OCI8_DTRACE 1

Once you uncomment that out, it will make file correctly!
 [2014-10-03 14:55 UTC] sixd@php.net
-Status: Assigned +Status: Not a bug
 [2014-10-03 14:55 UTC] sixd@php.net
Remi's PHP was built with "DTrace Support enabled".  This means that
OCI8 is also expecting to be built with DTrace enabled - as shown by
the #define.

The preferred route would be to install OCI8 following
http://php.net/manual/en/oci8.dtrace.php.  Alternatively use phpize and do:

./configure --enable-dtrace --with-oci8=...

The workaround of commenting out HAVE_OCI8_DTRACE should be fine but
won't allow you to dynamically trace OCI8 if you want to investigate a
problem.

On RHEL you would use systemtap for tracing:
http://php.net/manual/en/features.dtrace.systemtap.php
On other platforms like Oracle Linux or Solaris you would use real
DTrace, which is better.
 [2014-10-05 18:40 UTC] sixd@php.net
-Summary: Can not compile OCI8 with PHP5.6 +Summary: Can not compile OCI8 with Remi's PHP 5.6
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 14:01:29 2024 UTC