GoogleCloudPlatform / appengine-php-extension

Apache License 2.0
16 stars 13 forks source link

Can't compile using base image php:7.2 #7

Closed positlabs closed 2 years ago

positlabs commented 5 years ago

I'm trying to run dev_appserver.py inside of a docker container, but can't get this extension to compile for php7.2. Dockerfile and errors are below.

FROM php:7.2

RUN apt-get update && apt-get -y upgrade
RUN apt-get install -y autoconf automake libtool curl make g++ unzip wget git

# https://cloud.google.com/appengine/docs/standard/php/tools/using-local-server
# <dev_appserver.py>

# https://github.com/GoogleCloudPlatform/appengine-php-extension
# <appengine-php-extension>
# get protobuf
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protobuf-cpp-3.7.1.tar.gz && \
  tar xvzf protobuf-cpp-3.7.1.tar.gz && \
  rm protobuf-cpp-3.7.1.tar.gz

# build protobuf
RUN cd ./protobuf-3.7.1 && ./configure && make check && make install && ldconfig

RUN git clone https://github.com/GoogleCloudPlatform/appengine-php-extension.git

# generate source and header files
RUN cd appengine-php-extension && \
  protoc --cpp_out=. remote_api.proto && \
  protoc --cpp_out=. urlfetch_service.proto

# create php extension
RUN docker-php-ext-install sockets
RUN cd appengine-php-extension && \
   phpize && \
   ./configure --enable-gae --with-protobuf_inc=/usr/local/include --with-protobuf_lib=/usr/local/lib && \
   make

# </appengine-php-extension>
# </dev_appserver.py>

CMD ["tail" "-f" "/dev/null"]
# CMD ["dev_appserver.py", "--php_executable_path=/usr/local/bin/php", "--php_gae_extension_path=/workdir/appengine-php-extension/gae_runtime_module.so", "/var/www/html/app.yaml"]

Output of make:

root@8d7b90e604a0:/appengine-php-extension# make
/bin/bash /appengine-php-extension/libtool --mode=compile g++ -DUSE_REMOTE_API -fPIC -I/usr/local/include -I. -I/appengine-php-extension -DPHP_ATOM_INC -I/appengine-php-extension/include -I/appengine-php-extension/main -I/appengine-php-extension -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /appengine-php-extension/gae_runtime_module.cc -o gae_runtime_module.lo 
mkdir .libs
 g++ -DUSE_REMOTE_API -fPIC -I/usr/local/include -I. -I/appengine-php-extension -DPHP_ATOM_INC -I/appengine-php-extension/include -I/appengine-php-extension/main -I/appengine-php-extension -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /appengine-php-extension/gae_runtime_module.cc  -fPIC -DPIC -o .libs/gae_runtime_module.o
/appengine-php-extension/gae_runtime_module.cc:669:23: error: macro "zend_hash_add" passed 6 arguments, but takes just 3
                   NULL);
                       ^
/appengine-php-extension/gae_runtime_module.cc:781:75: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
   ZVAL_STRING(z_function_name, kVirtualFileSystemInitializeFunctionName, 0);
                                                                           ^
/appengine-php-extension/gae_runtime_module.cc:794:75: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
     ZVAL_STRING(z_function_name, kVirtualFileSystemIntiailizeMethodName, 0);
                                                                           ^
/appengine-php-extension/gae_runtime_module.cc:1045:21: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
                    1);
                     ^
/appengine-php-extension/gae_runtime_module.cc:1050:22: error: macro "add_assoc_stringl" passed 5 arguments, but takes just 4
                     1);
                      ^
/appengine-php-extension/gae_runtime_module.cc:1089:76: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
   add_assoc_string(error_array, "file_name", const_cast<char*>(filename), 1);
                                                                            ^
/appengine-php-extension/gae_runtime_module.cc:1094:72: error: macro "add_assoc_stringl" passed 5 arguments, but takes just 4
   add_assoc_stringl(error_array, "error_message", buffer, buffer_len, 0);
                                                                        ^
/appengine-php-extension/gae_runtime_module.cc:1203:53: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
         add_assoc_string(return_value, key, *data, 1);
                                                     ^
/appengine-php-extension/gae_runtime_module.cc:1347:52: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
   ZVAL_STRING(z_function_name, kGlobFunctionName, 1);
                                                    ^
/appengine-php-extension/gae_runtime_module.cc:1348:50: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
   ZVAL_STRINGL(z_pattern, pattern, pattern_len, 1);
                                                  ^
/appengine-php-extension/gae_runtime_module.cc:1398:55: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
   ZVAL_STRING(z_function_name, kTempnamFunctionName, 1);
                                                       ^
/appengine-php-extension/gae_runtime_module.cc:1399:38: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
   ZVAL_STRINGL(z_dir, dir, dir_len, 1);
                                      ^
