Build multiple php versions#525
Open
ebikt wants to merge 4 commits into
Open
Conversation
Wnen building for multiple PHP versions at once (e.g. in Debian Linux distribution), we need configurable build directory, so that we avoid copying source code.
When installing multiple php versions at once, ldconfig may fail when executed in parallel. This enables to configure command to be executed instead of ldconfig.
We need to distinguish phpcpp built for different php versions on same system, easiest way is to make different library name.
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.
There can be multiple PHP versions installed at once on Debian Linux distributions. PHP maintainer for debian has repositories for this hosted on deb.sury.org. User needs to copy PHP-CPP source to be able to build phpcpp for multiple
php versions at once. Moreover they need patch soname of output .so, so that multiple versions can be used simultaneously.
This merge requests aims to fix that, by introducing Makefile variables:
LIBRARY_NAME(defaultlibphpcppBUILD_DIR(defaultbuild)LDCONFIG(default$(shell which ldconfig 2>/dev/null))This change is backward compatible, i.e., behaviour of Makefile does not change when user user uses default values, with one exception: resulting .so and .a are now stored in root of
$(BUILD_DIR)instead of root of project, so that multiple versions can be built at once, even if user wants them to have same name.Excerpt from my makefile, that wraps PHP-CPP makefile for building for multiple PHP versions,
main line is the MAKEPHPCPP variable which expects PHP version in $* and expands to
call to PHP-CPP Makefile with properly set build variables.