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
Open
main/io build directory missing from PHP_ADD_BUILD_DIR, breaks out-of-tree (VPATH) builds#22913mati75 wants to merge 1 commit into
mati75 wants to merge 1 commit into
Conversation
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, ...).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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.