/appengine-php-extension/gae_runtime_module.cc:1400:47: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
   ZVAL_STRINGL(z_prefix, prefix, prefix_len, 1);
                                               ^
/appengine-php-extension/gae_runtime_module.cc:1436:61: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
   ZVAL_STRING(z_function_name, kSysGetTempDirFunctionName, 1);
                                                             ^
/appengine-php-extension/gae_runtime_module.cc:1497:40: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
   ZVAL_STRINGL(z_args[0], to, to_len, 1);
                                        ^
/appengine-php-extension/gae_runtime_module.cc:1498:50: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
   ZVAL_STRINGL(z_args[1], subject, subject_len, 1);
                                                  ^
/appengine-php-extension/gae_runtime_module.cc:1499:50: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
   ZVAL_STRINGL(z_args[2], message, message_len, 1);
                                                  ^
/appengine-php-extension/gae_runtime_module.cc:1502:52: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
     ZVAL_STRINGL(z_args[3], headers, headers_len, 1);
                                                    ^
/appengine-php-extension/gae_runtime_module.cc:1508:56: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
     ZVAL_STRINGL(z_args[4], extra_cmd, extra_cmd_len, 1);
                                                        ^
/appengine-php-extension/gae_runtime_module.cc:1513:52: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
   ZVAL_STRING(z_function_name, kMailFunctionName, 1);
                                                    ^
/appengine-php-extension/gae_runtime_module.cc:1555:65: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
   ZVAL_STRING(z_function_name, kClearGcsStatCacheFunctionName, 1);
                                                                 ^
/appengine-php-extension/gae_runtime_module.cc:1556:52: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
   ZVAL_STRINGL(z_args[0], filename, filename_len, 0);
                                                    ^
/appengine-php-extension/gae_runtime_module.cc:1588:59: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
   ZVAL_STRING(z_function_name, kGetHostnameFunctionName, 1);
                                                           ^
/appengine-php-extension/gae_runtime_module.cc:1632:64: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
   ZVAL_STRING(z_function_name, kMoveUploadedFileFunctionName, 1);
                                                                ^
/appengine-php-extension/gae_runtime_module.cc:1633:52: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
   ZVAL_STRINGL(z_args[0], filename, filename_len, 1);
                                                    ^
/appengine-php-extension/gae_runtime_module.cc:1634:58: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
   ZVAL_STRINGL(z_args[1], destination, destination_len, 1);
                                                          ^
/appengine-php-extension/gae_runtime_module.cc:1683:51: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
   ZVAL_STRING(z_function_name, kLogFunctionName, 1);
                                                   ^
/appengine-php-extension/gae_runtime_module.cc:1685:50: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
   ZVAL_STRINGL(z_args[1], message, message_len, 1);
                                                  ^
/appengine-php-extension/gae_runtime_module.cc:91:32: warning: unknown option after '#pragma GCC diagnostic' kind [-Wpragmas]
 #pragma GCC diagnostic ignored "-Wwritable-strings"  // PHP APIs not const safe.
                                ^~~~~~~~~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc: In function 'int replace_function(const char*, zend_function_entry*)':
/appengine-php-extension/gae_runtime_module.cc:283:46: error: cannot convert 'const char*' to 'zend_string* {aka _zend_string*}' for argument '2' to 'int zend_hash_del(HashTable*, zend_string*)'
                     strlen(function_name) + 1) == FAILURE) {
                                              ^
/appengine-php-extension/gae_runtime_module.cc: In function 'void delete_functions(int, int)':
/appengine-php-extension/gae_runtime_module.cc:312:48: error: cannot convert 'const char*' to 'zend_string* {aka _zend_string*}' for argument '2' to 'int zend_hash_del(HashTable*, zend_string*)'
                       functions[i].length() + 1);
                                                ^
/appengine-php-extension/gae_runtime_module.cc: In function 'void disable_socket_functions(int, int)':
/appengine-php-extension/gae_runtime_module.cc:372:63: error: cannot convert 'const char*' to 'zend_string* {aka _zend_string*}' for argument '2' to 'zval* zend_hash_find(const HashTable*, zend_string*)'
                      reinterpret_cast<void**>(&sockets_module)) == SUCCESS &&
                                                               ^
/appengine-php-extension/gae_runtime_module.cc: In function 'void zend_update_ini_entry(const char*, const char*)':
/appengine-php-extension/gae_runtime_module.cc:418:55: error: cannot convert 'const char*' to 'zend_string* {aka _zend_string*}' for argument '2' to 'zval* zend_hash_find(const HashTable*, zend_string*)'
                      reinterpret_cast<void **>(&entry)) == FAILURE) {
                                                       ^
/appengine-php-extension/gae_runtime_module.cc:425:18: error: cannot convert 'char*' to 'zend_string* {aka _zend_string*}' in assignment
   entry->value = duplicate;
                  ^~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc:426:10: error: 'zend_ini_entry {aka struct _zend_ini_entry}' has no member named 'value_length'
   entry->value_length = strlen(duplicate) + 1;
          ^~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc: In function 'void load_user_ini(int, int)':
/appengine-php-extension/gae_runtime_module.cc:498:56: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
                           user_ini_hash_table TSRMLS_CC);
                                                        ^
