[php-src] Issue #22536: Compilation error for php-8.5
[email protected] (thomas-0816) Wed, 1 Jul 2026 14:21:15 +0000
| Newsgroups | php.bugs |
|---|---|
| Message-ID | <[email protected]> |
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