Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error on PHP 8.1.3 #18

Open
cuongngoz opened this issue Mar 1, 2022 · 2 comments
Open

Build error on PHP 8.1.3 #18

cuongngoz opened this issue Mar 1, 2022 · 2 comments

Comments

@cuongngoz
Copy link

#9 6.169 /bin/bash /php-signal-handler/libtool --mode=compile cc -I. -I/php-signal-handler -I/php-signal-handler/include -I/php-signal-handler/main -I/php-signal-handler -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2    -DZEND_COMPILE_DL_EXT=1 -c /php-signal-handler/signal_handler.c -o signal_handler.lo  -MMD -MF signal_handler.dep -MT signal_handler.lo
#9 6.265 mkdir .libs
#9 6.268  cc -I. -I/php-signal-handler -I/php-signal-handler/include -I/php-signal-handler/main -I/php-signal-handler -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -DZEND_COMPILE_DL_EXT=1 -c /php-signal-handler/signal_handler.c -MMD -MF signal_handler.dep -MT signal_handler.lo  -fPIC -DPIC -o .libs/signal_handler.o
#9 6.426 /php-signal-handler/signal_handler.c: In function 'php_signal_callback_handler':
#9 6.426 /php-signal-handler/signal_handler.c:148:2: warning: implicit declaration of function 'TSRMLS_FETCH'; did you mean 'TSRMLS_CACHE'? [-Wimplicit-function-declaration]
#9 6.426   148 |  TSRMLS_FETCH();
#9 6.426       |  ^~~~~~~~~~~~
#9 6.426       |  TSRMLS_CACHE
#9 6.426 /php-signal-handler/signal_handler.c:162:25: error: expected ')' before 'TSRMLS_CC'
#9 6.426   162 |   php_error_docref(NULL TSRMLS_CC, E_ERROR, "Callback function not found for signo: %d", signo);
#9 6.426       |                         ^~~~~~~~~
#9 6.426 /php-signal-handler/signal_handler.c:162:3: error: too few arguments to function 'php_error_docref'
#9 6.426   162 |   php_error_docref(NULL TSRMLS_CC, E_ERROR, "Callback function not found for signo: %d", signo);
#9 6.426       |   ^~~~~~~~~~~~~~~~
#9 6.426 In file included from /php-signal-handler/signal_handler.c:25:
#9 6.426 /usr/local/include/php/main/php.h:327:23: note: declared here
#9 6.426   327 | PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format, ...)
#9 6.426       |                       ^~~~~~~~~~~~~~~~
#9 6.427 In file included from /usr/local/include/php/main/php.h:35,
#9 6.427                  from /php-signal-handler/signal_handler.c:25:
#9 6.427 /php-signal-handler/signal_handler.c:171:72: error: expected ')' before 'TSRMLS_CC'
#9 6.427   171 |  call_user_function(EG(function_table), NULL, handle, retval, 1, param TSRMLS_CC);
#9 6.427       |                                                                        ^~~~~~~~~
#9 6.427 /usr/local/include/php/Zend/zend_API.h:588:75: note: in definition of macro 'call_user_function'
#9 6.427   588 |  _call_user_function_impl(object, function_name, retval_ptr, param_count, params, NULL)
#9 6.427       |                                                                           ^~~~~~
#9 6.428 /usr/local/include/php/Zend/zend_API.h:588:2: error: too few arguments to function '_call_user_function_impl'
#9 6.428   588 |  _call_user_function_impl(object, function_name, retval_ptr, param_count, params, NULL)
#9 6.428       |  ^~~~~~~~~~~~~~~~~~~~~~~~
#9 6.428 /php-signal-handler/signal_handler.c:171:2: note: in expansion of macro 'call_user_function'
#9 6.428   171 |  call_user_function(EG(function_table), NULL, handle, retval, 1, param TSRMLS_CC);
#9 6.428       |  ^~~~~~~~~~~~~~~~~~
#9 6.428 /usr/local/include/php/Zend/zend_API.h:585:22: note: declared here
#9 6.428   585 | ZEND_API zend_result _call_user_function_impl(zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], HashTable *named_params);
#9 6.428       |                      ^~~~~~~~~~~~~~~~~~~~~~~~
#9 6.428 /php-signal-handler/signal_handler.c: In function 'zif_attach_signal':
#9 6.428 /php-signal-handler/signal_handler.c:193:44: error: expected ')' before 'TSRMLS_CC'
#9 6.428   193 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz", &signo, &handle) == FAILURE) {
#9 6.428       |                                            ^~~~~~~~~
#9 6.429 /php-signal-handler/signal_handler.c:193:6: error: too few arguments to function 'zend_parse_parameters'
#9 6.429   193 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz", &signo, &handle) == FAILURE) {
#9 6.429       |      ^~~~~~~~~~~~~~~~~~~~~
#9 6.429 In file included from /usr/local/include/php/main/php.h:35,
#9 6.429                  from /php-signal-handler/signal_handler.c:25:
#9 6.429 /usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
#9 6.429   335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
#9 6.429       |                      ^~~~~~~~~~~~~~~~~~~~~
#9 6.430 /php-signal-handler/signal_handler.c:199:25: error: expected ')' before 'TSRMLS_CC'
#9 6.430   199 |   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid signal");
#9 6.430       |                         ^~~~~~~~~
#9 6.430 /php-signal-handler/signal_handler.c:199:3: error: too few arguments to function 'php_error_docref'
#9 6.430   199 |   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid signal");
#9 6.430       |   ^~~~~~~~~~~~~~~~
#9 6.430 In file included from /php-signal-handler/signal_handler.c:25:
#9 6.430 /usr/local/include/php/main/php.h:327:23: note: declared here
#9 6.430   327 | PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format, ...)
#9 6.430       |                       ^~~~~~~~~~~~~~~~
#9 6.431 /php-signal-handler/signal_handler.c:207:45: error: expected ')' before 'TSRMLS_CC'
#9 6.431   207 |  if (!zend_is_callable(handle, 0, &func_name TSRMLS_CC)) {
#9 6.431       |                                             ^~~~~~~~~~
#9 6.431       |                                             )
#9 6.431 /php-signal-handler/signal_handler.c:210:25: error: expected ')' before 'TSRMLS_CC'
#9 6.431   210 |   php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s is not a callable function name error", ZSTR_VAL(func_name));
#9 6.431       |                         ^~~~~~~~~
#9 6.431 /php-signal-handler/signal_handler.c:210:3: error: too few arguments to function 'php_error_docref'
#9 6.431   210 |   php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s is not a callable function name error", ZSTR_VAL(func_name));
#9 6.431       |   ^~~~~~~~~~~~~~~~
#9 6.431 In file included from /php-signal-handler/signal_handler.c:25:
#9 6.431 /usr/local/include/php/main/php.h:327:23: note: declared here
#9 6.431   327 | PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format, ...)
#9 6.431       |                       ^~~~~~~~~~~~~~~~
#9 6.432 /php-signal-handler/signal_handler.c:219:25: error: expected ')' before 'TSRMLS_CC'
#9 6.432   219 |   php_error_docref(NULL TSRMLS_CC, E_WARNING, "An error occurred while setting a signal handler for signo: %lu", signo);
#9 6.432       |                         ^~~~~~~~~
#9 6.432 /php-signal-handler/signal_handler.c:219:3: error: too few arguments to function 'php_error_docref'
#9 6.432   219 |   php_error_docref(NULL TSRMLS_CC, E_WARNING, "An error occurred while setting a signal handler for signo: %lu", signo);
#9 6.432       |   ^~~~~~~~~~~~~~~~
#9 6.432 In file included from /php-signal-handler/signal_handler.c:25:
#9 6.432 /usr/local/include/php/main/php.h:327:23: note: declared here
#9 6.432   327 | PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format, ...)
#9 6.432       |                       ^~~~~~~~~~~~~~~~
#9 6.433 /php-signal-handler/signal_handler.c: In function 'zif_detach_signal':
#9 6.433 /php-signal-handler/signal_handler.c:242:44: error: expected ')' before 'TSRMLS_CC'
#9 6.433   242 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &signo) == FAILURE) {
#9 6.433       |                                            ^~~~~~~~~
#9 6.433 /php-signal-handler/signal_handler.c:242:6: error: too few arguments to function 'zend_parse_parameters'
#9 6.433   242 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &signo) == FAILURE) {
#9 6.433       |      ^~~~~~~~~~~~~~~~~~~~~
#9 6.434 In file included from /usr/local/include/php/main/php.h:35,
#9 6.434                  from /php-signal-handler/signal_handler.c:25:
#9 6.434 /usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
#9 6.434   335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
#9 6.434       |                      ^~~~~~~~~~~~~~~~~~~~~
#9 6.434 /php-signal-handler/signal_handler.c:248:25: error: expected ')' before 'TSRMLS_CC'
#9 6.434   248 |   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid signal");
#9 6.434       |                         ^~~~~~~~~
#9 6.434 /php-signal-handler/signal_handler.c:248:3: error: too few arguments to function 'php_error_docref'
#9 6.434   248 |   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid signal");
#9 6.434       |   ^~~~~~~~~~~~~~~~
#9 6.434 In file included from /php-signal-handler/signal_handler.c:25:
#9 6.434 /usr/local/include/php/main/php.h:327:23: note: declared here
#9 6.434   327 | PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format, ...)
#9 6.434       |                       ^~~~~~~~~~~~~~~~
#9 6.435 /php-signal-handler/signal_handler.c:257:25: error: expected ')' before 'TSRMLS_CC'
#9 6.435   257 |   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot detach signo: %lu", signo);
#9 6.435       |                         ^~~~~~~~~
#9 6.435 /php-signal-handler/signal_handler.c:257:3: error: too few arguments to function 'php_error_docref'
#9 6.435   257 |   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot detach signo: %lu", signo);
#9 6.435       |   ^~~~~~~~~~~~~~~~
#9 6.435 In file included from /php-signal-handler/signal_handler.c:25:
#9 6.435 /usr/local/include/php/main/php.h:327:23: note: declared here
#9 6.435   327 | PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format, ...)
#9 6.435       |                       ^~~~~~~~~~~~~~~~
#9 6.443 make: *** [Makefile:201: signal_handler.lo] Error 1
------
executor failed running [/bin/sh -c curl -o php-signal-handler.tar.gz -LJ https://github.com/rstgroup/php-signal-handler/tarball/master && mkdir php-signal-handler && tar xzvf php-signal-handler.tar.gz -C php-signal-handler --strip-components 1 && cd php-signal-handler && phpize && ./configure && make && make install && echo "extension=signal_handler.so" > /usr/local/etc/php/conf.d/signal_handler.ini]: exit code: 2

Help pls!

@Webonaute
Copy link

We have same issue! is it possible to fix it for php8.1?

@HemeraOne
Copy link

I fixed it in #19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants