kjdev/php-ext-jq

Build Error -> PHP Version? Makefile:193: recipe for target 'jq.lo' failed?

mskenderian-wps opened this issue · 2 comments

running phpize

Configuring for:
PHP Api Version:         20180731
Zend Module Api No:      20180731
Zend Extension Api No:   320180731

running ./configure
Partial Output:

checking PHP version... #define PHP_VERSION "7.3.7-2+ubuntu18.04.1+deb.sury.org+1"
./configure: line 3890: test: too many arguments
./configure: line 3894: test: too many arguments

Full Output:

checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20180731
checking for PHP installed headers prefix... /usr/include/php/20180731
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 1.0.1 (ok)
checking for gawk... gawk
checking PHP version... #define PHP_VERSION "7.3.7-2+ubuntu18.04.1+deb.sury.org+1"
./configure: line 3890: test: too many arguments
./configure: line 3894: test: too many arguments
checking whether to enable jq support... yes, shared
checking whether to enable coverage support... no
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing libtool commands

running make
Output:
/home/vagrant/php-ext-jq/jq.c: At top level:
/home/vagrant/php-ext-jq/jq.c:560:8: error: unknown type name ‘zend_object_value’
static zend_object_value
^~~~~~~~~~~~~~~~~

/bin/bash /home/vagrant/php-ext-jq/libtool --mode=compile cc  -I. -I/home/vagrant/php-ext-jq -DPHP_ATOM_INC -I/home/vagrant/php-ext-jq/include -I/home/vagrant/php-ext-jq/main -I/home/vagrant/php-ext-jq -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib -I/home/vagrant/php-ext-jq/jq  -DHAVE_CONFIG_H  -g -O2   -c /home/vagrant/php-ext-jq/jq.c -o jq.lo
libtool: compile:  cc -I. -I/home/vagrant/php-ext-jq -DPHP_ATOM_INC -I/home/vagrant/php-ext-jq/include -I/home/vagrant/php-ext-jq/main -I/home/vagrant/php-ext-jq -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib -I/home/vagrant/php-ext-jq/jq -DHAVE_CONFIG_H -g -O2 -c /home/vagrant/php-ext-jq/jq.c  -fPIC -DPIC -o .libs/jq.o
/home/vagrant/php-ext-jq/jq.c: In function ‘php_jq_err_cb’:
/home/vagrant/php-ext-jq/jq.c:89:13: warning: format not a string literal and no format arguments [-Wformat-security]
             PHP_JQ_ERR(E_WARNING, jv_string_value(dump));
             ^~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c: In function ‘zim_Jq___construct’:
/home/vagrant/php-ext-jq/jq.c:76:24: warning: implicit declaration of function ‘zend_object_store_get_object’; did you mean ‘zend_objects_store_destroy’? [-Wimplicit-function-declaration]
     self = (php_jq_t *)zend_object_store_get_object(obj TSRMLS_CC)
                        ^
/home/vagrant/php-ext-jq/jq.c:116:5: note: in expansion of macro ‘PHP_JQ_OBJ’
     PHP_JQ_OBJ(intern, getThis());
     ^~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c:76:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     self = (php_jq_t *)zend_object_store_get_object(obj TSRMLS_CC)
            ^
/home/vagrant/php-ext-jq/jq.c:116:5: note: in expansion of macro ‘PHP_JQ_OBJ’
     PHP_JQ_OBJ(intern, getThis());
     ^~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c: In function ‘zim_Jq_load’:
/home/vagrant/php-ext-jq/jq.c:76:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     self = (php_jq_t *)zend_object_store_get_object(obj TSRMLS_CC)
            ^
/home/vagrant/php-ext-jq/jq.c:142:5: note: in expansion of macro ‘PHP_JQ_OBJ’
     PHP_JQ_OBJ(intern, getThis());
     ^~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c: In function ‘zim_Jq_loadFile’:
/home/vagrant/php-ext-jq/jq.c:76:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     self = (php_jq_t *)zend_object_store_get_object(obj TSRMLS_CC)
            ^
