{"action":"opened","issue":{"url":"https://api.github.com/repos/allegro/php-protobuf/issues/86","repository_url":"https://api.github.com/repos/allegro/php-protobuf","labels_url":"https://api.github.com/repos/allegro/php-protobuf/issues/86/labels{/name}","comments_url":"https://api.github.com/repos/allegro/php-protobuf/issues/86/comments","events_url":"https://api.github.com/repos/allegro/php-protobuf/issues/86/events","html_url":"https://github.com/allegro/php-protobuf/issues/86","id":170872774,"number":86,"title":"Endless compile errors","user":{"login":"martijnotto","id":4181252,"avatar_url":"https://avatars.githubusercontent.com/u/4181252?v=3","gravatar_id":"","url":"https://api.github.com/users/martijnotto","html_url":"https://github.com/martijnotto","followers_url":"https://api.github.com/users/martijnotto/followers","following_url":"https://api.github.com/users/martijnotto/following{/other_user}","gists_url":"https://api.github.com/users/martijnotto/gists{/gist_id}","starred_url":"https://api.github.com/users/martijnotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martijnotto/subscriptions","organizations_url":"https://api.github.com/users/martijnotto/orgs","repos_url":"https://api.github.com/users/martijnotto/repos","events_url":"https://api.github.com/users/martijnotto/events{/privacy}","received_events_url":"https://api.github.com/users/martijnotto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-12T13:36:15Z","updated_at":"2016-08-12T13:36:15Z","closed_at":null,"body":"While trying to compile the extension, instead of an extension I get an endless supply of compile errors. It's so much I can't even scroll up to the top. Here's what I did get:\r\n\r\n````\r\n/usr/include/php/20151012/Zend/zend_API.h:472:14: note: expected ‘zval * {aka struct _zval_struct *}’ but argument is of type ‘zval ** {aka struct _zval_struct **}’\r\n ZEND_API int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[],\r\n              ^\r\nIn file included from /usr/include/php/20151012/Zend/zend.h:31:0,\r\n                 from /usr/include/php/20151012/main/php.h:36,\r\n                 from /home/martijn/github/php-protobuf/protobuf.c:1:\r\n/home/martijn/github/php-protobuf/protobuf.c: In function ‘pb_get_field_name’:\r\n/usr/include/php/20151012/Zend/zend_compile.h:494:26: error: ‘execute_data’ undeclared (first use in this function)\r\n #define EX(element)    ((execute_data)->element)\r\n                          ^\r\n/usr/include/php/20151012/Zend/zend_types.h:530:26: note: in definition of macro ‘Z_OBJ’\r\n #define Z_OBJ(zval)     (zval).value.obj\r\n                          ^\r\n/usr/include/php/20151012/Zend/zend_API.h:361:32: note: in expansion of macro ‘EX’\r\n #define getThis()       (Z_OBJ(EX(This)) ? &EX(This) : NULL)\r\n                                ^\r\n/home/martijn/github/php-protobuf/protobuf.c:892:52: note: in expansion of macro ‘getThis’\r\n  if ((field_descriptors = pb_get_field_descriptors(getThis())) == NULL)\r\n                                                    ^\r\n/home/martijn/github/php-protobuf/protobuf.c:898:21: warning: passing argument 1 of ‘zend_hash_find’ makes pointer from integer without a cast [-Wint-conversion]\r\n  if (zend_hash_find(Z_ARRVAL_PP((field_descriptor)), PB_FIELD_NAME, sizeof(PB_FIELD_NAME), (void **) &(field_name))) {\r\n                     ^\r\nIn file included from /usr/include/php/20151012/Zend/zend.h:36:0,\r\n                 from /usr/include/php/20151012/main/php.h:36,\r\n                 from /home/martijn/github/php-protobuf/protobuf.c:1:\r\n/usr/include/php/20151012/Zend/zend_hash.h:154:30: note: expected ‘const HashTable * {aka const struct _zend_array *}’ but argument is of type ‘int’\r\n ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);\r\n                              ^\r\n/home/martijn/github/php-protobuf/protobuf.c:39:23: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type [-Wincompatible-pointer-types]\r\n #define PB_FIELD_NAME \"name\"\r\n                       ^\r\n/home/martijn/github/php-protobuf/protobuf.c:898:54: note: in expansion of macro ‘PB_FIELD_NAME’\r\n  if (zend_hash_find(Z_ARRVAL_PP((field_descriptor)), PB_FIELD_NAME, sizeof(PB_FIELD_NAME), (void **) &(field_name))) {\r\n                                                      ^\r\nIn file included from /usr/include/php/20151012/Zend/zend.h:36:0,\r\n                 from /usr/include/php/20151012/main/php.h:36,\r\n                 from /home/martijn/github/php-protobuf/protobuf.c:1:\r\n/usr/include/php/20151012/Zend/zend_hash.h:154:30: note: expected ‘zend_string * {aka struct _zend_string *}’ but argument is of type ‘char *’\r\n ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);\r\n                              ^\r\n/home/martijn/github/php-protobuf/protobuf.c:898:6: error: too many arguments to function ‘zend_hash_find’\r\n  if (zend_hash_find(Z_ARRVAL_PP((field_descriptor)), PB_FIELD_NAME, sizeof(PB_FIELD_NAME), (void **) &(field_name))) {\r\n      ^\r\nIn file included from /usr/include/php/20151012/Zend/zend.h:36:0,\r\n                 from /usr/include/php/20151012/main/php.h:36,\r\n                 from /home/martijn/github/php-protobuf/protobuf.c:1:\r\n/usr/include/php/20151012/Zend/zend_hash.h:154:30: note: declared here\r\n ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);\r\n                              ^\r\n/home/martijn/github/php-protobuf/protobuf.c:903:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]\r\n  return (const char *) Z_STRVAL_PP(field_name);\r\n         ^\r\n/home/martijn/github/php-protobuf/protobuf.c: In function ‘pb_get_value’:\r\n/home/martijn/github/php-protobuf/protobuf.c:975:27: warning: passing argument 1 of ‘zend_hash_index_find’ makes pointer from integer without a cast [-Wint-conversion]\r\n  if (zend_hash_index_find(Z_ARRVAL_PP(values), field_number, (void **) &value) == FAILURE)\r\n                           ^\r\nIn file included from /usr/include/php/20151012/Zend/zend.h:36:0,\r\n                 from /usr/include/php/20151012/main/php.h:36,\r\n                 from /home/martijn/github/php-protobuf/protobuf.c:1:\r\n/usr/include/php/20151012/Zend/zend_hash.h:156:30: note: expected ‘const HashTable * {aka const struct _zend_array *}’ but argument is of type ‘int’\r\n ZEND_API zval* ZEND_FASTCALL zend_hash_index_find(const HashTable *ht, zend_ulong h);\r\n                              ^\r\n/home/martijn/github/php-protobuf/protobuf.c:975:6: error: too many arguments to function ‘zend_hash_index_find’\r\n  if (zend_hash_index_find(Z_ARRVAL_PP(values), field_number, (void **) &value) == FAILURE)\r\n      ^\r\nIn file included from /usr/include/php/20151012/Zend/zend.h:36:0,\r\n                 from /usr/include/php/20151012/main/php.h:36,\r\n                 from /home/martijn/github/php-protobuf/protobuf.c:1:\r\n/usr/include/php/20151012/Zend/zend_hash.h:156:30: note: declared here\r\n ZEND_API zval* ZEND_FASTCALL zend_hash_index_find(const HashTable *ht, zend_ulong h);\r\n                              ^\r\n/home/martijn/github/php-protobuf/protobuf.c:975:80: warning: comparison between pointer and integer\r\n  if (zend_hash_index_find(Z_ARRVAL_PP(values), field_number, (void **) &value) == FAILURE)\r\n                                                                                ^\r\n/home/martijn/github/php-protobuf/protobuf.c: In function ‘pb_parse_field_value’:\r\n/home/martijn/github/php-protobuf/protobuf.c:999:20: error: lvalue required as left operand of assignment\r\n    Z_TYPE_P(value) = IS_DOUBLE;\r\n                    ^\r\n/home/martijn/github/php-protobuf/protobuf.c:1004:20: error: lvalue required as left operand of assignment\r\n    Z_TYPE_P(value) = IS_LONG;\r\n                    ^\r\n/home/martijn/github/php-protobuf/protobuf.c:1009:20: error: lvalue required as left operand of assignment\r\n    Z_TYPE_P(value) = IS_LONG;\r\n                    ^\r\n/home/martijn/github/php-protobuf/protobuf.c:1014:20: error: lvalue required as left operand of assignment\r\n    Z_TYPE_P(value) = IS_DOUBLE;\r\n                    ^\r\n/home/martijn/github/php-protobuf/protobuf.c:1019:20: error: lvalue required as left operand of assignment\r\n    Z_TYPE_P(value) = IS_LONG;\r\n                    ^\r\n/home/martijn/github/php-protobuf/protobuf.c:1024:22: error: ‘IS_BOOL’ undeclared (first use in this function)\r\n    Z_TYPE_P(value) = IS_BOOL;\r\n                      ^\r\n/home/martijn/github/php-protobuf/protobuf.c:1029:20: error: lvalue required as left operand of assignment\r\n    Z_TYPE_P(value) = IS_LONG;\r\n                    ^\r\n/home/martijn/github/php-protobuf/protobuf.c:1035:41: error: macro \"ZVAL_STRINGL\" passed 4 arguments, but takes just 3\r\n     ZVAL_STRINGL(value, str, str_size, 1);\r\n                                         ^\r\n/home/martijn/github/php-protobuf/protobuf.c:1035:5: error: ‘ZVAL_STRINGL’ undeclared (first use in this function)\r\n     ZVAL_STRINGL(value, str, str_size, 1);\r\n     ^\r\n/home/martijn/github/php-protobuf/protobuf.c: In function ‘pb_serialize_field_value’:\r\n/home/martijn/github/php-protobuf/protobuf.c:1058:56: error: macro \"ZVAL_STRING\" passed 3 arguments, but takes just 2\r\n   ZVAL_STRING(&method, PB_SERIALIZE_TO_STRING_METHOD, 0);\r\n                                                        ^\r\n/home/martijn/github/php-protobuf/protobuf.c:1058:3: error: ‘ZVAL_STRING’ undeclared (first use in this function)\r\n   ZVAL_STRING(&method, PB_SERIALIZE_TO_STRING_METHOD, 0);\r\n   ^\r\n/home/martijn/github/php-protobuf/protobuf.c:1060:32: warning: passing argument 2 of ‘call_user_function’ from incompatible pointer type [-Wincompatible-pointer-types]\r\n   if (call_user_function(NULL, value, &method, &ret, 0, NULL TSRMLS_CC) == FAILURE)\r\n                                ^\r\nIn file included from /usr/include/php/20151012/main/php.h:40:0,\r\n                 from /home/martijn/github/php-protobuf/protobuf.c:1:\r\n/usr/include/php/20151012/Zend/zend_API.h:471:14: note: expected ‘zval * {aka struct _zval_struct *}’ but argument is of type ‘zval ** {aka struct _zval_struct **}’\r\n ZEND_API int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[]);\r\n              ^\r\n/home/martijn/github/php-protobuf/protobuf.c:1074:51: warning: implicit declaration of function ‘Z_DVAL_PP’ [-Wimplicit-function-declaration]\r\n     r = writer_write_double(writer, field_number, Z_DVAL_PP(value));\r\n                                                   ^\r\n/home/martijn/github/php-protobuf/protobuf.c:1099:51: warning: passing argument 3 of ‘writer_write_string’ makes pointer from integer without a cast [-Wint-conversion]\r\n     r = writer_write_string(writer, field_number, Z_STRVAL_PP(value), Z_STRLEN_PP(value));\r\n                                                   ^\r\nIn file included from /home/martijn/github/php-protobuf/protobuf.c:8:0:\r\n/home/martijn/github/php-protobuf/writer.h:26:5: note: expected ‘const char *’ but argument is of type ‘int’\r\n int writer_write_string(writer_t *writer, uint32_t field_number, const char *str, size_t len);\r\n     ^\r\nMakefile:193: recipe for target 'protobuf.lo' failed\r\nmake: *** [protobuf.lo] Error 1\r\n````\r\n\r\nInstalled PHP version is 7.0"}}
{"actor":{"display_login":"martijnotto"}}