[php-src] Issue #9791: 8.1.11 Build fails

From: Date: Thu, 20 Oct 2022 20:27:18 +0000
Subject: [php-src] Issue #9791: 8.1.11 Build fails
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-242648@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/9791 Author: sqpp ### Description I am really sorry if this is not an appropriate place to ask, but for some reason, my PHP build fails. Is it OLS-related or PHP, I am a bit confused about where should I ask or who to contact. ``` In file included from /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:67: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c:84:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes] 84 | static int (*s_lscapi_dump_me)() = NULL; | ^~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c:85:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes] 85 | static int (*s_lscapi_prepare_me)() = NULL; | ^~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c:107:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes] 107 | int LSAPI_Get_ppid(); | ^~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c: In function ‘LSCRIU_load_liblscapi’: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c:244:10: warning: unused variable ‘ch’ [-Wunused-variable] 244 | char ch; | ^~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c: At top level: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c:399:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration] 399 | static void inline LSCRIU_Debugging(void) {} | ^~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c:400:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration] 400 | static void inline LSCRIU_Restored_Error(int iFatal, char *format, ...) {} | ^~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c: In function ‘LSCRIU_Native_Dump’: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c:409:33: warning: unused variable ‘criu_native_dump_response’ [-Wunused-variable] 409 | criu_native_dump_response_t criu_native_dump_response; | ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c: In function ‘LSCRIU_CloudLinux_Checkpoint’: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c:456:15: warning: unused variable ‘pchError’ [-Wunused-variable] 456 | char *pchError; | ^~~~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c: In function ‘LSCRIU_try_checkpoint’: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c:531:17: warning: unused variable ‘iPidSender’ [-Wunused-variable] 531 | pid_t iPidSender; | ^~~~~~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c:530:17: warning: unused variable ‘iResult’ [-Wunused-variable] 530 | int iResult; | ^~~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c:508:11: warning: unused variable ‘iPidDump’ [-Wunused-variable] 508 | pid_t iPidDump = getpid(); | ^~~~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c:506:9: warning: variable ‘iRet’ set but not used [-Wunused-but-set-variable] 506 | int iRet; | ^~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c: At top level: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c:554:12: warning: function declaration isn’t a prototype [-Wstrict-prototypes] 554 | static int init_native_env() | ^~~~~~~~~~~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c: In function ‘LSCRIU_Init_Env_Parameters’: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c:640:69: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] 640 | lscriu_dbg("LSCRIU (%d): Use shared memory\n", getpid()); | ^ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c:644:61: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] 644 | lscriu_dbg("LSCRIU (%d): NOT Listening\n", getpid()); | ^ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c:647:10: warning: unused variable ‘ch’ [-Wunused-variable] 647 | char ch; | ^~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c: In function ‘sapi_lsapi_ini_defaults’: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:141:17: warning: unused variable ‘entry’ [-Wunused-variable] 141 | zval *tmp, *entry; | ^~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:141:11: warning: unused variable ‘tmp’ [-Wunused-variable] 141 | zval *tmp, *entry; | ^~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c: In function ‘sapi_lsapi_activate’: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:700:22: warning: unused variable ‘doc_root_len’ [-Wunused-variable] 700 | size_t path_len, doc_root_len, server_name_len; | ^~~~~~~~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:699:18: warning: unused variable ‘doc_root’ [-Wunused-variable] 699 | char *path, *doc_root, *server_name; | ^~~~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c: At top level: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:772:5: warning: initialization of ‘char * (*)(const char *, size_t)’ {aka ‘char * (*)(const char *, long unsigned int)’} from incompatible pointer type ‘char * (*)(char *, size_t)’ {aka ‘char * (*)(char *, long unsigned int)’} [-Wincompatible-pointer-types] 772 | sapi_lsapi_getenv, /* getenv */ | ^~~~~~~~~~~~~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:772:5: note: (near initialization for ‘lsapi_sapi_module.getenv’) /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:784:5: warning: initialization of ‘void (*)(const char *, int)’ from incompatible pointer type ‘void (*)(char *, int)’ [-Wincompatible-pointer-types] 784 | sapi_lsapi_log_message, /* Log message */ | ^~~~~~~~~~~~~~~~~~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:784:5: note: (near initialization for ‘lsapi_sapi_module.log_message’) /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c: In function ‘lsapi_chdir_primary_script’: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:835:29: warning: passing argument 1 of ‘strrchr’ from incompatible pointer type [-Wincompatible-pointer-types] 835 | p = strrchr( file_handle->filename, '/' ); | ~~~~~~~~~~~^~~~~~~~~~ | | | zend_string * {aka struct _zend_string *} In file included from /usr/local/lsws/phpbuild/php-8.1.11/include/../main/php_config.h:2222, from /usr/local/lsws/phpbuild/php-8.1.11/Zend/zend_config.h:1, from /usr/local/lsws/phpbuild/php-8.1.11/Zend/zend_portability.h:43, from /usr/local/lsws/phpbuild/php-8.1.11/Zend/zend_types.h:25, from /usr/local/lsws/phpbuild/php-8.1.11/Zend/zend.h:27, from /usr/local/lsws/phpbuild/php-8.1.11/main/php.h:31, from /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:19: /usr/include/string.h:273:35: note: expected ‘const char *’ but argument is of type ‘zend_string *’ {aka ‘struct _zend_string *’} 273 | extern char *strrchr (const char *__s, int __c) | ~~~~~~~~~~~~^~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:839:33: warning: passing argument 1 of ‘strcmp’ from incompatible pointer type [-Wincompatible-pointer-types] 839 | if ( strcmp( file_handle->filename, s_cur_chdir ) != 0 ) { | ~~~~~~~~~~~^~~~~~~~~~ | | | zend_string * {aka struct _zend_string *} In file included from /usr/local/lsws/phpbuild/php-8.1.11/include/../main/php_config.h:2222, from /usr/local/lsws/phpbuild/php-8.1.11/Zend/zend_config.h:1, from /usr/local/lsws/phpbuild/php-8.1.11/Zend/zend_portability.h:43, from /usr/local/lsws/phpbuild/php-8.1.11/Zend/zend_types.h:25, from /usr/local/lsws/phpbuild/php-8.1.11/Zend/zend.h:27, from /usr/local/lsws/phpbuild/php-8.1.11/main/php.h:31, from /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:19: /usr/include/string.h:156:32: note: expected ‘const char *’ but argument is of type ‘zend_string *’ {aka ‘struct _zend_string *’} 156 | extern int strcmp (const char *__s1, const char *__s2) | ~~~~~~~~~~~~^~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:840:31: warning: passing argument 1 of ‘chdir’ from incompatible pointer type [-Wincompatible-pointer-types] 840 | chdir( file_handle->filename ); | ~~~~~~~~~~~^~~~~~~~~~ | | | zend_string * {aka struct _zend_string *} In file included from /usr/include/aarch64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from /usr/local/lsws/phpbuild/php-8.1.11/Zend/zend_signal.h:26, from /usr/local/lsws/phpbuild/php-8.1.11/Zend/zend.h:41, from /usr/local/lsws/phpbuild/php-8.1.11/main/php.h:31, from /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:19: /usr/include/unistd.h:517:31: note: expected ‘const char *’ but argument is of type ‘zend_string *’ {aka ‘struct _zend_string *’} 517 | extern int chdir (const char *__path) __THROW __nonnull ((1)) __wur; | ~~~~~~~~~~~~^~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:846:35: warning: passing argument 1 of ‘strcmp’ from incompatible pointer type [-Wincompatible-pointer-types] 846 | ( strcmp( file_handle->filename, CWDG(cwd).cwd ) != 0 ) ) { | ~~~~~~~~~~~^~~~~~~~~~ | | | zend_string * {aka struct _zend_string *} In file included from /usr/local/lsws/phpbuild/php-8.1.11/include/../main/php_config.h:2222, from /usr/local/lsws/phpbuild/php-8.1.11/Zend/zend_config.h:1, from /usr/local/lsws/phpbuild/php-8.1.11/Zend/zend_portability.h:43, from /usr/local/lsws/phpbuild/php-8.1.11/Zend/zend_types.h:25, from /usr/local/lsws/phpbuild/php-8.1.11/Zend/zend.h:27, from /usr/local/lsws/phpbuild/php-8.1.11/main/php.h:31, from /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:19: /usr/include/string.h:156:32: note: expected ‘const char *’ but argument is of type ‘zend_string *’ {aka ‘struct _zend_string *’} 156 | extern int strcmp (const char *__s1, const char *__s2) | ~~~~~~~~~~~~^~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:847:38: error: invalid operands to binary - (have ‘char *’ and ‘zend_string *’ {aka ‘struct _zend_string *’}) 847 | CWDG(cwd).cwd_length = p - file_handle->filename; | ^ ~~~~~~~~~~~~~~~~~~~~~ | | | zend_string * {aka struct _zend_string *} /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c: In function ‘lsapi_fopen_primary_script’: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:871:27: warning: assignment to ‘zend_string *’ {aka ‘struct _zend_string *’} from incompatible pointer type ‘char *’ [-Wincompatible-pointer-types] 871 | file_handle->filename = SG(request_info).path_translated; | ^ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:872:18: error: ‘zend_file_handle’ {aka ‘struct _zend_file_handle’} has no member named ‘free_filename’; did you mean ‘filename’? 872 | file_handle->free_filename = 0; | ^~~~~~~~~~~~~ | filename /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:863:12: warning: unused variable ‘p’ [-Wunused-variable] 863 | char * p; | ^ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c: In function ‘lsapi_execute_script’: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:885:27: warning: assignment to ‘zend_string *’ {aka ‘struct _zend_string *’} from incompatible pointer type ‘char *’ [-Wincompatible-pointer-types] 885 | file_handle->filename = SG(request_info).path_translated; | ^ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c: At top level: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:919:13: warning: function declaration isn’t a prototype [-Wstrict-prototypes] 919 | static void lsapi_clean_shutdown() | ^~~~~~~~~~~~~~~~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c: In function ‘lsapi_clean_shutdown’: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:922:9: warning: variable ‘sa_rc’ set but not used [-Wunused-but-set-variable] 922 | int sa_rc; | ^~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c: In function ‘lsapi_module_main’: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:983:9: warning: variable ‘sa_rc’ set but not used [-Wunused-but-set-variable] 983 | int sa_rc; | ^~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c: At top level: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:1098:13: warning: function declaration isn’t a prototype [-Wstrict-prototypes] 1098 | static void user_config_cache_init() | ^~~~~~~~~~~~~~~~~~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c: In function ‘lsapi_activate_user_ini_walk_down_the_path’: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:1331:10: warning: unused variable ‘path_len’ [-Wunused-variable] 1331 | uint path_len, docroot_len; | ^~~~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c: At top level: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:1416:13: warning: function declaration isn’t a prototype [-Wstrict-prototypes] 1416 | static void override_ini() | ^~~~~~~~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c: In function ‘cli_main’: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:1663:50: warning: assignment to ‘zend_string *’ {aka ‘struct _zend_string *’} from incompatible pointer type ‘char *’ [-Wincompatible-pointer-types] 1663 | file_handle.filename = *p; | ^ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:1664:41: error: ‘zend_file_handle’ {aka ‘struct _zend_file_handle’} has no member named ‘free_filename’; did you mean ‘filename’? 1664 | file_handle.free_filename = 0; | ^~~~~~~~~~~~~ | filename /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:1668:76: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘zend_string *’ {aka ‘struct _zend_string *’} [-Wformat=] 1668 | zend_printf("No syntax errors detected in %s\n", file_handle.filename); | ~^ ~~~~~~~~~~~~~~~~~~~~ | | | | char * zend_string * {aka struct _zend_string *} /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:1670:62: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘zend_string *’ {aka ‘struct _zend_string *’} [-Wformat=] 1670 | zend_printf("Errors parsing %s\n", file_handle.filename); | ~^ ~~~~~~~~~~~~~~~~~~~~ | | | | char * zend_string * {aka struct _zend_string *} /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:1674:50: warning: assignment to ‘zend_string *’ {aka ‘struct _zend_string *’} from incompatible pointer type ‘char *’ [-Wincompatible-pointer-types] 1674 | file_handle.filename = *p; | ^ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:1675:41: error: ‘zend_file_handle’ {aka ‘struct _zend_file_handle’} has no member named ‘free_filename’; did you mean ‘filename’? 1675 | file_handle.free_filename = 0; | ^~~~~~~~~~~~~ | filename /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c: In function ‘main’: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:1896:9: warning: unused variable ‘iRequestsProcessed’ [-Wunused-variable] 1896 | int iRequestsProcessed = 0; | ^~~~~~~~~~~~~~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c: At top level: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:1970:5: warning: missing initializer for field ‘num_args’ of ‘zend_function_entry’ {aka ‘struct _zend_function_entry’} [-Wmissing-field-initializers] 1970 | {NULL, NULL, NULL} | ^ In file included from /usr/local/lsws/phpbuild/php-8.1.11/main/php.h:35, from /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:19: /usr/local/lsws/phpbuild/php-8.1.11/Zend/zend_API.h:39:18: note: ‘num_args’ declared here 39 | uint32_t num_args; | ^~~~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c: In function ‘parse_opt’: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:1513:16: warning: this statement may fall through [-Wimplicit-fallthrough=] 1513 | if ( *((*(p-1))+2) == 's' ) | ^ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:1515:9: note: here 1515 | case 'h': | ^~~~ At top level: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:860:12: warning: ‘lsapi_fopen_primary_script’ defined but not used [-Wunused-function] 860 | static int lsapi_fopen_primary_script( zend_file_handle * file_handle ) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lsapi_main.c:67: /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c:305:14: warning: ‘LSCRIU_Error_File_Name’ defined but not used [-Wunused-function] 305 | static char *LSCRIU_Error_File_Name(char *pchFile, int max_len) | ^~~~~~~~~~~~~~~~~~~~~~ /usr/local/lsws/phpbuild/php-8.1.11/sapi/litespeed/lscriu.c:88:12: warning: ‘s_criu_debug’ defined but not used [-Wunused-variable] 88 | static int s_criu_debug = 0; | ^~~~~~~~~~~~ make: *** [Makefile:626: sapi/litespeed/lsapi_main.lo] Error 1 **ERROR** Could not compile PHP ``` ### PHP Version 8.1.11 ### Operating System Ubuntu 22.04 LTS

« previous php.bugs (#242648) next »