-
-
Notifications
You must be signed in to change notification settings - Fork 284
patchelf and rename -release tagged extensions from php configure build #767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… patchelf their soname back and rename them
I got build error when building shared extension:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses issues caused by the release option affecting shared PHP extensions. It updates tool checklists, modifies shared extension build operations to rename and update soname via patchelf, and adjusts file modifications conditional on a release flag.
- Added patchelf to various Linux tool lists.
- Modified the build process for shared extensions in LinuxBuilder.
- Adjusted file replacements in LibraryBase and updated logging in Extension.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/SPC/doctor/item/LinuxToolCheckList.php | Added 'patchelf' to tool lists for various Linux distributions. |
src/SPC/builder/linux/LinuxBuilder.php | Renames shared extension files and uses patchelf to update soname. |
src/SPC/builder/LibraryBase.php | Conditionally replaces lines in a source file based on a release flag. |
src/SPC/builder/Extension.php | Adds shared extension build checks and logs warnings for build issues. |
src/SPC/builder/BuilderBase.php | Removes redundant shared extension checks. |
Comments suppressed due to low confidence (1)
src/SPC/builder/Extension.php:338
- [nitpick] Adjust the backtick formatting in the logged message so that the command is properly encapsulated (e.g. use a single pair:
spc build
).
logger()->warning('Try deleting your build and source folders and running `spc build`` again.');
ld64 doesn't understand a lot of the linker flags that lld/gnu-ld support. MacOS shared extension support is very much barebones and we're expecting .so files (which curiously, also get generated on macos, when I expected .dylibs). I was able to build shared extensions on MacOS by toying with linker flags a bit, but I only have a shitty hacked together docker environment and hate the MacOS keyboard scheme, so it's not a priority for me. If you want to properly support shared extensions on mac, there's a lot of work to be done. Start group, end group for one is crucial, because by default, the linker doesn't go over previously visited archives again to find new unresolved symbols. We'd need to pass the libraries in perfect order, so that every library is only specified once, at the very last time that it needs to be referenced. |
closes #765 |
Removing
|
You're welcome to remove it, it was mostly because it made testing easier in combination with --whole-archive, to force full resolution of symbols in those libraries. I think I edged it out with the new logic to find dependent libraries and the --start-group and --end-group- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit of a beast though. Next time it would be better to separate the dependencies to another PR - this would help reviewing and automatically generating changelogs, if it’s not too related.
In addition, it may be convenient for us to add a simple commit message detect workflow to trigger a single test function.
What does this PR do?
the release option also affects shared extensions, which is unwanted, patchelf their soname back and rename them