Rabu, 02 Januari 2019

How to fix pdo_oci.c:34:1: error: unknown type name 'function_entry' error

  Tidak ada komentar
How to fix pdo_oci.c:34:1: error: unknown type name 'function_entry' error
[root@pelaut233 PDO_OCI-1.0]# make
/bin/sh /root/PDO_OCI-1.0/libtool --mode=compile cc -I -I. -I/root/PDO_OCI-1.0 -DPHP_ATOM_INC -I/root/PDO_OCI-1.0/include -I/root/PDO_OCI-1.0/main -I/root/PDO_OCI-1.0 -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/client  -DHAVE_CONFIG_H  -g -O2   -c /root/PDO_OCI-1.0/pdo_oci.c -o pdo_oci.lo
libtool: compile:  cc -I -I. -I/root/PDO_OCI-1.0 -DPHP_ATOM_INC -I/root/PDO_OCI-1.0/include -I/root/PDO_OCI-1.0/main -I/root/PDO_OCI-1.0 -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/client -DHAVE_CONFIG_H -g -O2 -c /root/PDO_OCI-1.0/pdo_oci.c  -fPIC -DPIC -o .libs/pdo_oci.o
/root/PDO_OCI-1.0/pdo_oci.c:34:1: error: unknown type name 'function_entry'
 function_entry pdo_oci_functions[] = {
 ^
/root/PDO_OCI-1.0/pdo_oci.c:35:2: warning: braces around scalar initializer [enabled by default]
  {NULL, NULL, NULL}
  ^
/root/PDO_OCI-1.0/pdo_oci.c:35:2: warning: (near initialization for 'pdo_oci_functions[0]') [enabled by default]
/root/PDO_OCI-1.0/pdo_oci.c:35:2: warning: initialization makes integer from pointer without a cast [enabled by default]
/root/PDO_OCI-1.0/pdo_oci.c:35:2: warning: (near initialization for 'pdo_oci_functions[0]') [enabled by default]
/root/PDO_OCI-1.0/pdo_oci.c:35:2: warning: excess elements in scalar initializer [enabled by default]
/root/PDO_OCI-1.0/pdo_oci.c:35:2: warning: (near initialization for 'pdo_oci_functions[0]') [enabled by default]
/root/PDO_OCI-1.0/pdo_oci.c:35:2: warning: excess elements in scalar initializer [enabled by default]
/root/PDO_OCI-1.0/pdo_oci.c:35:2: warning: (near initialization for 'pdo_oci_functions[0]') [enabled by default]
/root/PDO_OCI-1.0/pdo_oci.c:56:2: warning: initialization from incompatible pointer type [enabled by default]
  pdo_oci_functions,
  ^
/root/PDO_OCI-1.0/pdo_oci.c:56:2: warning: (near initialization for 'pdo_oci_module_entry.functions') [enabled by default]
make: *** [pdo_oci.lo] Error 1
[root@pelaut233 PDO_OCI-1.0]#
Edit the file from Make Install
[root@pelaut233 PDO_OCI-1.0]# ls
acinclude.m4    config.h     config.status  CREDITS     Makefile            mkinstalldirs    php_pdo_oci.h
aclocal.m4      config.h.in  config.sub     include     Makefile.fragments  modules          php_pdo_oci_int.h
autom4te.cache  config.log   configure      install-sh  Makefile.global     oci_driver.c     run-tests.php
build           config.m4    configure.in   libtool     Makefile.objects    oci_statement.c
config.guess    config.nice  config.w32     ltmain.sh   missing             pdo_oci.c
[root@pelaut233 PDO_OCI-1.0]#
[root@pelaut233 PDO_OCI-1.0]# vi pdo_oci.c
[root@pelaut233 PDO_OCI-1.0]#
Edit the file from 
     33 /* {{{ pdo_oci_functions[] */
     34 function_entry pdo_oci_functions[] = {
     35         {NULL, NULL, NULL}
     36 };
     37 /* }}} */
To be following text  
     33 /* {{{ pdo_oci_functions[] */
     34 zend_function_entry pdo_oci_functions[] = {
     35         {NULL, NULL, NULL}
     36 };
     37 /* }}} */
Running make again
[root@pelaut233 PDO_OCI-1.0]# make
/bin/sh /root/PDO_OCI-1.0/libtool --mode=compile cc -I -I. -I/root/PDO_OCI-1.0 -DPHP_ATOM_INC -I/root/PDO_OCI-1.0/include -I/root/PDO_OCI-1.0/main -I/root/PDO_OCI-1.0 -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/client  -DHAVE_CONFIG_H  -g -O2   -c /root/PDO_OCI-1.0/pdo_oci.c -o pdo_oci.lo
libtool: compile:  cc -I -I. -I/root/PDO_OCI-1.0 -DPHP_ATOM_INC -I/root/PDO_OCI-1.0/include -I/root/PDO_OCI-1.0/main -I/root/PDO_OCI-1.0 -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/client -DHAVE_CONFIG_H -g -O2 -c /root/PDO_OCI-1.0/pdo_oci.c  -fPIC -DPIC -o .libs/pdo_oci.o
/bin/sh /root/PDO_OCI-1.0/libtool --mode=compile cc -I -I. -I/root/PDO_OCI-1.0 -DPHP_ATOM_INC -I/root/PDO_OCI-1.0/include -I/root/PDO_OCI-1.0/main -I/root/PDO_OCI-1.0 -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/client  -DHAVE_CONFIG_H  -g -O2   -c /root/PDO_OCI-1.0/oci_driver.c -o oci_driver.lo
libtool: compile:  cc -I -I. -I/root/PDO_OCI-1.0 -DPHP_ATOM_INC -I/root/PDO_OCI-1.0/include -I/root/PDO_OCI-1.0/main -I/root/PDO_OCI-1.0 -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/client -DHAVE_CONFIG_H -g -O2 -c /root/PDO_OCI-1.0/oci_driver.c  -fPIC -DPIC -o .libs/oci_driver.o
/bin/sh /root/PDO_OCI-1.0/libtool --mode=compile cc -I -I. -I/root/PDO_OCI-1.0 -DPHP_ATOM_INC -I/root/PDO_OCI-1.0/include -I/root/PDO_OCI-1.0/main -I/root/PDO_OCI-1.0 -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/client  -DHAVE_CONFIG_H  -g -O2   -c /root/PDO_OCI-1.0/oci_statement.c -o oci_statement.lo
libtool: compile:  cc -I -I. -I/root/PDO_OCI-1.0 -DPHP_ATOM_INC -I/root/PDO_OCI-1.0/include -I/root/PDO_OCI-1.0/main -I/root/PDO_OCI-1.0 -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/client -DHAVE_CONFIG_H -g -O2 -c /root/PDO_OCI-1.0/oci_statement.c  -fPIC -DPIC -o .libs/oci_statement.o
/bin/sh /root/PDO_OCI-1.0/libtool --mode=link cc -DPHP_ATOM_INC -I/root/PDO_OCI-1.0/include -I/root/PDO_OCI-1.0/main -I/root/PDO_OCI-1.0 -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/client  -DHAVE_CONFIG_H  -g -O2   -o pdo_oci.la -export-dynamic -avoid-version -prefer-pic -module -rpath /root/PDO_OCI-1.0/modules  pdo_oci.lo oci_driver.lo oci_statement.lo -Wl,-rpath,/usr/lib/oracle/12.1/client/lib -L/usr/lib/oracle/12.1/client/lib -lclntsh
libtool: link: cc -shared  -fPIC -DPIC  .libs/pdo_oci.o .libs/oci_driver.o .libs/oci_statement.o   -L/usr/lib/oracle/12.1/client/lib -lclntsh  -O2 -Wl,-rpath -Wl,/usr/lib/oracle/12.1/client/lib   -Wl,-soname -Wl,pdo_oci.so -o .libs/pdo_oci.so
libtool: link: ( cd ".libs" && rm -f "pdo_oci.la" && ln -s "../pdo_oci.la" "pdo_oci.la" )
/bin/sh /root/PDO_OCI-1.0/libtool --mode=install cp ./pdo_oci.la /root/PDO_OCI-1.0/modules
libtool: install: cp ./.libs/pdo_oci.so /root/PDO_OCI-1.0/modules/pdo_oci.so
libtool: install: cp ./.libs/pdo_oci.lai /root/PDO_OCI-1.0/modules/pdo_oci.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/sbin" ldconfig -n /root/PDO_OCI-1.0/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /root/PDO_OCI-1.0/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

[root@pelaut233 PDO_OCI-1.0]#
Running make install
[root@pelaut233 PDO_OCI-1.0]# make install
Installing shared extensions:     /usr/lib64/php/modules/
[root@pelaut233 PDO_OCI-1.0]#

Tidak ada komentar :

Posting Komentar