Installation errors
- Dominant language
- C
- Stars
- 16
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
```
$ ~/php-jansson# make install
/bin/bash /root/php-jansson/libtool --mode=compile cc -I. -I/root/php-jansson -I/root/php-jansson/include -I/root/php-jansson/main -I/root/php-jansson -I/usr/include/php/20200930 -I/usr/include/php/20200930/main -I/usr/include/php/20200930/TSRM -I/usr/include/php/20200930/Zend -I/usr/include/php/20200930/ext -I/usr/include/php/20200930/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /root/php-jansson/jansson.c -o jansson.lo
libtool: compile: cc -I. -I/root/php-jansson -I/root/php-jansson/include -I/root/php-jansson/main -I/root/php-jansson -I/usr/include/php/20200930 -I/usr/include/php/20200930/main -I/usr/include/php/20200930/TSRM -I/usr/include/php/20200930/Zend -I/usr/include/php/20200930/ext -I/usr/include/php/20200930/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /root/php-jansson/jansson.c -fPIC -DPIC -o .libs/jansson.o
/root/php-jansson/jansson.c:40:54: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’
40 | static inline json_t* json_encode_zend(zval **zvalue TSRMLS_DC) {
| ^~~~~~~~~
/root/php-jansson/jansson.c:86:52: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’
86 | static inline zval* json_decode_zend(json_t **json TSRMLS_DC) {
| ^~~~~~~~~
/root/php-jansson/jansson.c:97:52: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
97 | ZVAL_STRING(retval, json_string_value(*json), 1);
| ^
In file included from /usr/include/php/20200930/main/php.h:36,
from /root/php-jansson/jansson.c:27:
/usr/include/php/20200930/Zend/zend_API.h:656: note: macro "ZVAL_STRING" defined here
656 | #define ZVAL_STRING(z, s) do { \
|
/root/php-jansson/jansson.c: In function ‘zif_jsson_encode’:
/root/php-jansson/jansson.c:159:44: error: expected ‘)’ before ‘TSRMLS_CC’
159 | if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &variable) == FAILURE) {
| ^~~~~~~~~
/root/php-jansson/jansson.c:159:6: error: too few arguments to function ‘zend_parse_parameters’
159 | if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &variable) == FAILURE) {
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php/20200930/main/php.h:36,
from /root/php-jansson/jansson.c:27:
/usr/include/php/20200930/Zend/zend_API.h:304:22: note: declared here
304 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
| ^~~~~~~~~~~~~~~~~~~~~
/root/php-jansson/jansson.c:188:5: error: unknown type name ‘zend_uint’; did you mean ‘zend_llist’?
188 | zend_uint klen = 0;
| ^~~~~~~~~
| zend_llist
/root/php-jansson/jansson.c:198:42: warning: passing argument 2 of ‘zend_hash_get_current_data_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
198 | zend_hash_get_current_data_ex(hash, (void**)&zvalue, &position) == SUCCESS;
| ^~~~~~~~~~~~~~~
| |
| void **
In file included from /usr/include/php/20200930/Zend/zend.h:33,
from /usr/include/php/20200930/main/php.h:32,
from /root/php-jansson/jansson.c:27:
/usr/include/php/20200930/Zend/zend_hash.h:235:30: note: expected ‘HashPosition *’ {aka ‘unsigned int *’} but argument is of type ‘void **’
235 | ZEND_API zval* ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/php-jansson/jansson.c:198:6: error: too many arguments to function ‘zend_hash_get_current_data_ex’
198 | zend_hash_get_current_data_ex(hash, (void**)&zvalue, &position) == SUCCESS;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php/20200930/Zend/zend.h:33,
from /usr/include/php/20200930/main/php.h:32,
from /root/php-jansson/jansson.c:27:
/usr/include/php/20200930/Zend/zend_hash.h:235:30: note: declared here
235 | ZEND_API zval* ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/php-jansson/jansson.c:202:13: warning: passing argument 2 of ‘zend_hash_get_current_key_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
202 | hash, &key, &klen, &kdx, 0, &position) == HASH_KEY_IS_STRING) {
| ^~~~
| |
| char **
In file included from /usr/include/php/20200930/Zend/zend.h:33,
from /usr/include/php/20200930/main/php.h:32,
from /root/php-jansson/jansson.c:27:
/usr/include/php/20200930/Zend/zend_hash.h:232:94: note: expected ‘zend_string **’ {aka ‘struct _zend_string **’} but argument is of type ‘char **’
232 | ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, HashPosition *pos);
| ~~~~~~~~~~~~~~^~~~~~~~~
/root/php-jansson/jansson.c:202:19: warning: passing argument 3 of ‘zend_hash_get_current_key_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
202 | hash, &key, &klen, &kdx, 0, &position) == HASH_KEY_IS_STRING) {
| ^~~~~
| |
| int *
In file included from /usr/include/php/20200930/Zend/zend.h:33,
from /usr/include/php/20200930/main/php.h:32,
from /root/php-jansson/jansson.c:27:
/usr/include/php/20200930/Zend/zend_hash.h:232:117: note: expected ‘zend_ulong *’ {aka ‘long unsigned int *’} but argument is of type ‘int *’
232 | ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, HashPosition *pos);
| ~~~~~~~~~~~~^~~~~~~~~
/root/php-jansson/jansson.c:202:26: warning: passing argument 4 of ‘zend_hash_get_current_key_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
202 | hash, &key, &klen, &kdx, 0, &position) == HASH_KEY_IS_STRING) {
| ^~~~
| |
| zend_ulong * {aka long unsigned int *}
In file included from /usr/include/php/20200930/Zend/zend.h:33,
from /usr/include/php/20200930/main/php.h:32,
from /root/php-jansson/jansson.c:27:
/usr/include/php/20200930/Zend/zend_hash.h:232:142: note: expected ‘HashPosition *’ {aka ‘unsigned int *’} but argument is of type ‘zend_ulong *’ {aka ‘long unsigned int *’}
232 | _get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, HashPosition *pos);
| ~~~~~~~~~~~~~~^~~
/root/php-jansson/jansson.c:201:10: error: too many arguments to function ‘zend_hash_get_current_key_ex’
201 | if (zend_hash_get_current_key_ex(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php/20200930/Zend/zend.h:33,
from /usr/include/php/20200930/main/php.h:32,
from /root/php-jansson/jansson.c:27:
/usr/include/php/20200930/Zend/zend_hash.h:232:30: note: declared here
232 | ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, HashPosition *pos);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/php-jansson/jansson.c:203:14: warning: implicit declaration of function ‘json_encode_zend’ [-Wimplicit-function-declaration]
203 | next = json_encode_zend(zvalue TSRMLS_CC);
| ^~~~~~~~~~~~~~~~
/root/php-jansson/jansson.c:203:37: error: expected ‘)’ before ‘TSRMLS_CC’
203 | next = json_encode_zend(zvalue TSRMLS_CC);
| ^~~~~~~~~~
| )
/root/php-jansson/jansson.c:203:12: warning: assignment to ‘json_t *’ {aka ‘struct json_t *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
203 | next = json_encode_zend(zvalue TSRMLS_CC);
| ^
/root/php-jansson/jansson.c:214:52: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2
214 | ZVAL_STRING(return_value, json_dumps(json, 0), 0);
| ^
In file included from /usr/include/php/20200930/main/php.h:36,
from /root/php-jansson/jansson.c:27:
/usr/include/php/20200930/Zend/zend_API.h:656: note: macro "ZVAL_STRING" defined here
656 | #define ZVAL_STRING(z, s) do { \
|
/root/php-jansson/jansson.c:214:4: error: ‘ZVAL_STRING’ undeclared (first use in this function)
214 | ZVAL_STRING(return_value, json_dumps(json, 0), 0);
| ^~~~~~~~~~~
/root/php-jansson/jansson.c:214:4: note: each undeclared identifier is reported only once for each function it appears in
/root/php-jansson/jansson.c: In function ‘zif_jsson_decode’:
/root/php-jansson/jansson.c:225:2: error: unknown type name ‘zend_uint’; did you mean ‘zend_llist’?
225 | zend_uint slen;
| ^~~~~~~~~
| zend_llist
/root/php-jansson/jansson.c:227:44: error: expected ‘)’ before ‘TSRMLS_CC’
227 | if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &slen) == FAILURE) {
| ^~~~~~~~~
/root/php-jansson/jansson.c:227:6: error: too few arguments to function ‘zend_parse_parameters’
227 | if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &slen) == FAILURE) {
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php/20200930/main/php.h:36,
from /root/php-jansson/jansson.c:27:
/usr/include/php/20200930/Zend/zend_API.h:304:22: note: declared here
304 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
| ^~~~~~~~~~~~~~~~~~~~~
/root/php-jansson/jansson.c:236:19: warning: implicit declaration of function ‘json_decode_zend’ [-Wimplicit-function-declaration]
236 | zval *retval = json_decode_zend(&json TSRMLS_CC);
| ^~~~~~~~~~~~~~~~
/root/php-jansson/jansson.c:236:41: error: expected ‘)’ before ‘TSRMLS_CC’
236 | zval *retval = json_decode_zend(&json TSRMLS_CC);
| ^~~~~~~~~~
| )
/root/php-jansson/jansson.c:236:19: warning: initialization of ‘zval *’ {aka ‘struct _zval_struct *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
236 | zval *retval = json_decode_zend(&json TSRMLS_CC);
| ^~~~~~~~~~~~~~~~
make: *** [Makefile:209: jansson.lo] Error 1
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with jansson.c and the make install build output, focusing on the PHP headers and API calls reported in the errors. Check how the extension is expected to build against the shown PHP installation; done means compilation completes and make install succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, php
- Domain
- backend, build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100