Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to build workspace with set oci8=true #2790

Closed
dehuat opened this issue Dec 10, 2020 · 2 comments
Closed

failed to build workspace with set oci8=true #2790

dehuat opened this issue Dec 10, 2020 · 2 comments

Comments

@dehuat
Copy link

dehuat commented Dec 10, 2020

Description:

In the .env file, if set oci8 to true: PHP_FPM_INSTALL_OCI8=true, end with error on makefile oci8.lo.
If set oci8 to false, PHP_FPM_INSTALL_OCI8=false, and keep other settings same, it finished successfully. So the issue must be caused by the oci8.

Expected Behavior:

With PHP_FPM_INSTALL_OCI8=true in .env file, it should build successfully.

Context information:

Output of git rev-parse HEAD

c32bf95530f017d3c52784cf0fdeb7caef141628

Output of docker version

Client: Docker Engine - Community
 Cloud integration: 1.0.2
 Version:           19.03.13
 API version:       1.40
 Go version:        go1.13.15
 Git commit:        4484c46d9d
 Built:             Wed Sep 16 17:00:27 2020
 OS/Arch:           windows/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.13
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       4484c46d9d
  Built:            Wed Sep 16 17:07:04 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.3.7
  GitCommit:        8fba4e9a7d01810a393d5d25a3621dc101981175
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Output of docker-compose version

docker-compose version 1.27.4, build 40524192
docker-py version: 4.3.1
CPython version: 3.7.4
OpenSSL version: OpenSSL 1.1.1c  28 May 2019

System info: Mac, Windows or Linux. Include which disto/version

Windows 10 Education
version:    1909
OS build:  18363.1198 

Steps to reproduce the issue:

  1. in a windows 10 machine, install the latest docker for windows
  2. clone the laradock to the laravel application folder
  3. in .env file:
    3.1, change the php version; PHP_VERSION=7.2 (I tried 7.4 and 7.2, both failed)
    3.2, change COMPOSE_PATH_SEPARATOR from ":" to ";" (using Windows 10)
    3.3, change COMPOSE_PROJECT_NAME to anything you like
    3.4, set PHP_FPM_INSTALL_OCI8=true
    3.5, run docker-compose up -d nginx

Stacktrace & Additional info:

/tmp/pear/temp/oci8/oci8_arginfo.h:743:2: note: in expansion of macro ‘ZEND_DEP_FALIAS’
  ZEND_DEP_FALIAS(ocicollmax, oci_collection_max, arginfo_ocicollmax)
  ^
/tmp/pear/temp/oci8/oci8_arginfo.h:746:30: error: ‘arginfo_oci_new_collection’ undeclared here (not in a function)
  ZEND_FE(oci_new_collection, arginfo_oci_new_collection)
                              ^
/usr/include/php/20170718/Zend/zend_API.h:70:75: note: in definition of macro ‘ZEND_FENTRY’
 #define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags },
                                                                           ^
/tmp/pear/temp/oci8/oci8_arginfo.h:746:2: note: in expansion of macro ‘ZEND_FE’
  ZEND_FE(oci_new_collection, arginfo_oci_new_collection)
  ^
/tmp/pear/temp/oci8/oci8_arginfo.h:746:30: error: initializer element is not constant
  ZEND_FE(oci_new_collection, arginfo_oci_new_collection)
                              ^
/usr/include/php/20170718/Zend/zend_API.h:70:75: note: in definition of macro ‘ZEND_FENTRY’
 #define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags },
                                                                           ^
/tmp/pear/temp/oci8/oci8_arginfo.h:746:2: note: in expansion of macro ‘ZEND_FE’
  ZEND_FE(oci_new_collection, arginfo_oci_new_collection)
  ^
/tmp/pear/temp/oci8/oci8_arginfo.h:746:30: note: (near initialization for ‘ext_functions[119].arg_info’)
  ZEND_FE(oci_new_collection, arginfo_oci_new_collection)
                              ^
/usr/include/php/20170718/Zend/zend_API.h:70:75: note: in definition of macro ‘ZEND_FENTRY’
 #define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags },
                                                                           ^
/tmp/pear/temp/oci8/oci8_arginfo.h:746:2: note: in expansion of macro ‘ZEND_FE’
  ZEND_FE(oci_new_collection, arginfo_oci_new_collection)
  ^
/usr/include/php/20170718/Zend/zend_API.h:70:113: error: invalid operands to binary / (have ‘const zend_internal_arg_info * {aka const struct _zend_internal_arg_info *}’ and ‘long unsigned int’)
 #define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags },
                                                                                                                 ^
