[php-src] Issue #15808: Fails to compile with ZLibn

From: Date: Mon, 09 Sep 2024 01:25:55 +0000
Subject: [php-src] Issue #15808: Fails to compile with ZLibn
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-247723@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/15808 Author: uptudev ### Description Attempting to compile PHP with ZLib support (for Composer) results in compile time failure due to undefined symbols in the ./ext/zlib/zlib_arginfo.h file. ``` In file included from /home/uptu/opt/php-src-php-8.3.11/main/php.h:428, from /home/uptu/opt/php-src-php-8.3.11/ext/zlib/zlib.c:25: /home/uptu/opt/php-src-php-8.3.11/ext/zlib/zlib_arginfo.h: In function ‘register_zlib_symbols’: /home/uptu/opt/php-src-php-8.3.11/ext/zlib/zlib_arginfo.h:222:46: error: ‘Z_BLOCK’ undeclared (first use in this function); did you mean ‘F_LOCK’? 222 | REGISTER_LONG_CONSTANT("ZLIB_BLOCK", Z_BLOCK, CONST_PERSISTENT); | ^~~~~~~ /home/uptu/opt/php-src-php-8.3.11/Zend/zend_constants.h:51:105: note: in definition of macro ‘REGISTER_LONG_CONSTANT’ 51 | #define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number) | ^~~~ /home/uptu/opt/php-src-php-8.3.11/ext/zlib/zlib_arginfo.h:222:46: note: each undeclared identifier is reported only once for each function it appears in 222 | REGISTER_LONG_CONSTANT("ZLIB_BLOCK", Z_BLOCK, CONST_PERSISTENT); | ^~~~~~~ /home/uptu/opt/php-src-php-8.3.11/Zend/zend_constants.h:51:105: note: in definition of macro ‘REGISTER_LONG_CONSTANT’ 51 | #define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number) | ^~~~ /home/uptu/opt/php-src-php-8.3.11/ext/zlib/zlib_arginfo.h:226:44: error: ‘Z_RLE’ undeclared (first use in this function) 226 | REGISTER_LONG_CONSTANT("ZLIB_RLE", Z_RLE, CONST_PERSISTENT); | ^~~~~ /home/uptu/opt/php-src-php-8.3.11/Zend/zend_constants.h:51:105: note: in definition of macro ‘REGISTER_LONG_CONSTANT’ 51 | #define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number) | ^~~~ /home/uptu/opt/php-src-php-8.3.11/ext/zlib/zlib_arginfo.h:227:46: error: ‘Z_FIXED’ undeclared (first use in this function) 227 | REGISTER_LONG_CONSTANT("ZLIB_FIXED", Z_FIXED, CONST_PERSISTENT); | ^~~~~~~ /home/uptu/opt/php-src-php-8.3.11/Zend/zend_constants.h:51:105: note: in definition of macro ‘REGISTER_LONG_CONSTANT’ 51 | #define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number) | ^~~~ /home/uptu/opt/php-src-php-8.3.11/ext/zlib/zlib_arginfo.h:230:47: error: ‘ZLIB_VERNUM’ undeclared (first use in this function); did you mean ‘ZLIB_VERSION’? 230 | REGISTER_LONG_CONSTANT("ZLIB_VERNUM", ZLIB_VERNUM, CONST_PERSISTENT); | ^~~~~~~~~~~ /home/uptu/opt/php-src-php-8.3.11/Zend/zend_constants.h:51:105: note: in definition of macro ‘REGISTER_LONG_CONSTANT’ 51 | #define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number) | ^~~~ /home/uptu/opt/php-src-php-8.3.11/ext/zlib/zlib.c: In function ‘zif_inflate_add’: /home/uptu/opt/php-src-php-8.3.11/ext/zlib/zlib.c:960:22: error: ‘Z_BLOCK’ undeclared (first use in this function); did you mean ‘F_LOCK’? 960 | case Z_BLOCK: | ^~~~~~~ | F_LOCK /home/uptu/opt/php-src-php-8.3.11/ext/zlib/zlib.c: In function ‘zif_deflate_init’: /home/uptu/opt/php-src-php-8.3.11/ext/zlib/zlib.c:1126:22: error: ‘Z_RLE’ undeclared (first use in this function) 1126 | case Z_RLE: | ^~~~~ /home/uptu/opt/php-src-php-8.3.11/ext/zlib/zlib.c:1127:22: error: ‘Z_FIXED’ undeclared (first use in this function) 1127 | case Z_FIXED: | ^~~~~~~ /home/uptu/opt/php-src-php-8.3.11/ext/zlib/zlib.c: In function ‘zif_deflate_add’: /home/uptu/opt/php-src-php-8.3.11/ext/zlib/zlib.c:1193:22: error: ‘Z_BLOCK’ undeclared (first use in this function); did you mean ‘F_LOCK’? 1193 | case Z_BLOCK: | ^~~~~~~ | F_LOCK make: *** [Makefile:783: ext/zlib/zlib.lo] Error 1 ``` An up-to-date copy of ZLib is found in /usr/lib/libz.so, the typical location, and is also linked to in /lib/. pacman -Q autoconf automake libtool re2c bison zlib: ``` autoconf 2.72-1 automake 1.17-1 libtool 2.5.2+r1+g2fe3a3e2-1 re2c 3.1-2 bison 3.8.2-7 zlib 1:1.3.1-2 ``` ### PHP Version PHP 8.3.11 ### Operating System Arch Linux (Linux 6.10.8-arch1-1)

« previous php.bugs (#247723) next »