/appengine-php-extension/gae_runtime_module.cc: In function 'int get_user_ini_string(const char*, const char**)':
/appengine-php-extension/gae_runtime_module.cc:507:52: error: cannot convert 'const char*' to 'zend_string* {aka _zend_string*}' for argument '2' to 'zval* zend_hash_find(const HashTable*, zend_string*)'
                      reinterpret_cast<void**>(&tmp)) == FAILURE) {
                                                    ^
In file included from /usr/local/include/php/main/php.h:472:0,
                 from /appengine-php-extension/gae_runtime_module.h:25,
                 from /appengine-php-extension/gae_runtime_module.cc:18:
/appengine-php-extension/gae_runtime_module.cc: In function 'void enable_allowed_include_streams(int, int)':
/usr/local/include/php/Zend/zend_constants.h:44:136: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
 #define REGISTER_STRING_CONSTANT(name, str, flags)  zend_register_string_constant((name), sizeof(name)-1, (str), (flags), module_number)
                                                                                                                                        ^
/appengine-php-extension/gae_runtime_module.cc:565:5: note: in expansion of macro 'REGISTER_STRING_CONSTANT'
     REGISTER_STRING_CONSTANT("GAE_INCLUDE_GS_BUCKETS",
     ^~~~~~~~~~~~~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc: In function 'void load_redirect_paths(int, int)':
/appengine-php-extension/gae_runtime_module.cc:664:5: error: 'zend_hash_add' was not declared in this scope
     zend_hash_add(redirect_path_hash_table,
     ^~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc: In function 'bool appengine::is_redirect_path(const char*, char**)':
/appengine-php-extension/gae_runtime_module.cc:733:42: error: cannot convert 'char**' to 'zend_string** {aka _zend_string**}' for argument '2' to 'int zend_hash_get_current_key_ex(const HashTable*, zend_string**, zend_ulong*, HashPosition*)'
                                      &pos) == HASH_KEY_IS_STRING) {
                                          ^
/appengine-php-extension/gae_runtime_module.cc:739:47: error: cannot convert 'void**' to 'HashPosition* {aka unsigned int*}' for argument '2' to 'zval* zend_hash_get_current_data_ex(HashTable*, HashPosition*)'
                                           &pos) == SUCCESS) {
                                               ^
/appengine-php-extension/gae_runtime_module.cc: In function 'php_stream_wrapper* appengine::get_correct_stream_wrapper(const char*, char**, int)':
/appengine-php-extension/gae_runtime_module.cc:765:59: error: invalid conversion from 'char**' to 'const char**' [-fpermissive]
                                          options TSRMLS_CC);
                                                           ^
In file included from /usr/local/include/php/main/php.h:464:0,
                 from /appengine-php-extension/gae_runtime_module.h:25,
                 from /appengine-php-extension/gae_runtime_module.cc:18:
/usr/local/include/php/main/php_streams.h:569:28: note:   initializing argument 2 of 'php_stream_wrapper* php_stream_locate_url_wrapper(const char*, const char**, int)'
 PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper(const char *path, const char **path_for_open, int options);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc:769:59: error: invalid conversion from 'char**' to 'const char**' [-fpermissive]
                                          options TSRMLS_CC);
                                                           ^
In file included from /usr/local/include/php/main/php.h:464:0,
                 from /appengine-php-extension/gae_runtime_module.h:25,
                 from /appengine-php-extension/gae_runtime_module.cc:18:
/usr/local/include/php/main/php_streams.h:569:28: note:   initializing argument 2 of 'php_stream_wrapper* php_stream_locate_url_wrapper(const char*, const char**, int)'
 PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper(const char *path, const char **path_for_open, int options);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc: In function 'bool initialize_virtual_filesystem()':
/appengine-php-extension/gae_runtime_module.cc:779:32: error: 'MAKE_STD_ZVAL' was not declared in this scope
   MAKE_STD_ZVAL(z_function_name);
                                ^
/appengine-php-extension/gae_runtime_module.cc:781:3: error: 'ZVAL_STRING' was not declared in this scope
   ZVAL_STRING(z_function_name, kVirtualFileSystemInitializeFunctionName, 0);
   ^~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:39:0,
                 from /appengine-php-extension/gae_runtime_module.h:25,
                 from /appengine-php-extension/gae_runtime_module.cc:18:
/usr/local/include/php/Zend/zend_API.h:492:82: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '1' to 'int _call_user_function_ex(zval*, zval*, zval*, uint32_t, zval*, int)'
  _call_user_function_ex(object, function_name, retval_ptr, param_count, params, 1)
                                                                                  ^