/usr/include/php/20170718/Zend/zend_API.h:76:38: note: in expansion of macro ‘ZEND_FENTRY’
 #define ZEND_FE(name, arg_info)      ZEND_FENTRY(name, ZEND_FN(name), arg_info, 0)
                                      ^
/tmp/pear/temp/oci8/oci8_arginfo.h:746:2: note: in expansion of macro ‘ZEND_FE’
  ZEND_FE(oci_new_collection, arginfo_oci_new_collection)
  ^
/usr/include/php/20170718/Zend/zend_API.h:70:85: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
 #define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags },
                                                                                     ^
/usr/include/php/20170718/Zend/zend_API.h:76:38: note: in expansion of macro ‘ZEND_FENTRY’
 #define ZEND_FE(name, arg_info)      ZEND_FENTRY(name, ZEND_FN(name), arg_info, 0)
                                      ^
/tmp/pear/temp/oci8/oci8_arginfo.h:746:2: note: in expansion of macro ‘ZEND_FE’
  ZEND_FE(oci_new_collection, arginfo_oci_new_collection)
  ^
/usr/include/php/20170718/Zend/zend_API.h:70:85: error: initializer element is not constant
 #define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags },
                                                                                     ^
/usr/include/php/20170718/Zend/zend_API.h:76:38: note: in expansion of macro ‘ZEND_FENTRY’
 #define ZEND_FE(name, arg_info)      ZEND_FENTRY(name, ZEND_FN(name), arg_info, 0)
                                      ^
/tmp/pear/temp/oci8/oci8_arginfo.h:746:2: note: in expansion of macro ‘ZEND_FE’
  ZEND_FE(oci_new_collection, arginfo_oci_new_collection)
  ^
/usr/include/php/20170718/Zend/zend_API.h:70:85: note: (near initialization for ‘ext_functions[119].num_args’)
 #define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags },
                                                                                     ^
/usr/include/php/20170718/Zend/zend_API.h:76:38: note: in expansion of macro ‘ZEND_FENTRY’
 #define ZEND_FE(name, arg_info)      ZEND_FENTRY(name, ZEND_FN(name), arg_info, 0)
                                      ^
/tmp/pear/temp/oci8/oci8_arginfo.h:746:2: note: in expansion of macro ‘ZEND_FE’
  ZEND_FE(oci_new_collection, arginfo_oci_new_collection)
  ^
/tmp/pear/temp/oci8/oci8_arginfo.h:432:34: error: initializer element is not constant
 #define arginfo_ocinewcollection arginfo_oci_new_collection
                                  ^
/usr/include/php/20170718/Zend/zend_API.h:70:75: note: in definition of macro ‘ZEND_FENTRY’
 #define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags },
                                                                           ^
/tmp/pear/temp/oci8/oci8_arginfo.h:747:2: note: in expansion of macro ‘ZEND_DEP_FALIAS’
  ZEND_DEP_FALIAS(ocinewcollection, oci_new_collection, arginfo_ocinewcollection)
  ^
/tmp/pear/temp/oci8/oci8_arginfo.h:747:56: note: in expansion of macro ‘arginfo_ocinewcollection’
  ZEND_DEP_FALIAS(ocinewcollection, oci_new_collection, arginfo_ocinewcollection)
                                                        ^
/tmp/pear/temp/oci8/oci8_arginfo.h:432:34: note: (near initialization for ‘ext_functions[120].arg_info’)
 #define arginfo_ocinewcollection arginfo_oci_new_collection
                                  ^
/usr/include/php/20170718/Zend/zend_API.h:70:75: note: in definition of macro ‘ZEND_FENTRY’
 #define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags },
                                                                           ^
/tmp/pear/temp/oci8/oci8_arginfo.h:747:2: note: in expansion of macro ‘ZEND_DEP_FALIAS’
  ZEND_DEP_FALIAS(ocinewcollection, oci_new_collection, arginfo_ocinewcollection)
  ^
/tmp/pear/temp/oci8/oci8_arginfo.h:747:56: note: in expansion of macro ‘arginfo_ocinewcollection’
  ZEND_DEP_FALIAS(ocinewcollection, oci_new_collection, arginfo_ocinewcollection)
                                                        ^
/usr/include/php/20170718/Zend/zend_API.h:70:113: error: invalid operands to binary / (have ‘const zend_internal_arg_info * {aka const struct _zend_internal_arg_info *}’ and ‘long unsigned int’)
 #define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags },
                                                                                                                 ^
