Skip to content

main/io build directory missing from PHP_ADD_BUILD_DIR, breaks out-of-tree (VPATH) builds - #22913

Open
mati75 wants to merge 1 commit into
php:masterfrom
mati75:fix-main-io-builddir
Open

main/io build directory missing from PHP_ADD_BUILD_DIR, breaks out-of-tree (VPATH) builds#22913
mati75 wants to merge 1 commit into
php:masterfrom
mati75:fix-main-io-builddir

Conversation

@mati75

@mati75 mati75 commented Jul 28, 2026

Copy link
Copy Markdown

Building PHP 8.6.0alpha3 in an out-of-tree build directory (VPATH build, e.g. Debian's separate fpm-build/cli-build dirs) fails while compiling the new main/io/*.c files:

main/io/php_io_copy_freebsd.c:1: fatal error: opening dependency file main/io/php_io_copy_freebsd.dep: No such file or directory
compilation terminated.
make[2]: *** [Makefile:1841: main/io/php_io_copy_freebsd.lo] Error 1

The same error occurs for php_io.c, php_io_copy_linux.c, php_io_copy_solaris.c, and php_io_copy_macos.c.

configure.ac registers the sources via PHP_ADD_SOURCES([main/io], ...), but the main/io directory was never added to the PHP_ADD_BUILD_DIR([...]) list that configure uses to pre-create build directories for VPATH builds. Every other directory containing sources (main, main/poll, main/streams, TSRM, Zend, etc.) is listed there; main/io was simply omitted when the new I/O subsystem was introduced. As a result, main/io/ never gets created in the build tree, and the compiler can't write the .dep/.o files into it.

PHP_ADD_SOURCES([main/io], ...) adds the new I/O subsystem sources
(php_io.c, php_io_copy_*.c) to the build, but main/io was never added
to the PHP_ADD_BUILD_DIR list. Since only directories in that list get
pre-created for out-of-tree (VPATH) builds, main/io/ never existed in
such build trees, causing:

  fatal error: opening dependency file main/io/php_io_copy_freebsd.dep:
  No such file or directory

for every file in main/io/ when building outside the source tree
(e.g. Debian's separate fpm-build/cli-build directories).

Add main/io to PHP_ADD_BUILD_DIR, alongside the other source
directories (main, main/poll, main/streams, TSRM, Zend, ...).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant