[php-src] Issue #22536: Compilation error for php-8.5
| From: | thomas-0816 | Date: | Wed, 01 Jul 2026 14:21:15 +0000 |
| Subject: | [php-src] Issue #22536: Compilation error for php-8.5 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-252324@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/22536
Author: thomas-0816
### Description
The following code:
```
git clone --depth=1 --branch=PHP-8.5 https://github.com/php/php-src.git
cd php-src
./buildconf --force
./configure --disable-zts --disable-all --enable-cli --enable-pdo
make -j$(nproc)
```
Resulted in this output:
```
/home/tb/code/pdo-duckdb2/temp/php-src/sapi/cli/php_cli_server.c: In function
‘php_cli_server_worker_install_pdeathsig’:
/home/tb/code/pdo-duckdb2/temp/php-src/sapi/cli/php_cli_server.c:2497:26: error:
‘php_cli_server_master’ undeclared (first use in this function); did you mean
‘php_cli_server_dtor’?
2497 | if (getppid() != php_cli_server_master) {
| ^~~~~~~~~~~~~~~~~~~~~
| php_cli_server_dtor
/home/tb/code/pdo-duckdb2/temp/php-src/sapi/cli/php_cli_server.c:2497:26: note: each undeclared
identifier is reported only once for each function it appears in
/home/tb/code/pdo-duckdb2/temp/php-src/sapi/cli/php_cli_server.c: At top level:
/home/tb/code/pdo-duckdb2/temp/php-src/sapi/cli/php_cli_server.c:2486:13: warning:
‘php_cli_server_worker_install_pdeathsig’ defined but not used [-Wunused-function]
2486 | static void php_cli_server_worker_install_pdeathsig(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
But I expected this output instead:
```
no compilation error
```
we have:
```
/sapi/cli/php_cli_server.c
#ifdef HAVE_FORK
...
static pid_t php_cli_server_master;
...
#if defined(HAVE_PRCTL) || defined(HAVE_PROCCTL)
static void php_cli_server_worker_install_pdeathsig(void)
{
...
if (getppid() != php_cli_server_master) {
```
### PHP Version
```plain
php-8.5
```
### Operating System
Ubuntu 24.04