/home/vagrant/php-ext-jq/jq.c:182:5: note: in expansion of macro ‘PHP_JQ_OBJ’
     PHP_JQ_OBJ(intern, getThis());
     ^~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c:196:67: error: macro "php_stream_copy_to_mem" passed 4 arguments, but takes just 3
     if ((len = php_stream_copy_to_mem(stream, &contents, maxlen, 0)) > 0) {
                                                                   ^
/home/vagrant/php-ext-jq/jq.c:196:16: error: ‘php_stream_copy_to_mem’ undeclared (first use in this function); did you mean ‘_php_stream_copy_to_mem’?
     if ((len = php_stream_copy_to_mem(stream, &contents, maxlen, 0)) > 0) {
                ^~~~~~~~~~~~~~~~~~~~~~
                _php_stream_copy_to_mem
/home/vagrant/php-ext-jq/jq.c:196:16: note: each undeclared identifier is reported only once for each function it appears in
/home/vagrant/php-ext-jq/jq.c: In function ‘php_jv_dump’:
/home/vagrant/php-ext-jq/jq.c:231:13: warning: implicit declaration of function ‘INIT_PZVAL’; did you mean ‘ZVAL_ZVAL’? [-Wimplicit-function-declaration]
             INIT_PZVAL(*return_value);
             ^~~~~~~~~~
             ZVAL_ZVAL
/home/vagrant/php-ext-jq/jq.c:260:71: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
                 ZVAL_STRINGL(*return_value, jv_string_value(x), len, 1);
                                                                       ^
/home/vagrant/php-ext-jq/jq.c:260:17: error: ‘ZVAL_STRINGL’ undeclared (first use in this function); did you mean ‘ZEND_STR_NULL’?
                 ZVAL_STRINGL(*return_value, jv_string_value(x), len, 1);
                 ^~~~~~~~~~~~
                 ZEND_STR_NULL
/home/vagrant/php-ext-jq/jq.c:276:21: warning: implicit declaration of function ‘ALLOC_INIT_ZVAL’ [-Wimplicit-function-declaration]
                     ALLOC_INIT_ZVAL(zv);
                     ^~~~~~~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c:278:49: warning: implicit declaration of function ‘Z_ARRVAL_PP’; did you mean ‘Z_ARRVAL_P’? [-Wimplicit-function-declaration]
                     zend_hash_next_index_insert(Z_ARRVAL_PP(return_value),
                                                 ^~~~~~~~~~~
                                                 Z_ARRVAL_P
/home/vagrant/php-ext-jq/jq.c:278:49: warning: passing argument 1 of ‘zend_hash_next_index_insert’ makes pointer from integer without a cast [-Wint-conversion]
In file included from /usr/include/php/20180731/Zend/zend.h:32:0,
                 from /usr/include/php/20180731/main/php.h:34,
                 from /home/vagrant/php-ext-jq/jq.c:5:
/usr/include/php/20180731/Zend/zend_hash.h:127:30: note: expected ‘HashTable * {aka struct _zend_array *}’ but argument is of type ‘int’
 ZEND_API zval* ZEND_FASTCALL zend_hash_next_index_insert(HashTable *ht, zval *pData);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c:279:49: warning: passing argument 2 of ‘zend_hash_next_index_insert’ from incompatible pointer type [-Wincompatible-pointer-types]
                                                 &zv, sizeof(zv), NULL);
                                                 ^
In file included from /usr/include/php/20180731/Zend/zend.h:32:0,
                 from /usr/include/php/20180731/main/php.h:34,
                 from /home/vagrant/php-ext-jq/jq.c:5:
/usr/include/php/20180731/Zend/zend_hash.h:127:30: note: expected ‘zval * {aka struct _zval_struct *}’ but argument is of type ‘zval ** {aka struct _zval_struct **}’
 ZEND_API zval* ZEND_FASTCALL zend_hash_next_index_insert(HashTable *ht, zval *pData);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c:278:21: error: too many arguments to function ‘zend_hash_next_index_insert’
                     zend_hash_next_index_insert(Z_ARRVAL_PP(return_value),
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php/20180731/Zend/zend.h:32:0,
                 from /usr/include/php/20180731/main/php.h:34,
                 from /home/vagrant/php-ext-jq/jq.c:5:
/usr/include/php/20180731/Zend/zend_hash.h:127:30: note: declared here
 ZEND_API zval* ZEND_FASTCALL zend_hash_next_index_insert(HashTable *ht, zval *pData);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c:312:38: warning: passing argument 1 of ‘zend_symtable_update’ makes pointer from integer without a cast [-Wint-conversion]
                 zend_symtable_update(Z_ARRVAL_PP(return_value),
                                      ^~~~~~~~~~~
In file included from /usr/include/php/20180731/Zend/zend.h:32:0,
                 from /usr/include/php/20180731/main/php.h:34,
                 from /home/vagrant/php-ext-jq/jq.c:5:
/usr/include/php/20180731/Zend/zend_hash.h:398:33: note: expected ‘HashTable * {aka struct _zend_array *}’ but argument is of type ‘int’
 static zend_always_inline zval *zend_symtable_update(HashTable *ht, zend_string *key, zval *pData)
                                 ^~~~~~~~~~~~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c:313:38: warning: passing argument 2 of ‘zend_symtable_update’ from incompatible pointer type [-Wincompatible-pointer-types]
                                      jv_string_value(key),
                                      ^~~~~~~~~~~~~~~
In file included from /usr/include/php/20180731/Zend/zend.h:32:0,
                 from /usr/include/php/20180731/main/php.h:34,
                 from /home/vagrant/php-ext-jq/jq.c:5:
/usr/include/php/20180731/Zend/zend_hash.h:398:33: note: expected ‘zend_string * {aka struct _zend_string *}’ but argument is of type ‘const char *’
 static zend_always_inline zval *zend_symtable_update(HashTable *ht, zend_string *key, zval *pData)
                                 ^~~~~~~~~~~~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c:314:38: warning: passing argument 3 of ‘zend_symtable_update’ makes pointer from integer without a cast [-Wint-conversion]
                                      jv_string_length_bytes(jv_copy(key)) + 1,
                                      ^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php/20180731/Zend/zend.h:32:0,
                 from /usr/include/php/20180731/main/php.h:34,
                 from /home/vagrant/php-ext-jq/jq.c:5:
/usr/include/php/20180731/Zend/zend_hash.h:398:33: note: expected ‘zval * {aka struct _zval_struct *}’ but argument is of type ‘int’
 static zend_always_inline zval *zend_symtable_update(HashTable *ht, zend_string *key, zval *pData)
                                 ^~~~~~~~~~~~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c:312:17: error: too many arguments to function ‘zend_symtable_update’
                 zend_symtable_update(Z_ARRVAL_PP(return_value),
                 ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php/20180731/Zend/zend.h:32:0,
                 from /usr/include/php/20180731/main/php.h:34,
                 from /home/vagrant/php-ext-jq/jq.c:5:
/usr/include/php/20180731/Zend/zend_hash.h:398:33: note: declared here
 static zend_always_inline zval *zend_symtable_update(HashTable *ht, zend_string *key, zval *pData)
                                 ^~~~~~~~~~~~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c: In function ‘php_jq_filter’:
/home/vagrant/php-ext-jq/jq.c:342:63: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
                     ZVAL_STRING(zv, jv_string_value(result), 1);
                                                               ^
/home/vagrant/php-ext-jq/jq.c:342:21: error: ‘ZVAL_STRING’ undeclared (first use in this function); did you mean ‘JV_KIND_STRING’?
                     ZVAL_STRING(zv, jv_string_value(result), 1);
                     ^~~~~~~~~~~
                     JV_KIND_STRING
/home/vagrant/php-ext-jq/jq.c:346:65: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
                         ZVAL_STRING(zv, jv_string_value(dump), 1);
                                                                 ^
/home/vagrant/php-ext-jq/jq.c:356:49: warning: passing argument 1 of ‘zend_hash_next_index_insert’ makes pointer from integer without a cast [-Wint-conversion]
                     zend_hash_next_index_insert(Z_ARRVAL_PP(return_value),
                                                 ^~~~~~~~~~~
In file included from /usr/include/php/20180731/Zend/zend.h:32:0,
                 from /usr/include/php/20180731/main/php.h:34,
                 from /home/vagrant/php-ext-jq/jq.c:5:
/usr/include/php/20180731/Zend/zend_hash.h:127:30: note: expected ‘HashTable * {aka struct _zend_array *}’ but argument is of type ‘int’
 ZEND_API zval* ZEND_FASTCALL zend_hash_next_index_insert(HashTable *ht, zval *pData);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c:357:49: warning: passing argument 2 of ‘zend_hash_next_index_insert’ from incompatible pointer type [-Wincompatible-pointer-types]
                                                 &zv, sizeof(zv), NULL);
                                                 ^
In file included from /usr/include/php/20180731/Zend/zend.h:32:0,
                 from /usr/include/php/20180731/main/php.h:34,
                 from /home/vagrant/php-ext-jq/jq.c:5:
/usr/include/php/20180731/Zend/zend_hash.h:127:30: note: expected ‘zval * {aka struct _zval_struct *}’ but argument is of type ‘zval ** {aka struct _zval_struct **}’
 ZEND_API zval* ZEND_FASTCALL zend_hash_next_index_insert(HashTable *ht, zval *pData);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c:356:21: error: too many arguments to function ‘zend_hash_next_index_insert’
                     zend_hash_next_index_insert(Z_ARRVAL_PP(return_value),
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php/20180731/Zend/zend.h:32:0,
                 from /usr/include/php/20180731/main/php.h:34,
                 from /home/vagrant/php-ext-jq/jq.c:5:
/usr/include/php/20180731/Zend/zend_hash.h:127:30: note: declared here
 ZEND_API zval* ZEND_FASTCALL zend_hash_next_index_insert(HashTable *ht, zval *pData);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c:369:41: warning: passing argument 1 of ‘zend_hash_next_index_insert’ makes pointer from integer without a cast [-Wint-conversion]
             zend_hash_next_index_insert(Z_ARRVAL_PP(return_value),
                                         ^~~~~~~~~~~
In file included from /usr/include/php/20180731/Zend/zend.h:32:0,
                 from /usr/include/php/20180731/main/php.h:34,
                 from /home/vagrant/php-ext-jq/jq.c:5:
/usr/include/php/20180731/Zend/zend_hash.h:127:30: note: expected ‘HashTable * {aka struct _zend_array *}’ but argument is of type ‘int’
 ZEND_API zval* ZEND_FASTCALL zend_hash_next_index_insert(HashTable *ht, zval *pData);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c:370:41: warning: passing argument 2 of ‘zend_hash_next_index_insert’ from incompatible pointer type [-Wincompatible-pointer-types]
                                         &zv, sizeof(zv), NULL);
                                         ^
In file included from /usr/include/php/20180731/Zend/zend.h:32:0,
                 from /usr/include/php/20180731/main/php.h:34,
                 from /home/vagrant/php-ext-jq/jq.c:5:
/usr/include/php/20180731/Zend/zend_hash.h:127:30: note: expected ‘zval * {aka struct _zval_struct *}’ but argument is of type ‘zval ** {aka struct _zval_struct **}’
 ZEND_API zval* ZEND_FASTCALL zend_hash_next_index_insert(HashTable *ht, zval *pData);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c:369:13: error: too many arguments to function ‘zend_hash_next_index_insert’
             zend_hash_next_index_insert(Z_ARRVAL_PP(return_value),
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php/20180731/Zend/zend.h:32:0,
                 from /usr/include/php/20180731/main/php.h:34,
                 from /home/vagrant/php-ext-jq/jq.c:5:
/usr/include/php/20180731/Zend/zend_hash.h:127:30: note: declared here
 ZEND_API zval* ZEND_FASTCALL zend_hash_next_index_insert(HashTable *ht, zval *pData);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c: In function ‘zim_Jq_filter’:
/home/vagrant/php-ext-jq/jq.c:76:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     self = (php_jq_t *)zend_object_store_get_object(obj TSRMLS_CC)
            ^
/home/vagrant/php-ext-jq/jq.c:398:5: note: in expansion of macro ‘PHP_JQ_OBJ’
     PHP_JQ_OBJ(intern, getThis());
     ^~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c: In function ‘zim_Jq_parseFile’:
/home/vagrant/php-ext-jq/jq.c:510:67: error: macro "php_stream_copy_to_mem" passed 4 arguments, but takes just 3
     if ((len = php_stream_copy_to_mem(stream, &contents, maxlen, 0)) > 0) {
                                                                   ^
/home/vagrant/php-ext-jq/jq.c:510:16: error: ‘php_stream_copy_to_mem’ undeclared (first use in this function); did you mean ‘_php_stream_copy_to_mem’?
     if ((len = php_stream_copy_to_mem(stream, &contents, maxlen, 0)) > 0) {
                ^~~~~~~~~~~~~~~~~~~~~~
                _php_stream_copy_to_mem
/home/vagrant/php-ext-jq/jq.c: At top level:
/home/vagrant/php-ext-jq/jq.c:560:8: error: unknown type name ‘zend_object_value’
 static zend_object_value
        ^~~~~~~~~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c: In function ‘php_jq_new_ex’:
/home/vagrant/php-ext-jq/jq.c:564:5: error: unknown type name ‘zend_object_value’; did you mean ‘zend_objects_store’?
     zend_object_value retval;
     ^~~~~~~~~~~~~~~~~
     zend_objects_store
/home/vagrant/php-ext-jq/jq.c:583:11: error: request for member ‘handle’ in something not a structure or union
     retval.handle = zend_objects_store_put(
           ^
/home/vagrant/php-ext-jq/jq.c:584:18: error: ‘zend_objects_store_dtor_t’ undeclared (first use in this function); did you mean ‘zend_objects_store_del’?
         intern, (zend_objects_store_dtor_t)zend_objects_destroy_object,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~
                  zend_objects_store_del
/home/vagrant/php-ext-jq/jq.c:584:44: error: expected ‘)’ before ‘zend_objects_destroy_object’
         intern, (zend_objects_store_dtor_t)zend_objects_destroy_object,
                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c:584:9: warning: passing argument 1 of ‘zend_objects_store_put’ from incompatible pointer type [-Wincompatible-pointer-types]
         intern, (zend_objects_store_dtor_t)zend_objects_destroy_object,
         ^~~~~~
In file included from /usr/include/php/20180731/Zend/zend_globals.h:33:0,
                 from /usr/include/php/20180731/Zend/zend_compile.h:708,
                 from /usr/include/php/20180731/Zend/zend_modules.h:24,
                 from /usr/include/php/20180731/Zend/zend_API.h:25,
                 from /usr/include/php/20180731/main/php.h:38,
                 from /home/vagrant/php-ext-jq/jq.c:5:
/usr/include/php/20180731/Zend/zend_objects_API.h:61:29: note: expected ‘zend_object * {aka struct _zend_object *}’ but argument is of type ‘php_jq_t * {aka struct <anonymous> *}’
 ZEND_API void ZEND_FASTCALL zend_objects_store_put(zend_object *object);
                             ^~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c:583:21: error: too many arguments to function ‘zend_objects_store_put’
     retval.handle = zend_objects_store_put(
                     ^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php/20180731/Zend/zend_globals.h:33:0,
                 from /usr/include/php/20180731/Zend/zend_compile.h:708,
                 from /usr/include/php/20180731/Zend/zend_modules.h:24,
                 from /usr/include/php/20180731/Zend/zend_API.h:25,
                 from /usr/include/php/20180731/main/php.h:38,
                 from /home/vagrant/php-ext-jq/jq.c:5:
/usr/include/php/20180731/Zend/zend_objects_API.h:61:29: note: declared here
 ZEND_API void ZEND_FASTCALL zend_objects_store_put(zend_object *object);
                             ^~~~~~~~~~~~~~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c:587:11: error: request for member ‘handlers’ in something not a structure or union
     retval.handlers = &php_jq_handlers;
           ^
/home/vagrant/php-ext-jq/jq.c: At top level:
/home/vagrant/php-ext-jq/jq.c:595:8: error: unknown type name ‘zend_object_value’
 static zend_object_value
        ^~~~~~~~~~~~~~~~~
/home/vagrant/php-ext-jq/jq.c: In function ‘zm_startup_jq’:
/home/vagrant/php-ext-jq/jq.c:614:22: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
     ce.create_object = php_jq_new;
                      ^
Makefile:193: recipe for target 'jq.lo' failed
make: *** [jq.lo] Error 1

Why does this fail?

kjdev commented

This is because it does not support PHP 7.
I will fix it.