/usr/include/php/20170718/Zend/zend_API.h:79:49: note: in expansion of macro ‘ZEND_FENTRY’
 #define ZEND_DEP_FALIAS(name, alias, arg_info)  ZEND_FENTRY(name, ZEND_FN(alias), arg_info, ZEND_ACC_DEPRECATED)
                                                 ^
/tmp/pear/temp/oci8/oci8_arginfo.h:747:2: note: in expansion of macro ‘ZEND_DEP_FALIAS’
  ZEND_DEP_FALIAS(ocinewcollection, oci_new_collection, arginfo_ocinewcollection)
  ^
/usr/include/php/20170718/Zend/zend_API.h:70:85: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
 #define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags },
                                                                                     ^
/usr/include/php/20170718/Zend/zend_API.h:79:49: note: in expansion of macro ‘ZEND_FENTRY’
 #define ZEND_DEP_FALIAS(name, alias, arg_info)  ZEND_FENTRY(name, ZEND_FN(alias), arg_info, ZEND_ACC_DEPRECATED)
                                                 ^
/tmp/pear/temp/oci8/oci8_arginfo.h:747:2: note: in expansion of macro ‘ZEND_DEP_FALIAS’
  ZEND_DEP_FALIAS(ocinewcollection, oci_new_collection, arginfo_ocinewcollection)
  ^
/usr/include/php/20170718/Zend/zend_API.h:70:85: error: initializer element is not constant
 #define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags },
                                                                                     ^
/usr/include/php/20170718/Zend/zend_API.h:79:49: note: in expansion of macro ‘ZEND_FENTRY’
 #define ZEND_DEP_FALIAS(name, alias, arg_info)  ZEND_FENTRY(name, ZEND_FN(alias), arg_info, ZEND_ACC_DEPRECATED)
                                                 ^
/tmp/pear/temp/oci8/oci8_arginfo.h:747:2: note: in expansion of macro ‘ZEND_DEP_FALIAS’
  ZEND_DEP_FALIAS(ocinewcollection, oci_new_collection, arginfo_ocinewcollection)
  ^
/usr/include/php/20170718/Zend/zend_API.h:70:85: note: (near initialization for ‘ext_functions[120].num_args’)
 #define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags },
                                                                                     ^
/usr/include/php/20170718/Zend/zend_API.h:79:49: note: in expansion of macro ‘ZEND_FENTRY’
 #define ZEND_DEP_FALIAS(name, alias, arg_info)  ZEND_FENTRY(name, ZEND_FN(alias), arg_info, ZEND_ACC_DEPRECATED)
                                                 ^
/tmp/pear/temp/oci8/oci8_arginfo.h:747:2: note: in expansion of macro ‘ZEND_DEP_FALIAS’
  ZEND_DEP_FALIAS(ocinewcollection, oci_new_collection, arginfo_ocinewcollection)
  ^
/tmp/pear/temp/oci8/oci8.c: In function ‘php_oci_do_connect’:
/tmp/pear/temp/oci8/oci8.c:880:3: warning: implicit declaration of function ‘Z_PARAM_STRING_OR_NULL’ [-Wimplicit-function-declaration]
   Z_PARAM_STRING_OR_NULL(dbname, dbname_len)
   ^
In file included from /usr/include/php/20170718/main/php.h:40:0,
                 from /tmp/pear/temp/oci8/oci8.c:31:
/usr/include/php/20170718/Zend/zend_API.h:785:2: error: lvalue required as increment operand
  ++_i; \
  ^
/usr/include/php/20170718/Zend/zend_API.h:1043:3: note: in expansion of macro ‘Z_PARAM_PROLOGUE’
   Z_PARAM_PROLOGUE(deref, separate); \
   ^
/usr/include/php/20170718/Zend/zend_API.h:1051:2: note: in expansion of macro ‘Z_PARAM_STRING_EX2’
  Z_PARAM_STRING_EX2(dest, dest_len, check_null, separate, separate)
  ^
/usr/include/php/20170718/Zend/zend_API.h:1054:2: note: in expansion of macro ‘Z_PARAM_STRING_EX’
  Z_PARAM_STRING_EX(dest, dest_len, 0, 0)
  ^
/tmp/pear/temp/oci8/oci8.c:881:3: note: in expansion of macro ‘Z_PARAM_STRING’
   Z_PARAM_STRING(charset, charset_len)
   ^
