recipe for target 'protobuf.lo' failed
LeVadim opened this issue · 8 comments
Makefile:193: recipe for target 'protobuf.lo' failed
make: *** [protobuf.lo] Error 1
Dear members!
I am getting this error when I am using:
- PHP 5.6
- PHP7.0
Both options leads to this error.
I've already spent 4 days struggling on this issue, any help would be very appreciated.
Thanks!!!
I'm having the same error with php7.0
root@97d4c9230b6b:~/downloads/php-protobuf# make
....
Makefile:193: recipe for target 'protobuf.lo' failed
make: *** [protobuf.lo] Error 1
root@97d4c9230b6b:~/downloads/php-protobuf# php -v
PHP 7.1.1 (cli) (built: Jan 24 2017 18:33:47) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
I am having the same same problem, here is the output of the make command:
PHP 7.1.1-1+deb.sury.org xenial+1 (cli) (built: Jan 20 2017 09:20:20) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.1-1+deb.sury.org~xenial+1, Copyright (c) 1999-2017, by Zend Technologies
@eurobubbler Unfortunately this extension doesn't support php7. But you can try it in this pull request: #63
@serggp You are indeed absolutely right 👍 ! Still, "make" failed with the same issue.
git clone https://github.com/serggp/php-protobuf
cd php-protobuf
git checkout -b php7
phpize
./configure
sudo make
/bin/bash /home/vagrant/php-protobuf/libtool --mode=compile cc -I. -I/home/vagrant/php-protobuf -DPHP_ATOM_INC -I/home/vagrant/php-protobuf/include -I/home/vagrant/php-protobuf/main -I/home/vagrant/php-protobuf -I/usr/include/php/20160303 -I/usr/include/php/20160303/main -I/usr/include/php/20160303/TSRM -I/usr/include/php/20160303/Zend -I/usr/include/php/20160303/ext -I/usr/include/php/20160303/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/vagrant/php-protobuf/protobuf.c -o protobuf.lo
libtool: compile: cc -I. -I/home/vagrant/php-protobuf -DPHP_ATOM_INC -I/home/vagrant/php-protobuf/include -I/home/vagrant/php-protobuf/main -I/home/vagrant/php-protobuf -I/usr/include/php/20160303 -I/usr/include/php/20160303/main -I/usr/include/php/20160303/TSRM -I/usr/include/php/20160303/Zend -I/usr/include/php/20160303/ext -I/usr/include/php/20160303/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/vagrant/php-protobuf/protobuf.c -fPIC -DPIC -o .libs/protobuf.o
/home/vagrant/php-protobuf/protobuf.c: In function ‘zim_ProtobufMessage___construct’:
/home/vagrant/php-protobuf/protobuf.c:101:2: warning: implicit declaration of function ‘ALLOC_INIT_ZVAL’ [-Wimplicit-function-declaration]
ALLOC_INIT_ZVAL(values);
^
In file included from /usr/include/php/20160303/main/php.h:40:0,
from /home/vagrant/php-protobuf/protobuf.c:1:
/home/vagrant/php-protobuf/protobuf.c: In function ‘zim_ProtobufMessage_append’:
/home/vagrant/php-protobuf/protobuf.c:62:35: error: ‘this_ptr’ undeclared (first use in this function)
#define RETURN_THIS() RETURN_ZVAL(this_ptr, 1, 0);
^
/usr/include/php/20160303/Zend/zend_API.h:607:17: note: in definition of macro ‘ZVAL_ZVAL’
zval *__zv = (zv);
^
/usr/include/php/20160303/Zend/zend_API.h:654:40: note: in expansion of macro ‘RETVAL_ZVAL’
#define RETURN_ZVAL(zv, copy, dtor) { RETVAL_ZVAL(zv, copy, dtor); return; }
^
/home/vagrant/php-protobuf/protobuf.c:62:23: note: in expansion of macro ‘RETURN_ZVAL’
#define RETURN_THIS() RETURN_ZVAL(this_ptr, 1, 0);
^
/home/vagrant/php-protobuf/protobuf.c:113:3: note: in expansion of macro ‘RETURN_THIS’
RETURN_THIS();
^
/home/vagrant/php-protobuf/protobuf.c:62:35: note: each undeclared identifier is reported only once for each function it appears in
#define RETURN_THIS() RETURN_ZVAL(this_ptr, 1, 0);
^
/usr/include/php/20160303/Zend/zend_API.h:607:17: note: in definition of macro ‘ZVAL_ZVAL’
zval *__zv = (zv);
^
/usr/include/php/20160303/Zend/zend_API.h:654:40: note: in expansion of macro ‘RETVAL_ZVAL’
#define RETURN_ZVAL(zv, copy, dtor) { RETVAL_ZVAL(zv, copy, dtor); return; }
^
/home/vagrant/php-protobuf/protobuf.c:62:23: note: in expansion of macro ‘RETURN_ZVAL’
#define RETURN_THIS() RETURN_ZVAL(this_ptr, 1, 0);
^
/home/vagrant/php-protobuf/protobuf.c:113:3: note: in expansion of macro ‘RETURN_THIS’
RETURN_THIS();
^
/home/vagrant/php-protobuf/protobuf.c: In function ‘zim_ProtobufMessage_clear’:
/home/vagrant/php-protobuf/protobuf.c:62:35: error: ‘this_ptr’ undeclared (first use in this function)
#define RETURN_THIS() RETURN_ZVAL(this_ptr, 1, 0);
^
/usr/include/php/20160303/Zend/zend_API.h:607:17: note: in definition of macro ‘ZVAL_ZVAL’
zval *__zv = (zv);
^
/usr/include/php/20160303/Zend/zend_API.h:654:40: note: in expansion of macro ‘RETVAL_ZVAL’
#define RETURN_ZVAL(zv, copy, dtor) { RETVAL_ZVAL(zv, copy, dtor); return; }
^
/home/vagrant/php-protobuf/protobuf.c:62:23: note: in expansion of macro ‘RETURN_ZVAL’
#define RETURN_THIS() RETURN_ZVAL(this_ptr, 1, 0);
^
/home/vagrant/php-protobuf/protobuf.c:142:3: note: in expansion of macro ‘RETURN_THIS’
RETURN_THIS();
^
/home/vagrant/php-protobuf/protobuf.c:147:6: warning: implicit declaration of function ‘Z_TYPE_PP’ [-Wimplicit-function-declaration]
if (Z_TYPE_PP(array) != IS_ARRAY) {
^
/home/vagrant/php-protobuf/protobuf.c:153:18: warning: implicit declaration of function ‘Z_ARRVAL_PP’ [-Wimplicit-function-declaration]
zend_hash_clean(Z_ARRVAL_PP(array));
^
/home/vagrant/php-protobuf/protobuf.c:153:18: warning: passing argument 1 of ‘zend_hash_clean’ makes pointer from integer without a cast [-Wint-conversion]
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:67:29: note: expected ‘HashTable * {aka struct _zend_array *}’ but argument is of type ‘int’
ZEND_API void ZEND_FASTCALL zend_hash_clean(HashTable *ht);
^
In file included from /home/vagrant/php-protobuf/protobuf.c:6:0:
/home/vagrant/php-protobuf/protobuf.c: In function ‘zim_ProtobufMessage_printDebugString’:
/home/vagrant/php-protobuf/protobuf.h:7:43: warning: passing argument 1 of ‘zend_hash_internal_pointer_reset_ex’ makes pointer from integer without a cast [-Wint-conversion]
for (zend_hash_internal_pointer_reset_ex((hash), (iter)); zend_hash_has_more_elements_ex((hash), (iter)) == SUCCESS; zend_hash_m
^
/home/vagrant/php-protobuf/protobuf.c:180:2: note: in expansion of macro ‘PB_FOREACH’
PB_FOREACH(&i, Z_ARRVAL_PP(values)) {
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:199:30: note: expected ‘HashTable * {aka struct _zend_array *}’ but argument is of type ‘int’
ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.h:7:91: warning: passing argument 1 of ‘zend_hash_get_current_key_type_ex’ makes pointer from integer without a cast [-Wint-conversion]
for (zend_hash_internal_pointer_reset_ex((hash), (iter)); zend_hash_has_more_elements_ex((hash), (iter)) == SUCCESS; zend_hash_m
^
/usr/include/php/20160303/Zend/zend_hash.h:192:37: note: in definition of macro ‘zend_hash_has_more_elements_ex’
(zend_hash_get_current_key_type_ex(ht, pos) == HASH_KEY_NON_EXISTENT ? FAILURE : SUCCESS)
^
/home/vagrant/php-protobuf/protobuf.c:180:2: note: in expansion of macro ‘PB_FOREACH’
PB_FOREACH(&i, Z_ARRVAL_PP(values)) {
^
/usr/include/php/20160303/Zend/zend_hash.h:197:30: note: expected ‘HashTable * {aka struct _zend_array *}’ but argument is of type ‘int’
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos);
^
In file included from /home/vagrant/php-protobuf/protobuf.c:6:0:
/home/vagrant/php-protobuf/protobuf.h:7:145: warning: passing argument 1 of ‘zend_hash_move_forward_ex’ makes pointer from integer without a cast [-Wint-conversion]
ointer_reset_ex((hash), (iter)); zend_hash_has_more_elements_ex((hash), (iter)) == SUCCESS; zend_hash_move_forward_ex((hash), (it
^
/home/vagrant/php-protobuf/protobuf.c:180:2: note: in expansion of macro ‘PB_FOREACH’
PB_FOREACH(&i, Z_ARRVAL_PP(values)) {
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:193:30: note: expected ‘HashTable * {aka struct _zend_array *}’ but argument is of type ‘int’
ZEND_API int ZEND_FASTCALL zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.c:181:32: warning: passing argument 1 of ‘zend_hash_get_current_key_ex’ makes pointer from integer without a cast [-Wint-conversion]
zend_hash_get_current_key_ex(Z_ARRVAL_PP(values), NULL, NULL, &field_number, 0, &i);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:195:30: note: expected ‘const HashTable * {aka const struct _zend_array *}’ but argument is of type ‘int’
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, Ha
^
/home/vagrant/php-protobuf/protobuf.c:181:65: warning: passing argument 4 of ‘zend_hash_get_current_key_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
zend_hash_get_current_key_ex(Z_ARRVAL_PP(values), NULL, NULL, &field_number, 0, &i);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:195:30: note: expected ‘HashPosition * {aka unsigned int *}’ but argument is of type ‘ulong * {aka long unsigned int *}’
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, Ha
^
/home/vagrant/php-protobuf/protobuf.c:181:3: error: too many arguments to function ‘zend_hash_get_current_key_ex’
zend_hash_get_current_key_ex(Z_ARRVAL_PP(values), NULL, NULL, &field_number, 0, &i);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:195:30: note: declared here
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, Ha
^
/home/vagrant/php-protobuf/protobuf.c:182:33: warning: passing argument 1 of ‘zend_hash_get_current_data_ex’ makes pointer from integer without a cast [-Wint-conversion]
zend_hash_get_current_data_ex(Z_ARRVAL_PP(values), (void **) &value, &i);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:198:30: note: expected ‘HashTable * {aka struct _zend_array }’ but argument is of type ‘int’
ZEND_API zval ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.c:182:54: warning: passing argument 2 of ‘zend_hash_get_current_data_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
zend_hash_get_current_data_ex(Z_ARRVAL_PP(values), (void **) &value, &i);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:198:30: note: expected ‘HashPosition * {aka unsigned int *}’ but argument is of type ‘void *’
ZEND_API zval ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.c:182:3: error: too many arguments to function ‘zend_hash_get_current_data_ex’
zend_hash_get_current_data_ex(Z_ARRVAL_PP(values), (void *) &value, &i);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:198:30: note: declared here
ZEND_API zval ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
^
/usr/include/php/20160303/Zend/zend_hash.h:239:6: error: invalid type argument of ‘->’ (have ‘int’)
(ht)->nNumOfElements
^
/home/vagrant/php-protobuf/protobuf.c:191:8: note: in expansion of macro ‘zend_hash_num_elements’
if (zend_hash_num_elements(Z_ARRVAL_PP(value)) == 0)
^
/home/vagrant/php-protobuf/protobuf.c:198:32: warning: implicit declaration of function ‘Z_LVAL_PP’ [-Wimplicit-function-declaration]
int wire = pb_get_wire_type(Z_LVAL_PP(field_type));
^
In file included from /home/vagrant/php-protobuf/protobuf.c:6:0:
/home/vagrant/php-protobuf/protobuf.h:7:43: warning: passing argument 1 of ‘zend_hash_internal_pointer_reset_ex’ makes pointer from integer without a cast [-Wint-conversion]
for (zend_hash_internal_pointer_reset_ex((hash), (iter)); zend_hash_has_more_elements_ex((hash), (iter)) == SUCCESS; zend_hash_m
^
/home/vagrant/php-protobuf/protobuf.c:200:4: note: in expansion of macro ‘PB_FOREACH’
PB_FOREACH(&j, Z_ARRVAL_PP(value)) {
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:199:30: note: expected ‘HashTable * {aka struct _zend_array *}’ but argument is of type ‘int’
ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.h:7:91: warning: passing argument 1 of ‘zend_hash_get_current_key_type_ex’ makes pointer from integer without a cast [-Wint-conversion]
for (zend_hash_internal_pointer_reset_ex((hash), (iter)); zend_hash_has_more_elements_ex((hash), (iter)) == SUCCESS; zend_hash_m
^
/usr/include/php/20160303/Zend/zend_hash.h:192:37: note: in definition of macro ‘zend_hash_has_more_elements_ex’
(zend_hash_get_current_key_type_ex(ht, pos) == HASH_KEY_NON_EXISTENT ? FAILURE : SUCCESS)
^
/home/vagrant/php-protobuf/protobuf.c:200:4: note: in expansion of macro ‘PB_FOREACH’
PB_FOREACH(&j, Z_ARRVAL_PP(value)) {
^
/usr/include/php/20160303/Zend/zend_hash.h:197:30: note: expected ‘HashTable * {aka struct _zend_array *}’ but argument is of type ‘int’
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos);
^
In file included from /home/vagrant/php-protobuf/protobuf.c:6:0:
/home/vagrant/php-protobuf/protobuf.h:7:145: warning: passing argument 1 of ‘zend_hash_move_forward_ex’ makes pointer from integer without a cast [-Wint-conversion]
ointer_reset_ex((hash), (iter)); zend_hash_has_more_elements_ex((hash), (iter)) == SUCCESS; zend_hash_move_forward_ex((hash), (it
^
/home/vagrant/php-protobuf/protobuf.c:200:4: note: in expansion of macro ‘PB_FOREACH’
PB_FOREACH(&j, Z_ARRVAL_PP(value)) {
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:193:30: note: expected ‘HashTable * {aka struct _zend_array *}’ but argument is of type ‘int’
ZEND_API int ZEND_FASTCALL zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.c:201:34: warning: passing argument 1 of ‘zend_hash_get_current_key_ex’ makes pointer from integer without a cast [-Wint-conversion]
zend_hash_get_current_key_ex(Z_ARRVAL_PP(value), NULL, NULL, &index, 0, &j);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:195:30: note: expected ‘const HashTable * {aka const struct _zend_array *}’ but argument is of type ‘int’
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, Ha
^
/home/vagrant/php-protobuf/protobuf.c:201:66: warning: passing argument 4 of ‘zend_hash_get_current_key_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
zend_hash_get_current_key_ex(Z_ARRVAL_PP(value), NULL, NULL, &index, 0, &j);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:195:30: note: expected ‘HashPosition * {aka unsigned int *}’ but argument is of type ‘ulong * {aka long unsigned int *}’
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, Ha
^
/home/vagrant/php-protobuf/protobuf.c:201:5: error: too many arguments to function ‘zend_hash_get_current_key_ex’
zend_hash_get_current_key_ex(Z_ARRVAL_PP(value), NULL, NULL, &index, 0, &j);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:195:30: note: declared here
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, Ha
^
/home/vagrant/php-protobuf/protobuf.c:202:35: warning: passing argument 1 of ‘zend_hash_get_current_data_ex’ makes pointer from integer without a cast [-Wint-conversion]
zend_hash_get_current_data_ex(Z_ARRVAL_PP(value), (void **) &val, &j);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:198:30: note: expected ‘HashTable * {aka struct _zend_array }’ but argument is of type ‘int’
ZEND_API zval ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.c:202:55: warning: passing argument 2 of ‘zend_hash_get_current_data_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
zend_hash_get_current_data_ex(Z_ARRVAL_PP(value), (void **) &val, &j);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:198:30: note: expected ‘HashPosition * {aka unsigned int *}’ but argument is of type ‘void *’
ZEND_API zval ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.c:202:5: error: too many arguments to function ‘zend_hash_get_current_data_ex’
zend_hash_get_current_data_ex(Z_ARRVAL_PP(value), (void *) &val, &j);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:198:30: note: declared here
ZEND_API zval ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
^
In file included from /home/vagrant/php-protobuf/protobuf.c:6:0:
/home/vagrant/php-protobuf/protobuf.c: In function ‘zim_ProtobufMessage_dump’:
/home/vagrant/php-protobuf/protobuf.h:7:43: warning: passing argument 1 of ‘zend_hash_internal_pointer_reset_ex’ makes pointer from integer without a cast [-Wint-conversion]
for (zend_hash_internal_pointer_reset_ex((hash), (iter)); zend_hash_has_more_elements_ex((hash), (iter)) == SUCCESS; zend_hash_m
^
/home/vagrant/php-protobuf/protobuf.c:255:2: note: in expansion of macro ‘PB_FOREACH’
PB_FOREACH(&i, Z_ARRVAL_PP(values)) {
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:199:30: note: expected ‘HashTable * {aka struct _zend_array *}’ but argument is of type ‘int’
ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.h:7:91: warning: passing argument 1 of ‘zend_hash_get_current_key_type_ex’ makes pointer from integer without a cast [-Wint-conversion]
for (zend_hash_internal_pointer_reset_ex((hash), (iter)); zend_hash_has_more_elements_ex((hash), (iter)) == SUCCESS; zend_hash_m
^
/usr/include/php/20160303/Zend/zend_hash.h:192:37: note: in definition of macro ‘zend_hash_has_more_elements_ex’
(zend_hash_get_current_key_type_ex(ht, pos) == HASH_KEY_NON_EXISTENT ? FAILURE : SUCCESS)
^
/home/vagrant/php-protobuf/protobuf.c:255:2: note: in expansion of macro ‘PB_FOREACH’
PB_FOREACH(&i, Z_ARRVAL_PP(values)) {
^
/usr/include/php/20160303/Zend/zend_hash.h:197:30: note: expected ‘HashTable * {aka struct _zend_array *}’ but argument is of type ‘int’
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos);
^
In file included from /home/vagrant/php-protobuf/protobuf.c:6:0:
/home/vagrant/php-protobuf/protobuf.h:7:145: warning: passing argument 1 of ‘zend_hash_move_forward_ex’ makes pointer from integer without a cast [-Wint-conversion]
ointer_reset_ex((hash), (iter)); zend_hash_has_more_elements_ex((hash), (iter)) == SUCCESS; zend_hash_move_forward_ex((hash), (it
^
/home/vagrant/php-protobuf/protobuf.c:255:2: note: in expansion of macro ‘PB_FOREACH’
PB_FOREACH(&i, Z_ARRVAL_PP(values)) {
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:193:30: note: expected ‘HashTable * {aka struct _zend_array *}’ but argument is of type ‘int’
ZEND_API int ZEND_FASTCALL zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.c:256:32: warning: passing argument 1 of ‘zend_hash_get_current_key_ex’ makes pointer from integer without a cast [-Wint-conversion]
zend_hash_get_current_key_ex(Z_ARRVAL_PP(values), NULL, NULL, &field_number, 0, &i);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:195:30: note: expected ‘const HashTable * {aka const struct _zend_array *}’ but argument is of type ‘int’
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, Ha
^
/home/vagrant/php-protobuf/protobuf.c:256:65: warning: passing argument 4 of ‘zend_hash_get_current_key_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
zend_hash_get_current_key_ex(Z_ARRVAL_PP(values), NULL, NULL, &field_number, 0, &i);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:195:30: note: expected ‘HashPosition * {aka unsigned int *}’ but argument is of type ‘ulong * {aka long unsigned int *}’
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, Ha
^
/home/vagrant/php-protobuf/protobuf.c:256:3: error: too many arguments to function ‘zend_hash_get_current_key_ex’
zend_hash_get_current_key_ex(Z_ARRVAL_PP(values), NULL, NULL, &field_number, 0, &i);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:195:30: note: declared here
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, Ha
^
/home/vagrant/php-protobuf/protobuf.c:257:33: warning: passing argument 1 of ‘zend_hash_get_current_data_ex’ makes pointer from integer without a cast [-Wint-conversion]
zend_hash_get_current_data_ex(Z_ARRVAL_PP(values), (void **) &value, &i);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:198:30: note: expected ‘HashTable * {aka struct _zend_array }’ but argument is of type ‘int’
ZEND_API zval ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.c:257:54: warning: passing argument 2 of ‘zend_hash_get_current_data_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
zend_hash_get_current_data_ex(Z_ARRVAL_PP(values), (void **) &value, &i);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:198:30: note: expected ‘HashPosition * {aka unsigned int *}’ but argument is of type ‘void *’
ZEND_API zval ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.c:257:3: error: too many arguments to function ‘zend_hash_get_current_data_ex’
zend_hash_get_current_data_ex(Z_ARRVAL_PP(values), (void *) &value, &i);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:198:30: note: declared here
ZEND_API zval ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
^
/usr/include/php/20160303/Zend/zend_hash.h:239:6: error: invalid type argument of ‘->’ (have ‘int’)
(ht)->nNumOfElements
^
/home/vagrant/php-protobuf/protobuf.c:266:8: note: in expansion of macro ‘zend_hash_num_elements’
if (zend_hash_num_elements(Z_ARRVAL_PP(value)) > 0 || !only_set) {
^
/usr/include/php/20160303/Zend/zend_hash.h:239:6: error: invalid type argument of ‘->’ (have ‘int’)
(ht)->nNumOfElements
^
/home/vagrant/php-protobuf/protobuf.c:267:94: note: in expansion of macro ‘zend_hash_num_elements’
php_printf("%*c%lu: %s(%d) => \n", ((int) level + 1) * 2, ' ', field_number, field_name, zend_hash_num_elements(Z_ARRVAL_PP(v
^
/usr/include/php/20160303/Zend/zend_hash.h:239:6: error: invalid type argument of ‘->’ (have ‘int’)
(ht)->nNumOfElements
^
/home/vagrant/php-protobuf/protobuf.c:269:9: note: in expansion of macro ‘zend_hash_num_elements’
if (zend_hash_num_elements(Z_ARRVAL_PP(value)) > 0) {
^
In file included from /home/vagrant/php-protobuf/protobuf.c:6:0:
/home/vagrant/php-protobuf/protobuf.h:7:43: warning: passing argument 1 of ‘zend_hash_internal_pointer_reset_ex’ makes pointer from integer without a cast [-Wint-conversion]
for (zend_hash_internal_pointer_reset_ex((hash), (iter)); zend_hash_has_more_elements_ex((hash), (iter)) == SUCCESS; zend_hash_m
^
/home/vagrant/php-protobuf/protobuf.c:270:6: note: in expansion of macro ‘PB_FOREACH’
PB_FOREACH(&j, Z_ARRVAL_PP(value)) {
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:199:30: note: expected ‘HashTable * {aka struct _zend_array *}’ but argument is of type ‘int’
ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.h:7:91: warning: passing argument 1 of ‘zend_hash_get_current_key_type_ex’ makes pointer from integer without a cast [-Wint-conversion]
for (zend_hash_internal_pointer_reset_ex((hash), (iter)); zend_hash_has_more_elements_ex((hash), (iter)) == SUCCESS; zend_hash_m
^
/usr/include/php/20160303/Zend/zend_hash.h:192:37: note: in definition of macro ‘zend_hash_has_more_elements_ex’
(zend_hash_get_current_key_type_ex(ht, pos) == HASH_KEY_NON_EXISTENT ? FAILURE : SUCCESS)
^
/home/vagrant/php-protobuf/protobuf.c:270:6: note: in expansion of macro ‘PB_FOREACH’
PB_FOREACH(&j, Z_ARRVAL_PP(value)) {
^
/usr/include/php/20160303/Zend/zend_hash.h:197:30: note: expected ‘HashTable * {aka struct _zend_array *}’ but argument is of type ‘int’
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos);
^
In file included from /home/vagrant/php-protobuf/protobuf.c:6:0:
/home/vagrant/php-protobuf/protobuf.h:7:145: warning: passing argument 1 of ‘zend_hash_move_forward_ex’ makes pointer from integer without a cast [-Wint-conversion]
ointer_reset_ex((hash), (iter)); zend_hash_has_more_elements_ex((hash), (iter)) == SUCCESS; zend_hash_move_forward_ex((hash), (it
^
/home/vagrant/php-protobuf/protobuf.c:270:6: note: in expansion of macro ‘PB_FOREACH’
PB_FOREACH(&j, Z_ARRVAL_PP(value)) {
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:193:30: note: expected ‘HashTable * {aka struct _zend_array *}’ but argument is of type ‘int’
ZEND_API int ZEND_FASTCALL zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.c:271:36: warning: passing argument 1 of ‘zend_hash_get_current_key_ex’ makes pointer from integer without a cast [-Wint-conversion]
zend_hash_get_current_key_ex(Z_ARRVAL_PP(value), NULL, NULL, &index, 0, &j);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:195:30: note: expected ‘const HashTable * {aka const struct _zend_array *}’ but argument is of type ‘int’
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, Ha
^
/home/vagrant/php-protobuf/protobuf.c:271:68: warning: passing argument 4 of ‘zend_hash_get_current_key_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
zend_hash_get_current_key_ex(Z_ARRVAL_PP(value), NULL, NULL, &index, 0, &j);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:195:30: note: expected ‘HashPosition * {aka unsigned int *}’ but argument is of type ‘ulong * {aka long unsigned int *}’
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, Ha
^
/home/vagrant/php-protobuf/protobuf.c:271:7: error: too many arguments to function ‘zend_hash_get_current_key_ex’
zend_hash_get_current_key_ex(Z_ARRVAL_PP(value), NULL, NULL, &index, 0, &j);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:195:30: note: declared here
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, Ha
^
/home/vagrant/php-protobuf/protobuf.c:272:37: warning: passing argument 1 of ‘zend_hash_get_current_data_ex’ makes pointer from integer without a cast [-Wint-conversion]
zend_hash_get_current_data_ex(Z_ARRVAL_PP(value), (void **) &val, &j);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:198:30: note: expected ‘HashTable * {aka struct _zend_array }’ but argument is of type ‘int’
ZEND_API zval ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.c:272:57: warning: passing argument 2 of ‘zend_hash_get_current_data_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
zend_hash_get_current_data_ex(Z_ARRVAL_PP(value), (void **) &val, &j);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:198:30: note: expected ‘HashPosition * {aka unsigned int *}’ but argument is of type ‘void *’
ZEND_API zval ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.c:272:7: error: too many arguments to function ‘zend_hash_get_current_data_ex’
zend_hash_get_current_data_ex(Z_ARRVAL_PP(value), (void *) &val, &j);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:198:30: note: declared here
ZEND_API zval ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
^
In file included from /usr/include/php/20160303/Zend/zend.h:31:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/home/vagrant/php-protobuf/protobuf.c: In function ‘zim_ProtobufMessage_count’:
/usr/include/php/20160303/Zend/zend_hash.h:239:6: error: invalid type argument of ‘->’ (have ‘int’)
(ht)->nNumOfElements
^
/usr/include/php/20160303/Zend/zend_types.h:617:19: note: in definition of macro ‘ZVAL_LONG’
Z_LVAL_P(__z) = l;
^
/usr/include/php/20160303/Zend/zend_API.h:642:31: note: in expansion of macro ‘RETVAL_LONG’
#define RETURN_LONG(l) { RETVAL_LONG(l); return; }
^
/home/vagrant/php-protobuf/protobuf.c:312:3: note: in expansion of macro ‘RETURN_LONG’
RETURN_LONG(zend_hash_num_elements(Z_ARRVAL_PP(value)));
^
/home/vagrant/php-protobuf/protobuf.c:312:15: note: in expansion of macro ‘zend_hash_num_elements’
RETURN_LONG(zend_hash_num_elements(Z_ARRVAL_PP(value)));
^
/home/vagrant/php-protobuf/protobuf.c: In function ‘zim_ProtobufMessage_get’:
/home/vagrant/php-protobuf/protobuf.c:340:28: warning: passing argument 1 of ‘zend_hash_index_find’ makes pointer from integer without a cast [-Wint-conversion]
if (zend_hash_index_find(Z_ARRVAL_PP(value), index, (void **) &val) == FAILURE)
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:163:30: note: expected ‘const HashTable * {aka const struct _zend_array }’ but argument is of type ‘int’
ZEND_API zval ZEND_FASTCALL zend_hash_index_find(const HashTable *ht, zend_ulong h);
^
/home/vagrant/php-protobuf/protobuf.c:340:7: error: too many arguments to function ‘zend_hash_index_find’
if (zend_hash_index_find(Z_ARRVAL_PP(value), index, (void *) &val) == FAILURE)
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:163:30: note: declared here
ZEND_API zval ZEND_FASTCALL zend_hash_index_find(const HashTable *ht, zend_ulong h);
^
/home/vagrant/php-protobuf/protobuf.c:340:71: warning: comparison between pointer and integer
if (zend_hash_index_find(Z_ARRVAL_PP(value), index, (void **) &val) == FAILURE)
^
/home/vagrant/php-protobuf/protobuf.c: In function ‘zim_ProtobufMessage_parseFromString’:
/home/vagrant/php-protobuf/protobuf.c:362:2: warning: implicit declaration of function ‘INIT_ZVAL’ [-Wimplicit-function-declaration]
INIT_ZVAL(name);
^
/home/vagrant/php-protobuf/protobuf.c:363:69: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
ZVAL_STRINGL(&name, PB_RESET_METHOD, sizeof(PB_RESET_METHOD) - 1, 0);
^
/home/vagrant/php-protobuf/protobuf.c:363:2: error: ‘ZVAL_STRINGL’ undeclared (first use in this function)
ZVAL_STRINGL(&name, PB_RESET_METHOD, sizeof(PB_RESET_METHOD) - 1, 0);
^
In file included from /usr/include/php/20160303/main/php.h:40:0,
from /home/vagrant/php-protobuf/protobuf.c:1:
/home/vagrant/php-protobuf/protobuf.c:365:31: error: lvalue required as unary ‘&’ operand
if (call_user_function(NULL, &getThis(), &name, &zret, 0, NULL TSRMLS_CC) == FAILURE)
^
/usr/include/php/20160303/Zend/zend_API.h:479:25: note: in definition of macro ‘call_user_function’
_call_user_function_ex(object, function_name, retval_ptr, param_count, params, 1)
^
/home/vagrant/php-protobuf/protobuf.c:379:7: error: too many arguments to function ‘zend_hash_index_find’
if (zend_hash_index_find(Z_ARRVAL_P(field_descriptors), field_number, (void *) &field_descriptor) == FAILURE) {
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:163:30: note: declared here
ZEND_API zval ZEND_FASTCALL zend_hash_index_find(const HashTable *ht, zend_ulong h);
^
/home/vagrant/php-protobuf/protobuf.c:379:102: warning: comparison between pointer and integer
if (zend_hash_index_find(Z_ARRVAL_P(field_descriptors), field_number, (void **) &field_descriptor) == FAILURE) {
^
/home/vagrant/php-protobuf/protobuf.c:430:29: warning: implicit declaration of function ‘Z_STRVAL_PP’ [-Wimplicit-function-declaration]
if (zend_lookup_class_ex(Z_STRVAL_PP(field_type), Z_STRLEN_PP(field_type), NULL, 1, &sub_ce TSRMLS_CC) == FAILURE)
^
/home/vagrant/php-protobuf/protobuf.c:430:54: warning: implicit declaration of function ‘Z_STRLEN_PP’ [-Wimplicit-function-declaration]
if (zend_lookup_class_ex(Z_STRVAL_PP(field_type), Z_STRLEN_PP(field_type), NULL, 1, &sub_ce TSRMLS_CC) == FAILURE)
^
/home/vagrant/php-protobuf/protobuf.c:430:29: warning: passing argument 1 of ‘zend_lookup_class_ex’ makes pointer from integer without a cast [-Wint-conversion]
if (zend_lookup_class_ex(Z_STRVAL_PP(field_type), Z_STRLEN_PP(field_type), NULL, 1, &sub_ce TSRMLS_CC) == FAILURE)
^
In file included from /usr/include/php/20160303/Zend/zend_API.h:31:0,
from /usr/include/php/20160303/main/php.h:40,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_execute.h:44:28: note: expected ‘zend_string * {aka struct _zend_string *}’ but argument is of type ‘int’
ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, const zval *key, int use_autoload);
^
/home/vagrant/php-protobuf/protobuf.c:430:54: warning: passing argument 2 of ‘zend_lookup_class_ex’ makes pointer from integer without a cast [-Wint-conversion]
if (zend_lookup_class_ex(Z_STRVAL_PP(field_type), Z_STRLEN_PP(field_type), NULL, 1, &sub_ce TSRMLS_CC) == FAILURE)
^
In file included from /usr/include/php/20160303/Zend/zend_API.h:31:0,
from /usr/include/php/20160303/main/php.h:40,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_execute.h:44:28: note: expected ‘const zval * {aka const struct _zval_struct *}’ but argument is of type ‘int’
ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, const zval *key, int use_autoload);
^
/home/vagrant/php-protobuf/protobuf.c:430:79: warning: passing argument 3 of ‘zend_lookup_class_ex’ makes integer from pointer without a cast [-Wint-conversion]
if (zend_lookup_class_ex(Z_STRVAL_PP(field_type), Z_STRLEN_PP(field_type), NULL, 1, &sub_ce TSRMLS_CC) == FAILURE)
^
In file included from /usr/include/php/20160303/Zend/zend_API.h:31:0,
from /usr/include/php/20160303/main/php.h:40,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_execute.h:44:28: note: expected ‘int’ but argument is of type ‘void *’
ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, const zval *key, int use_autoload);
^
/home/vagrant/php-protobuf/protobuf.c:430:8: error: too many arguments to function ‘zend_lookup_class_ex’
if (zend_lookup_class_ex(Z_STRVAL_PP(field_type), Z_STRLEN_PP(field_type), NULL, 1, &sub_ce TSRMLS_CC) == FAILURE)
^
In file included from /usr/include/php/20160303/Zend/zend_API.h:31:0,
from /usr/include/php/20160303/main/php.h:40,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_execute.h:44:28: note: declared here
ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, const zval *key, int use_autoload);
^
/home/vagrant/php-protobuf/protobuf.c:430:107: warning: comparison between pointer and integer
if (zend_lookup_class_ex(Z_STRVAL_PP(field_type), Z_STRLEN_PP(field_type), NULL, 1, &sub_ce TSRMLS_CC) == FAILURE)
^
/home/vagrant/php-protobuf/protobuf.c:443:94: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
ZVAL_STRINGL(&name, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME) - 1, 0);
^
In file included from /usr/include/php/20160303/main/php.h:40:0,
from /home/vagrant/php-protobuf/protobuf.c:1:
/home/vagrant/php-protobuf/protobuf.c:445:34: warning: passing argument 1 of ‘_call_user_function_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
if (call_user_function(NULL, &value, &name, &zret, 0, NULL TSRMLS_CC) == FAILURE) {
^
/usr/include/php/20160303/Zend/zend_API.h:479:25: note: in definition of macro ‘call_user_function’
_call_user_function_ex(object, function_name, retval_ptr, param_count, params, 1)
^
/usr/include/php/20160303/Zend/zend_API.h:476:14: note: expected ‘zval * {aka struct _zval_struct *}’ but argument is of type ‘zval ** {aka struct _zval_struct **}’
ZEND_API int _call_user_function_ex(zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int
^
/home/vagrant/php-protobuf/protobuf.c:450:96: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
ZVAL_STRINGL(&name, PB_PARSE_FROM_STRING_METHOD, sizeof(PB_PARSE_FROM_STRING_METHOD) - 1, 0);
^
/home/vagrant/php-protobuf/protobuf.c:453:48: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
ZVAL_STRINGL(&arg, subpack, subpack_size, 0);
^
In file included from /usr/include/php/20160303/main/php.h:40:0,
from /home/vagrant/php-protobuf/protobuf.c:1:
/home/vagrant/php-protobuf/protobuf.c:458:34: warning: passing argument 1 of ‘_call_user_function_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
if (call_user_function(NULL, &value, &name, &zret, 1, &args TSRMLS_CC) == FAILURE)
^
/usr/include/php/20160303/Zend/zend_API.h:479:25: note: in definition of macro ‘call_user_function’
_call_user_function_ex(object, function_name, retval_ptr, param_count, params, 1)
^
/usr/include/php/20160303/Zend/zend_API.h:476:14: note: expected ‘zval * {aka struct _zval_struct *}’ but argument is of type ‘zval ** {aka struct _zval_struct **}’
ZEND_API int _call_user_function_ex(zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int
^
/home/vagrant/php-protobuf/protobuf.c:458:59: warning: passing argument 5 of ‘_call_user_function_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
if (call_user_function(NULL, &value, &name, &zret, 1, &args TSRMLS_CC) == FAILURE)
^
/usr/include/php/20160303/Zend/zend_API.h:479:73: note: in definition of macro ‘call_user_function’
_call_user_function_ex(object, function_name, retval_ptr, param_count, params, 1)
^
/usr/include/php/20160303/Zend/zend_API.h:476:14: note: expected ‘zval * {aka struct _zval_struct *}’ but argument is of type ‘zval ** {aka struct _zval_struct **}’
ZEND_API int _call_user_function_ex(zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int
^
/home/vagrant/php-protobuf/protobuf.c:461:25: error: ‘IS_BOOL’ undeclared (first use in this function)
if (Z_TYPE(zret) != IS_BOOL)
^
/home/vagrant/php-protobuf/protobuf.c: In function ‘zim_ProtobufMessage_serializeToString’:
/home/vagrant/php-protobuf/protobuf.c:520:75: warning: passing argument 4 of ‘zend_hash_get_current_key_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
zend_hash_get_current_key_ex(Z_ARRVAL_P(field_descriptors), NULL, NULL, &field_number, 0, &i);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:195:30: note: expected ‘HashPosition * {aka unsigned int *}’ but argument is of type ‘ulong * {aka long unsigned int *}’
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, Ha
^
/home/vagrant/php-protobuf/protobuf.c:520:3: error: too many arguments to function ‘zend_hash_get_current_key_ex’
zend_hash_get_current_key_ex(Z_ARRVAL_P(field_descriptors), NULL, NULL, &field_number, 0, &i);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:195:30: note: declared here
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, Ha
^
/home/vagrant/php-protobuf/protobuf.c:521:64: warning: passing argument 2 of ‘zend_hash_get_current_data_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
zend_hash_get_current_data_ex(Z_ARRVAL_P(field_descriptors), (void **) &field_descriptor, &i);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:198:30: note: expected ‘HashPosition * {aka unsigned int *}’ but argument is of type ‘void *’
ZEND_API zval ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.c:521:3: error: too many arguments to function ‘zend_hash_get_current_data_ex’
zend_hash_get_current_data_ex(Z_ARRVAL_P(field_descriptors), (void *) &field_descriptor, &i);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:198:30: note: declared here
ZEND_API zval ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.c:523:28: warning: passing argument 1 of ‘zend_hash_index_find’ makes pointer from integer without a cast [-Wint-conversion]
if (zend_hash_index_find(Z_ARRVAL_PP(values), field_number, (void **) &value) == FAILURE) {
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:163:30: note: expected ‘const HashTable * {aka const struct _zend_array }’ but argument is of type ‘int’
ZEND_API zval ZEND_FASTCALL zend_hash_index_find(const HashTable *ht, zend_ulong h);
^
/home/vagrant/php-protobuf/protobuf.c:523:7: error: too many arguments to function ‘zend_hash_index_find’
if (zend_hash_index_find(Z_ARRVAL_PP(values), field_number, (void *) &value) == FAILURE) {
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:163:30: note: declared here
ZEND_API zval ZEND_FASTCALL zend_hash_index_find(const HashTable *ht, zend_ulong h);
^
/home/vagrant/php-protobuf/protobuf.c:523:81: warning: comparison between pointer and integer
if (zend_hash_index_find(Z_ARRVAL_PP(values), field_number, (void **) &value) == FAILURE) {
^
/home/vagrant/php-protobuf/protobuf.c:532:23: warning: passing argument 1 of ‘zend_hash_find’ makes pointer from integer without a cast [-Wint-conversion]
if (zend_hash_find(Z_ARRVAL_PP(field_descriptor), PB_FIELD_REQUIRED, sizeof(PB_FIELD_REQUIRED), (void **) &required) == FAILUR
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:161:30: note: expected ‘const HashTable * {aka const struct _zend_array }’ but argument is of type ‘int’
ZEND_API zval ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
^
/home/vagrant/php-protobuf/protobuf.c:58:27: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [-Wincompatible-pointer-types]
#define PB_FIELD_REQUIRED "required"
^
/home/vagrant/php-protobuf/protobuf.c:532:54: note: in expansion of macro ‘PB_FIELD_REQUIRED’
if (zend_hash_find(Z_ARRVAL_PP(field_descriptor), PB_FIELD_REQUIRED, sizeof(PB_FIELD_REQUIRED), (void **) &required) == FAILUR
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:161:30: note: expected ‘zend_string * {aka struct _zend_string *}’ but argument is of type ‘char ’
ZEND_API zval ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
^
/home/vagrant/php-protobuf/protobuf.c:532:8: error: too many arguments to function ‘zend_hash_find’
if (zend_hash_find(Z_ARRVAL_PP(field_descriptor), PB_FIELD_REQUIRED, sizeof(PB_FIELD_REQUIRED), (void *) &required) == FAILUR
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:161:30: note: declared here
ZEND_API zval ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
^
/home/vagrant/php-protobuf/protobuf.c:532:121: warning: comparison between pointer and integer
if (zend_hash_find(Z_ARRVAL_PP(field_descriptor), PB_FIELD_REQUIRED, sizeof(PB_FIELD_REQUIRED), (void **) &required) == FAILURE)
^
/home/vagrant/php-protobuf/protobuf.c:537:8: warning: implicit declaration of function ‘Z_BVAL_PP’ [-Wimplicit-function-declaration]
if (Z_BVAL_PP(required) ) {
^
/home/vagrant/php-protobuf/protobuf.c:548:23: warning: passing argument 1 of ‘zend_hash_find’ makes pointer from integer without a cast [-Wint-conversion]
if (zend_hash_find(Z_ARRVAL_PP(field_descriptor), PB_FIELD_PACKED, sizeof(PB_FIELD_PACKED), (void **) &packed) != FAILURE && Z
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:161:30: note: expected ‘const HashTable * {aka const struct _zend_array }’ but argument is of type ‘int’
ZEND_API zval ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
^
/home/vagrant/php-protobuf/protobuf.c:57:25: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [-Wincompatible-pointer-types]
#define PB_FIELD_PACKED "packed"
^
/home/vagrant/php-protobuf/protobuf.c:548:54: note: in expansion of macro ‘PB_FIELD_PACKED’
if (zend_hash_find(Z_ARRVAL_PP(field_descriptor), PB_FIELD_PACKED, sizeof(PB_FIELD_PACKED), (void **) &packed) != FAILURE && Z
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:161:30: note: expected ‘zend_string * {aka struct _zend_string *}’ but argument is of type ‘char ’
ZEND_API zval ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
^
/home/vagrant/php-protobuf/protobuf.c:548:8: error: too many arguments to function ‘zend_hash_find’
if (zend_hash_find(Z_ARRVAL_PP(field_descriptor), PB_FIELD_PACKED, sizeof(PB_FIELD_PACKED), (void *) &packed) != FAILURE && Z
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:161:30: note: declared here
ZEND_API zval ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
^
/home/vagrant/php-protobuf/protobuf.c:548:115: warning: comparison between pointer and integer
if (zend_hash_find(Z_ARRVAL_PP(field_descriptor), PB_FIELD_PACKED, sizeof(PB_FIELD_PACKED), (void **) &packed) != FAILURE && Z
^
In file included from /home/vagrant/php-protobuf/protobuf.c:6:0:
/home/vagrant/php-protobuf/protobuf.h:7:43: warning: passing argument 1 of ‘zend_hash_internal_pointer_reset_ex’ makes pointer from integer without a cast [-Wint-conversion]
for (zend_hash_internal_pointer_reset_ex((hash), (iter)); zend_hash_has_more_elements_ex((hash), (iter)) == SUCCESS; zend_hash_m
^
/home/vagrant/php-protobuf/protobuf.c:552:5: note: in expansion of macro ‘PB_FOREACH’
PB_FOREACH(&j, Z_ARRVAL_PP(array)) {
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:199:30: note: expected ‘HashTable * {aka struct _zend_array *}’ but argument is of type ‘int’
ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.h:7:91: warning: passing argument 1 of ‘zend_hash_get_current_key_type_ex’ makes pointer from integer without a cast [-Wint-conversion]
for (zend_hash_internal_pointer_reset_ex((hash), (iter)); zend_hash_has_more_elements_ex((hash), (iter)) == SUCCESS; zend_hash_m
^
/usr/include/php/20160303/Zend/zend_hash.h:192:37: note: in definition of macro ‘zend_hash_has_more_elements_ex’
(zend_hash_get_current_key_type_ex(ht, pos) == HASH_KEY_NON_EXISTENT ? FAILURE : SUCCESS)
^
/home/vagrant/php-protobuf/protobuf.c:552:5: note: in expansion of macro ‘PB_FOREACH’
PB_FOREACH(&j, Z_ARRVAL_PP(array)) {
^
/usr/include/php/20160303/Zend/zend_hash.h:197:30: note: expected ‘HashTable * {aka struct _zend_array *}’ but argument is of type ‘int’
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos);
^
In file included from /home/vagrant/php-protobuf/protobuf.c:6:0:
/home/vagrant/php-protobuf/protobuf.h:7:145: warning: passing argument 1 of ‘zend_hash_move_forward_ex’ makes pointer from integer without a cast [-Wint-conversion]
ointer_reset_ex((hash), (iter)); zend_hash_has_more_elements_ex((hash), (iter)) == SUCCESS; zend_hash_move_forward_ex((hash), (it
^
/home/vagrant/php-protobuf/protobuf.c:552:5: note: in expansion of macro ‘PB_FOREACH’
PB_FOREACH(&j, Z_ARRVAL_PP(array)) {
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:193:30: note: expected ‘HashTable * {aka struct _zend_array *}’ but argument is of type ‘int’
ZEND_API int ZEND_FASTCALL zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.c:553:36: warning: passing argument 1 of ‘zend_hash_get_current_data_ex’ makes pointer from integer without a cast [-Wint-conversion]
zend_hash_get_current_data_ex(Z_ARRVAL_PP(array), (void **) &value, &j);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:198:30: note: expected ‘HashTable * {aka struct _zend_array }’ but argument is of type ‘int’
ZEND_API zval ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.c:553:56: warning: passing argument 2 of ‘zend_hash_get_current_data_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
zend_hash_get_current_data_ex(Z_ARRVAL_PP(array), (void **) &value, &j);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:198:30: note: expected ‘HashPosition * {aka unsigned int *}’ but argument is of type ‘void *’
ZEND_API zval ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.c:553:6: error: too many arguments to function ‘zend_hash_get_current_data_ex’
zend_hash_get_current_data_ex(Z_ARRVAL_PP(array), (void *) &value, &j);
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:198:30: note: declared here
ZEND_API zval ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
^
/home/vagrant/php-protobuf/protobuf.c:564:35: error: macro "RETURN_STRINGL" passed 3 arguments, but takes just 2
RETURN_STRINGL(pack, pack_size, 0);
^
/home/vagrant/php-protobuf/protobuf.c:564:2: error: ‘RETURN_STRINGL’ undeclared (first use in this function)
RETURN_STRINGL(pack, pack_size, 0);
^
In file included from /usr/include/php/20160303/main/php.h:40:0,
from /home/vagrant/php-protobuf/protobuf.c:1:
/home/vagrant/php-protobuf/protobuf.c: In function ‘zim_ProtobufMessage_set’:
/home/vagrant/php-protobuf/protobuf.c:62:35: error: ‘this_ptr’ undeclared (first use in this function)
#define RETURN_THIS() RETURN_ZVAL(this_ptr, 1, 0);
^
/usr/include/php/20160303/Zend/zend_API.h:607:17: note: in definition of macro ‘ZVAL_ZVAL’
zval *__zv = (zv);
^
/usr/include/php/20160303/Zend/zend_API.h:654:40: note: in expansion of macro ‘RETVAL_ZVAL’
#define RETURN_ZVAL(zv, copy, dtor) { RETVAL_ZVAL(zv, copy, dtor); return; }
^
/home/vagrant/php-protobuf/protobuf.c:62:23: note: in expansion of macro ‘RETURN_ZVAL’
#define RETURN_THIS() RETURN_ZVAL(this_ptr, 1, 0);
^
/home/vagrant/php-protobuf/protobuf.c:578:3: note: in expansion of macro ‘RETURN_THIS’
RETURN_THIS();
^
/home/vagrant/php-protobuf/protobuf.c: In function ‘zm_startup_protobuf’:
/home/vagrant/php-protobuf/protobuf.c:660:23: warning: implicit declaration of function ‘zend_get_hash_value’ [-Wimplicit-function-declaration]
PB_FIELD_TYPE_HASH = zend_get_hash_value(PB_FIELD_TYPE, sizeof(PB_FIELD_TYPE));
^
/home/vagrant/php-protobuf/protobuf.c: In function ‘pb_prepare_value’:
/home/vagrant/php-protobuf/protobuf.c:740:4: warning: implicit declaration of function ‘ALLOC_ZVAL’ [-Wimplicit-function-declaration]
ALLOC_ZVAL(converted_value);
^
/home/vagrant/php-protobuf/protobuf.c:35:3: warning: implicit declaration of function ‘Z_UNSET_ISREF_P’ [-Wimplicit-function-declaration]
Z_UNSET_ISREF_P(z);
^
/home/vagrant/php-protobuf/protobuf.c:741:4: note: in expansion of macro ‘INIT_PZVAL_COPY’
INIT_PZVAL_COPY(converted_value, value);
^
/home/vagrant/php-protobuf/protobuf.c: In function ‘pb_print_field_value’:
/home/vagrant/php-protobuf/protobuf.c:767:31: error: ‘IS_BOOL’ undeclared (first use in this function)
else if (Z_TYPE_PP(value) == IS_BOOL) {
^
/home/vagrant/php-protobuf/protobuf.c:19:26: warning: implicit declaration of function ‘PZVAL_IS_REF’ [-Wimplicit-function-declaration]
#define Z_UNSET_ISREF(z) PZVAL_IS_REF(&(z)) = 0
^
/home/vagrant/php-protobuf/protobuf.c:776:3: note: in expansion of macro ‘Z_UNSET_ISREF’
Z_UNSET_ISREF(tmp);
^
/home/vagrant/php-protobuf/protobuf.c:19:45: error: lvalue required as left operand of assignment
#define Z_UNSET_ISREF(z) PZVAL_IS_REF(&(z)) = 0
^
/home/vagrant/php-protobuf/protobuf.c:776:3: note: in expansion of macro ‘Z_UNSET_ISREF’
Z_UNSET_ISREF(tmp);
^
/home/vagrant/php-protobuf/protobuf.c: In function ‘pb_print_debug_field_value’:
/home/vagrant/php-protobuf/protobuf.c:802:16: error: lvalue required as left operand of assignment
Z_TYPE(arg0) = IS_LONG;
^
/home/vagrant/php-protobuf/protobuf.c:808:52: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
ZVAL_STRING(&tmp, PB_PRINT_DEBUG_STRING_METHOD, 0);
^
/home/vagrant/php-protobuf/protobuf.c:808:3: error: ‘ZVAL_STRING’ undeclared (first use in this function)
ZVAL_STRING(&tmp, PB_PRINT_DEBUG_STRING_METHOD, 0);
^
In file included from /usr/include/php/20160303/main/php.h:40:0,
from /home/vagrant/php-protobuf/protobuf.c:1:
/home/vagrant/php-protobuf/protobuf.c:810:32: warning: passing argument 1 of ‘_call_user_function_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
if (call_user_function(NULL, value, &tmp, &ret, 1, args TSRMLS_CC) == FAILURE)
^
/usr/include/php/20160303/Zend/zend_API.h:479:25: note: in definition of macro ‘call_user_function’
_call_user_function_ex(object, function_name, retval_ptr, param_count, params, 1)
^
/usr/include/php/20160303/Zend/zend_API.h:476:14: note: expected ‘zval * {aka struct _zval_struct *}’ but argument is of type ‘zval ** {aka struct _zval_struct **}’
ZEND_API int _call_user_function_ex(zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int
^
/home/vagrant/php-protobuf/protobuf.c:810:54: warning: passing argument 5 of ‘_call_user_function_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
if (call_user_function(NULL, value, &tmp, &ret, 1, args TSRMLS_CC) == FAILURE)
^
/usr/include/php/20160303/Zend/zend_API.h:479:73: note: in definition of macro ‘call_user_function’
_call_user_function_ex(object, function_name, retval_ptr, param_count, params, 1)
^
/usr/include/php/20160303/Zend/zend_API.h:476:14: note: expected ‘zval * {aka struct _zval_struct *}’ but argument is of type ‘zval ** {aka struct _zval_struct **}’
ZEND_API int _call_user_function_ex(zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int
^
/home/vagrant/php-protobuf/protobuf.c: In function ‘pb_dump_field_value’:
/home/vagrant/php-protobuf/protobuf.c:830:18: error: ‘IS_BOOL’ undeclared (first use in this function)
Z_TYPE(arg0) = IS_BOOL;
^
/home/vagrant/php-protobuf/protobuf.c:835:16: error: lvalue required as left operand of assignment
Z_TYPE(arg1) = IS_LONG;
^
/home/vagrant/php-protobuf/protobuf.c:842:38: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
ZVAL_STRING(&tmp, PB_DUMP_METHOD, 0);
^
/home/vagrant/php-protobuf/protobuf.c:842:3: error: ‘ZVAL_STRING’ undeclared (first use in this function)
ZVAL_STRING(&tmp, PB_DUMP_METHOD, 0);
^
In file included from /usr/include/php/20160303/main/php.h:40:0,
from /home/vagrant/php-protobuf/protobuf.c:1:
/home/vagrant/php-protobuf/protobuf.c:844:32: warning: passing argument 1 of ‘_call_user_function_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
if (call_user_function(NULL, value, &tmp, &ret, 2, args TSRMLS_CC) == FAILURE)
^
/usr/include/php/20160303/Zend/zend_API.h:479:25: note: in definition of macro ‘call_user_function’
_call_user_function_ex(object, function_name, retval_ptr, param_count, params, 1)
^
/usr/include/php/20160303/Zend/zend_API.h:476:14: note: expected ‘zval * {aka struct _zval_struct *}’ but argument is of type ‘zval ** {aka struct _zval_struct **}’
ZEND_API int _call_user_function_ex(zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int
^
/home/vagrant/php-protobuf/protobuf.c:844:54: warning: passing argument 5 of ‘_call_user_function_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
if (call_user_function(NULL, value, &tmp, &ret, 2, args TSRMLS_CC) == FAILURE)
^
/usr/include/php/20160303/Zend/zend_API.h:479:73: note: in definition of macro ‘call_user_function’
_call_user_function_ex(object, function_name, retval_ptr, param_count, params, 1)
^
/usr/include/php/20160303/Zend/zend_API.h:476:14: note: expected ‘zval * {aka struct _zval_struct *}’ but argument is of type ‘zval ** {aka struct _zval_struct **}’
ZEND_API int _call_user_function_ex(zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int
^
/home/vagrant/php-protobuf/protobuf.c: In function ‘pb_get_field_descriptor’:
/home/vagrant/php-protobuf/protobuf.c:858:6: error: too many arguments to function ‘zend_hash_index_find’
if (zend_hash_index_find(Z_ARRVAL_P(field_descriptors), field_number, (void *) &field_descriptor) == FAILURE)
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:163:30: note: declared here
ZEND_API zval ZEND_FASTCALL zend_hash_index_find(const HashTable *ht, zend_ulong h);
^
/home/vagrant/php-protobuf/protobuf.c:858:101: warning: comparison between pointer and integer
if (zend_hash_index_find(Z_ARRVAL_P(field_descriptors), field_number, (void **) &field_descriptor) == FAILURE)
^
/home/vagrant/php-protobuf/protobuf.c: In function ‘pb_get_field_type’:
/home/vagrant/php-protobuf/protobuf.c:869:6: warning: implicit declaration of function ‘zend_hash_quick_find’ [-Wimplicit-function-declaration]
if (zend_hash_quick_find(Z_ARRVAL_PP(field_descriptor), PB_FIELD_TYPE, sizeof(PB_FIELD_TYPE), PB_FIELD_TYPE_HASH, (void **) &fie
^
/home/vagrant/php-protobuf/protobuf.c: In function ‘pb_get_field_descriptors’:
/home/vagrant/php-protobuf/protobuf.c:881:73: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
ZVAL_STRINGL(&method, PB_FIELDS_METHOD, sizeof(PB_FIELDS_METHOD) - 1, 0);
^
/home/vagrant/php-protobuf/protobuf.c:881:2: error: ‘ZVAL_STRINGL’ undeclared (first use in this function)
ZVAL_STRINGL(&method, PB_FIELDS_METHOD, sizeof(PB_FIELDS_METHOD) - 1, 0);
^
In file included from /usr/include/php/20160303/main/php.h:40:0,
from /home/vagrant/php-protobuf/protobuf.c:1:
/home/vagrant/php-protobuf/protobuf.c:883:30: warning: passing argument 1 of ‘_call_user_function_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
call_user_function_ex(NULL, &this, &method, &descriptors, 0, NULL, 0, NULL TSRMLS_CC);
^
/usr/include/php/20160303/Zend/zend_API.h:481:25: note: in definition of macro ‘call_user_function_ex’
_call_user_function_ex(object, function_name, retval_ptr, param_count, params, no_separation)
^
/usr/include/php/20160303/Zend/zend_API.h:476:14: note: expected ‘zval * {aka struct _zval_struct *}’ but argument is of type ‘zval ** {aka struct _zval_struct **}’
ZEND_API int _call_user_function_ex(zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int
^
/home/vagrant/php-protobuf/protobuf.c:883:46: warning: passing argument 3 of ‘_call_user_function_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
call_user_function_ex(NULL, &this, &method, &descriptors, 0, NULL, 0, NULL TSRMLS_CC);
^
/usr/include/php/20160303/Zend/zend_API.h:481:48: note: in definition of macro ‘call_user_function_ex’
_call_user_function_ex(object, function_name, retval_ptr, param_count, params, no_separation)
^
/usr/include/php/20160303/Zend/zend_API.h:476:14: note: expected ‘zval * {aka struct _zval_struct *}’ but argument is of type ‘zval ** {aka struct _zval_struct **}’
ZEND_API int _call_user_function_ex(zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int
^
In file included from /usr/include/php/20160303/Zend/zend.h:31:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/home/vagrant/php-protobuf/protobuf.c: In function ‘pb_get_field_name’:
/usr/include/php/20160303/Zend/zend_compile.h:516:26: error: ‘execute_data’ undeclared (first use in this function)
#define EX(element) ((execute_data)->element)
^
/usr/include/php/20160303/Zend/zend_types.h:341:41: note: in definition of macro ‘Z_TYPE’
#define Z_TYPE(zval) zval_get_type(&(zval))
^
/usr/include/php/20160303/Zend/zend_API.h:366:34: note: in expansion of macro ‘EX’
#define getThis() ((Z_TYPE(EX(This)) == IS_OBJECT) ? &EX(This) : NULL)
^
/home/vagrant/php-protobuf/protobuf.c:897:52: note: in expansion of macro ‘getThis’
if ((field_descriptors = pb_get_field_descriptors(getThis())) == NULL)
^
/home/vagrant/php-protobuf/protobuf.c:903:21: warning: passing argument 1 of ‘zend_hash_find’ makes pointer from integer without a cast [-Wint-conversion]
if (zend_hash_find(Z_ARRVAL_PP((field_descriptor)), PB_FIELD_NAME, sizeof(PB_FIELD_NAME), (void **) &(field_name))) {
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:161:30: note: expected ‘const HashTable * {aka const struct _zend_array }’ but argument is of type ‘int’
ZEND_API zval ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
^
/home/vagrant/php-protobuf/protobuf.c:56:23: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [-Wincompatible-pointer-types]
#define PB_FIELD_NAME "name"
^
/home/vagrant/php-protobuf/protobuf.c:903:54: note: in expansion of macro ‘PB_FIELD_NAME’
if (zend_hash_find(Z_ARRVAL_PP((field_descriptor)), PB_FIELD_NAME, sizeof(PB_FIELD_NAME), (void **) &(field_name))) {
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:161:30: note: expected ‘zend_string * {aka struct _zend_string *}’ but argument is of type ‘char ’
ZEND_API zval ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
^
/home/vagrant/php-protobuf/protobuf.c:903:6: error: too many arguments to function ‘zend_hash_find’
if (zend_hash_find(Z_ARRVAL_PP((field_descriptor)), PB_FIELD_NAME, sizeof(PB_FIELD_NAME), (void *) &(field_name))) {
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:161:30: note: declared here
ZEND_API zval ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
^
/home/vagrant/php-protobuf/protobuf.c:908:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
return (const char *) Z_STRVAL_PP(field_name);
^
/home/vagrant/php-protobuf/protobuf.c: In function ‘pb_get_value’:
/home/vagrant/php-protobuf/protobuf.c:980:27: warning: passing argument 1 of ‘zend_hash_index_find’ makes pointer from integer without a cast [-Wint-conversion]
if (zend_hash_index_find(Z_ARRVAL_PP(values), field_number, (void **) &value) == FAILURE)
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:163:30: note: expected ‘const HashTable * {aka const struct _zend_array }’ but argument is of type ‘int’
ZEND_API zval ZEND_FASTCALL zend_hash_index_find(const HashTable *ht, zend_ulong h);
^
/home/vagrant/php-protobuf/protobuf.c:980:6: error: too many arguments to function ‘zend_hash_index_find’
if (zend_hash_index_find(Z_ARRVAL_PP(values), field_number, (void *) &value) == FAILURE)
^
In file included from /usr/include/php/20160303/Zend/zend.h:36:0,
from /usr/include/php/20160303/main/php.h:36,
from /home/vagrant/php-protobuf/protobuf.c:1:
/usr/include/php/20160303/Zend/zend_hash.h:163:30: note: declared here
ZEND_API zval ZEND_FASTCALL zend_hash_index_find(const HashTable *ht, zend_ulong h);
^
/home/vagrant/php-protobuf/protobuf.c:980:80: warning: comparison between pointer and integer
if (zend_hash_index_find(Z_ARRVAL_PP(values), field_number, (void **) &value) == FAILURE)
^
/home/vagrant/php-protobuf/protobuf.c: In function ‘pb_parse_field_value’:
/home/vagrant/php-protobuf/protobuf.c:1004:20: error: lvalue required as left operand of assignment
Z_TYPE_P(value) = IS_DOUBLE;
^
/home/vagrant/php-protobuf/protobuf.c:1009:20: error: lvalue required as left operand of assignment
Z_TYPE_P(value) = IS_LONG;
^
/home/vagrant/php-protobuf/protobuf.c:1014:20: error: lvalue required as left operand of assignment
Z_TYPE_P(value) = IS_LONG;
^
/home/vagrant/php-protobuf/protobuf.c:1019:20: error: lvalue required as left operand of assignment
Z_TYPE_P(value) = IS_DOUBLE;
^
/home/vagrant/php-protobuf/protobuf.c:1024:20: error: lvalue required as left operand of assignment
Z_TYPE_P(value) = IS_LONG;
^
/home/vagrant/php-protobuf/protobuf.c:1029:22: error: ‘IS_BOOL’ undeclared (first use in this function)
Z_TYPE_P(value) = IS_BOOL;
^
/home/vagrant/php-protobuf/protobuf.c:1034:20: error: lvalue required as left operand of assignment
Z_TYPE_P(value) = IS_LONG;
^
/home/vagrant/php-protobuf/protobuf.c:1040:41: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
ZVAL_STRINGL(value, str, str_size, 1);
^
/home/vagrant/php-protobuf/protobuf.c:1040:5: error: ‘ZVAL_STRINGL’ undeclared (first use in this function)
ZVAL_STRINGL(value, str, str_size, 1);
^
/home/vagrant/php-protobuf/protobuf.c: In function ‘pb_serialize_field_value’:
/home/vagrant/php-protobuf/protobuf.c:1063:56: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
ZVAL_STRING(&method, PB_SERIALIZE_TO_STRING_METHOD, 0);
^
/home/vagrant/php-protobuf/protobuf.c:1063:3: error: ‘ZVAL_STRING’ undeclared (first use in this function)
ZVAL_STRING(&method, PB_SERIALIZE_TO_STRING_METHOD, 0);
^
In file included from /usr/include/php/20160303/main/php.h:40:0,
from /home/vagrant/php-protobuf/protobuf.c:1:
/home/vagrant/php-protobuf/protobuf.c:1065:32: warning: passing argument 1 of ‘_call_user_function_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
if (call_user_function(NULL, value, &method, &ret, 0, NULL TSRMLS_CC) == FAILURE)
^
/usr/include/php/20160303/Zend/zend_API.h:479:25: note: in definition of macro ‘call_user_function’
_call_user_function_ex(object, function_name, retval_ptr, param_count, params, 1)
^
/usr/include/php/20160303/Zend/zend_API.h:476:14: note: expected ‘zval * {aka struct _zval_struct *}’ but argument is of type ‘zval ** {aka struct _zval_struct **}’
ZEND_API int _call_user_function_ex(zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int
^
/home/vagrant/php-protobuf/protobuf.c:1078:51: warning: implicit declaration of function ‘Z_DVAL_PP’ [-Wimplicit-function-declaration]
r = writer_write_double(writer, field_number, Z_DVAL_PP(value));
^
/home/vagrant/php-protobuf/protobuf.c:1103:51: warning: passing argument 3 of ‘writer_write_string’ makes pointer from integer without a cast [-Wint-conversion]
r = writer_write_string(writer, field_number, Z_STRVAL_PP(value), Z_STRLEN_PP(value));
^
In file included from /home/vagrant/php-protobuf/protobuf.c:8:0:
/home/vagrant/php-protobuf/writer.h:26:5: note: expected ‘const char *’ but argument is of type ‘int’
int writer_write_string(writer_t *writer, uint32_t field_number, const char *str, size_t len);
^
Makefile:193: recipe for target 'protobuf.lo' failed
make: *** [protobuf.lo] Error 1
@eurobubbler Using command "git checkout -b php7" you created your new local branch from master rather than switched to actual php7 branch which contains php7 support. Please clone it again and use "git checkout php7"
Very happy that the problem is just between my ears! Thanks you so much, it obviously works now!