/appengine-php-extension/gae_runtime_module.cc:797:9: note: in expansion of macro 'call_user_function'
     if (call_user_function(NULL,
         ^~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/Zend/zend.h:37:0,
                 from /usr/local/include/php/main/php.h:35,
                 from /appengine-php-extension/gae_runtime_module.h:25,
                 from /appengine-php-extension/gae_runtime_module.cc:18:
/usr/local/include/php/Zend/zend_variables.h:87:76: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '1' to 'void _zval_ptr_dtor(zval*)'
 #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                                                            ^
/appengine-php-extension/gae_runtime_module.cc:805:9: note: in expansion of macro 'zval_ptr_dtor'
         zval_ptr_dtor(&z_method_retval);
         ^~~~~~~~~~~~~
/usr/local/include/php/Zend/zend_variables.h:87:76: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '1' to 'void _zval_ptr_dtor(zval*)'
 #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                                                            ^
/appengine-php-extension/gae_runtime_module.cc:818:5: note: in expansion of macro 'zval_ptr_dtor'
     zval_ptr_dtor(&z_retval);
     ^~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc: In function 'void zif_make_call(zend_execute_data*, zval*)':
/appengine-php-extension/gae_runtime_module.cc:1010:62: error: cannot convert 'char**' to 'zend_string** {aka _zend_string**}' for argument '3' to 'zend_bool zend_is_callable(zval*, uint32_t, zend_string**)'
       !zend_is_callable(callback, 0, &callback_name TSRMLS_CC)) {
                                                              ^
/appengine-php-extension/gae_runtime_module.cc:1042:3: error: 'add_assoc_string' was not declared in this scope
   add_assoc_string(result_array,
   ^~~~~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc:1046:3: error: 'add_assoc_stringl' was not declared in this scope
   add_assoc_stringl(result_array,
   ^~~~~~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc: In function 'void lint_error_handler(int, const char*, uint, const char*, __va_list_tag*)':
/appengine-php-extension/gae_runtime_module.cc:1086:28: error: 'MAKE_STD_ZVAL' was not declared in this scope
   MAKE_STD_ZVAL(error_array);
                            ^
/appengine-php-extension/gae_runtime_module.cc:1089:3: error: 'add_assoc_string' was not declared in this scope
   add_assoc_string(error_array, "file_name", const_cast<char*>(filename), 1);
   ^~~~~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc:1094:3: error: 'add_assoc_stringl' was not declared in this scope
   add_assoc_stringl(error_array, "error_message", buffer, buffer_len, 0);
   ^~~~~~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc: In function 'void zif_lint_string(zend_execute_data*, zval*)':
/appengine-php-extension/gae_runtime_module.cc:1123:8: error: 'return_value_used' was not declared in this scope
   if (!return_value_used) {
        ^~~~~~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc:1145:20: error: incompatible types in assignment of 'char*' to 'char [1]'
     Z_STRVAL(pv) = script_code;
                    ^~~~~~~~~~~
In file included from /usr/local/include/php/Zend/zend.h:29:0,
                 from /usr/local/include/php/main/php.h:35,
                 from /appengine-php-extension/gae_runtime_module.h:25,
                 from /appengine-php-extension/gae_runtime_module.cc:18:
/usr/local/include/php/Zend/zend_types.h:368:23: error: lvalue required as left operand of assignment
 #define IS_STRING     6
                       ^
/appengine-php-extension/gae_runtime_module.cc:1146:18: note: in expansion of macro 'IS_STRING'
     Z_TYPE(pv) = IS_STRING;
                  ^~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc: In function 'void zif_get_stream_redirect_paths(zend_execute_data*, zval*)':
/appengine-php-extension/gae_runtime_module.cc:1198:42: error: cannot convert 'char**' to 'zend_string** {aka _zend_string**}' for argument '2' to 'int zend_hash_get_current_key_ex(const HashTable*, zend_string**, zend_ulong*, HashPosition*)'
                                      &pos) == HASH_KEY_IS_STRING) {
                                          ^
/appengine-php-extension/gae_runtime_module.cc:1202:45: error: cannot convert 'void**' to 'HashPosition* {aka unsigned int*}' for argument '2' to 'zval* zend_hash_get_current_data_ex(HashTable*, HashPosition*)'
                                         &pos) == SUCCESS) {
                                             ^
/appengine-php-extension/gae_runtime_module.cc:1203:9: error: 'add_assoc_string' was not declared in this scope
         add_assoc_string(return_value, key, *data, 1);
         ^~~~~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc: In function 'void zif___remove_uploaded_file(zend_execute_data*, zval*)':
/appengine-php-extension/gae_runtime_module.cc:1307:37: error: cannot convert 'char*' to 'zend_string* {aka _zend_string*}' for argument '2' to 'zend_bool zend_hash_exists(const HashTable*, zend_string*)'
                         name_len + 1)) {
                                     ^
/appengine-php-extension/gae_runtime_module.cc:1312:63: error: cannot convert 'char*' to 'zend_string* {aka _zend_string*}' for argument '2' to 'int zend_hash_del(HashTable*, zend_string*)'
   zend_hash_del(SG(rfc1867_uploaded_files), name, name_len + 1);
                                                               ^
/appengine-php-extension/gae_runtime_module.cc: In function 'void zif_glob(zend_execute_data*, zval*)':
/appengine-php-extension/gae_runtime_module.cc:1342:32: error: 'MAKE_STD_ZVAL' was not declared in this scope
   MAKE_STD_ZVAL(z_function_name);
                                ^
/appengine-php-extension/gae_runtime_module.cc:1347:3: error: 'ZVAL_STRING' was not declared in this scope
   ZVAL_STRING(z_function_name, kGlobFunctionName, 1);
   ^~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc:1348:3: error: 'ZVAL_STRINGL' was not declared in this scope
   ZVAL_STRINGL(z_pattern, pattern, pattern_len, 1);
   ^~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:39:0,
                 from /appengine-php-extension/gae_runtime_module.h:25,
                 from /appengine-php-extension/gae_runtime_module.cc:18:
/usr/local/include/php/Zend/zend_API.h:492:82: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '5' to 'int _call_user_function_ex(zval*, zval*, zval*, uint32_t, zval*, int)'
  _call_user_function_ex(object, function_name, retval_ptr, param_count, params, 1)
                                                                                  ^
/appengine-php-extension/gae_runtime_module.cc:1355:7: note: in expansion of macro 'call_user_function'
   if (call_user_function(EG(function_table),
       ^~~~~~~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc:1362:49: error: 'COPY_PZVAL_TO_ZVAL' was not declared in this scope
       COPY_PZVAL_TO_ZVAL(*return_value, z_retval);
                                                 ^
In file included from /usr/local/include/php/Zend/zend.h:37:0,
                 from /usr/local/include/php/main/php.h:35,
                 from /appengine-php-extension/gae_runtime_module.h:25,
                 from /appengine-php-extension/gae_runtime_module.cc:18:
/usr/local/include/php/Zend/zend_variables.h:87:76: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '1' to 'void _zval_ptr_dtor(zval*)'
 #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                                                            ^
/appengine-php-extension/gae_runtime_module.cc:1369:3: note: in expansion of macro 'zval_ptr_dtor'
   zval_ptr_dtor(&z_function_name);
   ^~~~~~~~~~~~~
/usr/local/include/php/Zend/zend_variables.h:87:76: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '1' to 'void _zval_ptr_dtor(zval*)'
 #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                                                            ^
/appengine-php-extension/gae_runtime_module.cc:1370:3: note: in expansion of macro 'zval_ptr_dtor'
   zval_ptr_dtor(&z_pattern);
   ^~~~~~~~~~~~~
/usr/local/include/php/Zend/zend_variables.h:87:76: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '1' to 'void _zval_ptr_dtor(zval*)'
 #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                                                            ^
/appengine-php-extension/gae_runtime_module.cc:1371:3: note: in expansion of macro 'zval_ptr_dtor'
   zval_ptr_dtor(&z_flags);
   ^~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc: In function 'void zif_userspace_tempnam(zend_execute_data*, zval*)':
/appengine-php-extension/gae_runtime_module.cc:1393:32: error: 'MAKE_STD_ZVAL' was not declared in this scope
   MAKE_STD_ZVAL(z_function_name);
                                ^
/appengine-php-extension/gae_runtime_module.cc:1398:3: error: 'ZVAL_STRING' was not declared in this scope
   ZVAL_STRING(z_function_name, kTempnamFunctionName, 1);
   ^~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc:1399:3: error: 'ZVAL_STRINGL' was not declared in this scope
   ZVAL_STRINGL(z_dir, dir, dir_len, 1);
   ^~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:39:0,
                 from /appengine-php-extension/gae_runtime_module.h:25,
                 from /appengine-php-extension/gae_runtime_module.cc:18:
/usr/local/include/php/Zend/zend_API.h:492:82: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '5' to 'int _call_user_function_ex(zval*, zval*, zval*, uint32_t, zval*, int)'
  _call_user_function_ex(object, function_name, retval_ptr, param_count, params, 1)
                                                                                  ^
/appengine-php-extension/gae_runtime_module.cc:1405:7: note: in expansion of macro 'call_user_function'
   if (call_user_function(EG(function_table),
       ^~~~~~~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc:1412:49: error: 'COPY_PZVAL_TO_ZVAL' was not declared in this scope
       COPY_PZVAL_TO_ZVAL(*return_value, z_retval);
                                                 ^
In file included from /usr/local/include/php/Zend/zend.h:37:0,
                 from /usr/local/include/php/main/php.h:35,
                 from /appengine-php-extension/gae_runtime_module.h:25,
                 from /appengine-php-extension/gae_runtime_module.cc:18:
/usr/local/include/php/Zend/zend_variables.h:87:76: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '1' to 'void _zval_ptr_dtor(zval*)'
 #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                                                            ^
/appengine-php-extension/gae_runtime_module.cc:1419:3: note: in expansion of macro 'zval_ptr_dtor'
   zval_ptr_dtor(&z_function_name);
   ^~~~~~~~~~~~~
/usr/local/include/php/Zend/zend_variables.h:87:76: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '1' to 'void _zval_ptr_dtor(zval*)'
 #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                                                            ^
/appengine-php-extension/gae_runtime_module.cc:1420:3: note: in expansion of macro 'zval_ptr_dtor'
   zval_ptr_dtor(&z_dir);
   ^~~~~~~~~~~~~
/usr/local/include/php/Zend/zend_variables.h:87:76: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '1' to 'void _zval_ptr_dtor(zval*)'
 #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                                                            ^
/appengine-php-extension/gae_runtime_module.cc:1421:3: note: in expansion of macro 'zval_ptr_dtor'
   zval_ptr_dtor(&z_prefix);
   ^~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc: In function 'void zif_userspace_sys_get_temp_dir(zend_execute_data*, zval*)':
/appengine-php-extension/gae_runtime_module.cc:1433:32: error: 'MAKE_STD_ZVAL' was not declared in this scope
   MAKE_STD_ZVAL(z_function_name);
                                ^
/appengine-php-extension/gae_runtime_module.cc:1436:3: error: 'ZVAL_STRING' was not declared in this scope
   ZVAL_STRING(z_function_name, kSysGetTempDirFunctionName, 1);
   ^~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc:1445:49: error: 'COPY_PZVAL_TO_ZVAL' was not declared in this scope
       COPY_PZVAL_TO_ZVAL(*return_value, z_retval);
                                                 ^
In file included from /usr/local/include/php/Zend/zend.h:37:0,
                 from /usr/local/include/php/main/php.h:35,
                 from /appengine-php-extension/gae_runtime_module.h:25,
                 from /appengine-php-extension/gae_runtime_module.cc:18:
/usr/local/include/php/Zend/zend_variables.h:87:76: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '1' to 'void _zval_ptr_dtor(zval*)'
 #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                                                            ^
/appengine-php-extension/gae_runtime_module.cc:1452:3: note: in expansion of macro 'zval_ptr_dtor'
   zval_ptr_dtor(&z_function_name);
   ^~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc: In function 'void zif_userspace_mail(zend_execute_data*, zval*)':
/appengine-php-extension/gae_runtime_module.cc:1491:32: error: 'MAKE_STD_ZVAL' was not declared in this scope
   MAKE_STD_ZVAL(z_function_name);
                                ^
/appengine-php-extension/gae_runtime_module.cc:1497:3: error: 'ZVAL_STRINGL' was not declared in this scope
   ZVAL_STRINGL(z_args[0], to, to_len, 1);
   ^~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc:1513:3: error: 'ZVAL_STRING' was not declared in this scope
   ZVAL_STRING(z_function_name, kMailFunctionName, 1);
   ^~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:39:0,
                 from /appengine-php-extension/gae_runtime_module.h:25,
                 from /appengine-php-extension/gae_runtime_module.cc:18:
/usr/local/include/php/Zend/zend_API.h:492:82: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '5' to 'int _call_user_function_ex(zval*, zval*, zval*, uint32_t, zval*, int)'
  _call_user_function_ex(object, function_name, retval_ptr, param_count, params, 1)
                                                                                  ^
/appengine-php-extension/gae_runtime_module.cc:1515:7: note: in expansion of macro 'call_user_function'
   if (call_user_function(EG(function_table),
       ^~~~~~~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc:1522:49: error: 'COPY_PZVAL_TO_ZVAL' was not declared in this scope
       COPY_PZVAL_TO_ZVAL(*return_value, z_retval);
                                                 ^
In file included from /usr/local/include/php/Zend/zend.h:37:0,
                 from /usr/local/include/php/main/php.h:35,
                 from /appengine-php-extension/gae_runtime_module.h:25,
                 from /appengine-php-extension/gae_runtime_module.cc:18:
/usr/local/include/php/Zend/zend_variables.h:87:76: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '1' to 'void _zval_ptr_dtor(zval*)'
 #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                                                            ^
/appengine-php-extension/gae_runtime_module.cc:1529:3: note: in expansion of macro 'zval_ptr_dtor'
   zval_ptr_dtor(&z_function_name);
   ^~~~~~~~~~~~~
/usr/local/include/php/Zend/zend_variables.h:87:76: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '1' to 'void _zval_ptr_dtor(zval*)'
 #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                                                            ^
/appengine-php-extension/gae_runtime_module.cc:1531:5: note: in expansion of macro 'zval_ptr_dtor'
     zval_ptr_dtor(&z_args[i]);
     ^~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc: In function 'void zif_gcs_clearstatcache(zend_execute_data*, zval*)':
/appengine-php-extension/gae_runtime_module.cc:1551:32: error: 'MAKE_STD_ZVAL' was not declared in this scope
   MAKE_STD_ZVAL(z_function_name);
                                ^
/appengine-php-extension/gae_runtime_module.cc:1555:3: error: 'ZVAL_STRING' was not declared in this scope
   ZVAL_STRING(z_function_name, kClearGcsStatCacheFunctionName, 1);
   ^~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc:1556:3: error: 'ZVAL_STRINGL' was not declared in this scope
   ZVAL_STRINGL(z_args[0], filename, filename_len, 0);
   ^~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:39:0,
                 from /appengine-php-extension/gae_runtime_module.h:25,
                 from /appengine-php-extension/gae_runtime_module.cc:18:
/usr/local/include/php/Zend/zend_API.h:492:82: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '5' to 'int _call_user_function_ex(zval*, zval*, zval*, uint32_t, zval*, int)'
  _call_user_function_ex(object, function_name, retval_ptr, param_count, params, 1)
                                                                                  ^
/appengine-php-extension/gae_runtime_module.cc:1560:7: note: in expansion of macro 'call_user_function'
   if (call_user_function(EG(function_table),
       ^~~~~~~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc:1569:22: error: 'FREE_ZVAL' was not declared in this scope
   FREE_ZVAL(z_args[0]);
                      ^
/appengine-php-extension/gae_runtime_module.cc: In function 'void zif_userspace_gethostname(zend_execute_data*, zval*)':
/appengine-php-extension/gae_runtime_module.cc:1585:32: error: 'MAKE_STD_ZVAL' was not declared in this scope
   MAKE_STD_ZVAL(z_function_name);
                                ^
/appengine-php-extension/gae_runtime_module.cc:1588:3: error: 'ZVAL_STRING' was not declared in this scope
   ZVAL_STRING(z_function_name, kGetHostnameFunctionName, 1);
   ^~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc:1599:49: error: 'COPY_PZVAL_TO_ZVAL' was not declared in this scope
       COPY_PZVAL_TO_ZVAL(*return_value, z_retval);
                                                 ^
In file included from /usr/local/include/php/Zend/zend.h:37:0,
                 from /usr/local/include/php/main/php.h:35,
                 from /appengine-php-extension/gae_runtime_module.h:25,
                 from /appengine-php-extension/gae_runtime_module.cc:18:
/usr/local/include/php/Zend/zend_variables.h:87:76: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '1' to 'void _zval_ptr_dtor(zval*)'
 #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                                                            ^
/appengine-php-extension/gae_runtime_module.cc:1602:3: note: in expansion of macro 'zval_ptr_dtor'
   zval_ptr_dtor(&z_function_name);
   ^~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc: In function 'void zif_userspace_move_uploaded_file(zend_execute_data*, zval*)':
/appengine-php-extension/gae_runtime_module.cc:1626:32: error: 'MAKE_STD_ZVAL' was not declared in this scope
   MAKE_STD_ZVAL(z_function_name);
                                ^
/appengine-php-extension/gae_runtime_module.cc:1632:3: error: 'ZVAL_STRING' was not declared in this scope
   ZVAL_STRING(z_function_name, kMoveUploadedFileFunctionName, 1);
   ^~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc:1633:3: error: 'ZVAL_STRINGL' was not declared in this scope
   ZVAL_STRINGL(z_args[0], filename, filename_len, 1);
   ^~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:39:0,
                 from /appengine-php-extension/gae_runtime_module.h:25,
                 from /appengine-php-extension/gae_runtime_module.cc:18:
/usr/local/include/php/Zend/zend_API.h:492:82: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '5' to 'int _call_user_function_ex(zval*, zval*, zval*, uint32_t, zval*, int)'
  _call_user_function_ex(object, function_name, retval_ptr, param_count, params, 1)
                                                                                  ^
/appengine-php-extension/gae_runtime_module.cc:1641:7: note: in expansion of macro 'call_user_function'
   if (call_user_function(EG(function_table),
       ^~~~~~~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc:1648:49: error: 'COPY_PZVAL_TO_ZVAL' was not declared in this scope
       COPY_PZVAL_TO_ZVAL(*return_value, z_retval);
                                                 ^
In file included from /usr/local/include/php/Zend/zend.h:37:0,
                 from /usr/local/include/php/main/php.h:35,
                 from /appengine-php-extension/gae_runtime_module.h:25,
                 from /appengine-php-extension/gae_runtime_module.cc:18:
/usr/local/include/php/Zend/zend_variables.h:87:76: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '1' to 'void _zval_ptr_dtor(zval*)'
 #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                                                            ^
/appengine-php-extension/gae_runtime_module.cc:1655:3: note: in expansion of macro 'zval_ptr_dtor'
   zval_ptr_dtor(&z_function_name);
   ^~~~~~~~~~~~~
/usr/local/include/php/Zend/zend_variables.h:87:76: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '1' to 'void _zval_ptr_dtor(zval*)'
 #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                                                            ^
/appengine-php-extension/gae_runtime_module.cc:1657:5: note: in expansion of macro 'zval_ptr_dtor'
     zval_ptr_dtor(&z_args[i]);
     ^~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc: In function 'void zif_userspace_syslog(zend_execute_data*, zval*)':
/appengine-php-extension/gae_runtime_module.cc:1678:32: error: 'MAKE_STD_ZVAL' was not declared in this scope
   MAKE_STD_ZVAL(z_function_name);
                                ^
/appengine-php-extension/gae_runtime_module.cc:1683:3: error: 'ZVAL_STRING' was not declared in this scope
   ZVAL_STRING(z_function_name, kLogFunctionName, 1);
   ^~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc:1685:3: error: 'ZVAL_STRINGL' was not declared in this scope
   ZVAL_STRINGL(z_args[1], message, message_len, 1);
   ^~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:39:0,
                 from /appengine-php-extension/gae_runtime_module.h:25,
                 from /appengine-php-extension/gae_runtime_module.cc:18:
/usr/local/include/php/Zend/zend_API.h:492:82: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '5' to 'int _call_user_function_ex(zval*, zval*, zval*, uint32_t, zval*, int)'
  _call_user_function_ex(object, function_name, retval_ptr, param_count, params, 1)
                                                                                  ^
/appengine-php-extension/gae_runtime_module.cc:1687:7: note: in expansion of macro 'call_user_function'
   if (call_user_function(EG(function_table),
       ^~~~~~~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc:1697:49: error: 'COPY_PZVAL_TO_ZVAL' was not declared in this scope
       COPY_PZVAL_TO_ZVAL(*return_value, z_retval);
                                                 ^
In file included from /usr/local/include/php/Zend/zend.h:37:0,
                 from /usr/local/include/php/main/php.h:35,
                 from /appengine-php-extension/gae_runtime_module.h:25,
                 from /appengine-php-extension/gae_runtime_module.cc:18:
/usr/local/include/php/Zend/zend_variables.h:87:76: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '1' to 'void _zval_ptr_dtor(zval*)'
 #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                                                            ^
/appengine-php-extension/gae_runtime_module.cc:1701:3: note: in expansion of macro 'zval_ptr_dtor'
   zval_ptr_dtor(&z_function_name);
   ^~~~~~~~~~~~~
/usr/local/include/php/Zend/zend_variables.h:87:76: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '1' to 'void _zval_ptr_dtor(zval*)'
 #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                                                            ^
/appengine-php-extension/gae_runtime_module.cc:1702:3: note: in expansion of macro 'zval_ptr_dtor'
   zval_ptr_dtor(&z_args[0]);
   ^~~~~~~~~~~~~
/usr/local/include/php/Zend/zend_variables.h:87:76: error: cannot convert 'zval** {aka _zval_struct**}' to 'zval* {aka _zval_struct*}' for argument '1' to 'void _zval_ptr_dtor(zval*)'
 #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                                                            ^
/appengine-php-extension/gae_runtime_module.cc:1703:3: note: in expansion of macro 'zval_ptr_dtor'
   zval_ptr_dtor(&z_args[1]);
   ^~~~~~~~~~~~~
/appengine-php-extension/gae_runtime_module.cc: In function 'void zend_replace_functions(const zend_function_entry*)':
/appengine-php-extension/gae_runtime_module.cc:1840:79: error: cannot convert 'const char* const' to 'zend_string* {aka _zend_string*}' for argument '2' to 'int zend_hash_del(HashTable*, zend_string*)'
     zend_hash_del(CG(function_table), fe_ptr->fname, strlen(fe_ptr->fname) + 1);
                                                                               ^
Makefile:194: recipe for target 'gae_runtime_module.lo' failed
make: *** [gae_runtime_module.lo] Error 1
positlabs commented 5 years ago

I see that the dev server isn't available for 7.2 in the docs... is this extension the reason why? https://cloud.google.com/appengine/docs/standard/php/tools/using-local-server

Screen Shot 2019-05-14 at 6 19 16 PM
bshaffer commented 2 years ago

Sorry I'm 3 years late here, but the reason is that dev_appserver.py is for App Engine Standard generation 1, and 7.2+ is on App Engine Standard Gen 2.