/usr/include/php/20170718/Zend/zend_API.h:785:4: error: expected ‘;’ before ‘_i’
  ++_i; \
    ^
/usr/include/php/20170718/Zend/zend_API.h:1043:3: note: in expansion of macro ‘Z_PARAM_PROLOGUE’
   Z_PARAM_PROLOGUE(deref, separate); \
   ^
/usr/include/php/20170718/Zend/zend_API.h:1051:2: note: in expansion of macro ‘Z_PARAM_STRING_EX2’
  Z_PARAM_STRING_EX2(dest, dest_len, check_null, separate, separate)
  ^
/usr/include/php/20170718/Zend/zend_API.h:1054:2: note: in expansion of macro ‘Z_PARAM_STRING_EX’
  Z_PARAM_STRING_EX(dest, dest_len, 0, 0)
  ^
/tmp/pear/temp/oci8/oci8.c:881:3: note: in expansion of macro ‘Z_PARAM_STRING’
   Z_PARAM_STRING(charset, charset_len)
   ^
/tmp/pear/temp/oci8/oci8.c: In function ‘php_oci_do_connect_ex’:
/tmp/pear/temp/oci8/oci8.c:1302:3: warning: implicit declaration of function ‘zend_register_persistent_resource_ex’ [-Wimplicit-function-declaration]
   zend_register_persistent_resource_ex(connection->hash_key, connection, le_pconnection);
   ^
In file included from /tmp/pear/temp/oci8/oci8.c:50:0:
/tmp/pear/temp/oci8/oci8.c: In function ‘php_oci_fetch_row’:
/tmp/pear/temp/oci8/php_oci8_int.h:377:3: warning: implicit declaration of function ‘RETURN_THROWS’ [-Wimplicit-function-declaration]
   RETURN_THROWS(); \
   ^
/tmp/pear/temp/oci8/oci8.c:1845:2: note: in expansion of macro ‘PHP_OCI_ZVAL_TO_STATEMENT’
  PHP_OCI_ZVAL_TO_STATEMENT(z_statement, invokedstatement);
  ^
Makefile:196: recipe for target 'oci8.lo' failed
make: *** [oci8.lo] Error 1
ERROR: `make' failed
ERROR: Service 'workspace' failed to build : The command '/bin/sh -c if [ ${INSTALL_OCI8} = true ]; then   apt-get update && apt-get install --no-install-recommends -y wget   && mkdir /opt/oracle       && cd /opt/oracle       && wget https://github.com/diogomascarenha/oracle-instantclient/raw/master/instantclient-basic-linux.x64-12.1.0.2.0.zip       && wget https://github.com/diogomascarenha/oracle-instantclient/raw/master/instantclient-sdk-linux.x64-12.1.0.2.0.zip
&& unzip /opt/oracle/instantclient-basic-linux.x64-12.1.0.2.0.zip -d /opt/oracle       && unzip /opt/oracle/instantclient-sdk-linux.x64-12.1.0.2.0.zip -d /opt/oracle       && ln -s /opt/oracle/instantclient_12_1/libclntsh.so.12.1 /opt/oracle/instantclient_12_1/libclntsh.so       && ln -s /opt/oracle/instantclient_12_1/libclntshcore.so.12.1 /opt/oracle/instantclient_12_1/libclntshcore.so       && ln -s /opt/oracle/instantclient_12_1/libocci.so.12.1 /opt/oracle/instantclient_12_1/libocci.so       && rm -rf /opt/oracle/*.zip   && apt-get update       && apt-get install --no-install-recommends -y           libaio-dev &&   if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then     echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.0.10;   else     echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8;   fi   && echo "extension=oci8.so" >> /etc/php/${LARADOCK_PHP_VERSION}/cli/php.ini   && php -m | grep -q 'oci8' ;fi' returned a non-zero code: 1
@dehuat
Copy link
Author

dehuat commented Dec 14, 2020

We resolved the issue:

In laradock folder, edit the "Dockerfile" in 2 subfolders "php-fpm" and "workspace":

in PHP OCI8 section, change from "pecl install oci8" to "'pecl install oci8-2.2.0"

@dehuat dehuat closed this as completed Dec 14, 2020
@Tefoh
Copy link

Tefoh commented Jul 16, 2021

i solved it with my oci8 version needed, look at this page: https://pecl.php.net/package/oci8 .
for php v8 you need to change "pecl install oci8-2.2.0" to "pecl install oci8" otherwise probably dont need for any change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants