Skip to content

Compilation error for php-8.5 #22536

Description

@thomas-0816

Description

The following code:

git clone --depth=1 --branch=PHP-8.5 https://github.com/php/php-src.git
cd php-src/ext
git clone --depth=1 --branch=main git@github.com:thomas-0816/pdo-duckdb-php.git
cd pdo-duckdb-php
wget https://github.com/duckdb/duckdb/releases/download/v1.5.4/libduckdb-src.zip
unzip -o libduckdb-src.zip duckdb.h duckdb.hpp -d ./
wget https://github.com/duckdb/duckdb/releases/download/v1.5.4/static-libs-linux-amd64.zip
unzip -o static-libs-linux-amd64.zip libduckdb_static.a -d ./
cd ../../
./buildconf --force
./configure --disable-zts --disable-all --enable-cli --enable-pdo --with-pdo-duckdb
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

php-8.5

Operating System

Ubuntu 24.04

I'm currently testing intree compilation for my extension.

The compilation error comes with:
./configure --disable-zts --disable-all --enable-cli --enable-pdo --with-pdo-duckdb

The compilation error does NOT come with:
./configure --disable-zts --disable-all --enable-cli --enable-pcntl --enable-pdo --with-pdo-duckdb

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions