Skip to content

[only 8.5 rc2] make -j32 or make -j4 fail, make -j works (missing zend_language_scanner_defs.h) #20267

@henderkes

Description

@henderkes

Description

The following code:

// untar 8.5.0 rc2, cd into folder
// extract ast extension source into ext/ast
./configure --disable-all --enable-cli --enable-ast
make -j32

Resulted in this output:

/bin/sh /home/m/static-php-cli/source/php-src/libtool --silent --preserve-dup-deps --tag=CC --mode=compile gcc -Iext/json/ -I/home/m/static-php-cli/source/php-src/ext/json/ -I/home/m/static-php-cli/source/php-src/main -I/home/m/static-php-cli/source/php-src -I/home/m/static-php-cli/source/php-src/ext/date/lib -I/home/m/static-php-cli/source/php-src/ext/lexbor -I/home/m/static-php-cli/source/php-src/ext/uri/uriparser/include -I/home/m/static-php-cli/source/php-src/TSRM -I/home/m/static-php-cli/source/php-src/Zend  -I/home/m/static-php-cli/buildroot/include -D_GNU_SOURCE -D_REENTRANT -pthread  -fno-common -Wstrict-prototypes -Wformat-truncation -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -fPIC -Os -fPIE -ffp-contract=off -fvisibility=hidden -pthread -DNDEBUG -DZTS -Wimplicit-fallthrough=1 -DZEND_MAX_EXECUTION_TIMERS  -g -fstack-protector-strong -fno-ident -fPIE -fPIC -Os -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /home/m/static-php-cli/source/php-src/ext/json/json_encoder.c -o ext/json/json_encoder.lo  -MMD -MF ext/json/json_encoder.dep -MT ext/json/json_encoder.lo
/home/m/static-php-cli/source/php-src/ext/ast/ast.c:12:10: fatal error: zend_language_scanner_defs.h: No such file or directory
   12 | #include "zend_language_scanner_defs.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:530: ext/ast/ast.lo] Error 1
make: *** Waiting for unfinished jobs....

But I expected this output instead:

Build complete.
Don't forget to run 'make test'.

I could imagine that this is only an issue because the ast extension doesn't declare all of it's dependencies as it's expected to be compiled as a shared extension, but I still find it very curious that this always works with other php versions and it always works with make -j instead of make -j32 or even make -j1.

PHP Version

PHP 8.5.0 RC2.
8.2, 8.3, 8.4 and 8.5 beta1-3 work.

Operating System

x86_64-linux and aarch64-linux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions