set custom binary name for frankenphp, allow linking against system openssl (fix mssql issues)#1056
set custom binary name for frankenphp, allow linking against system openssl (fix mssql issues)#1056
Conversation
src/SPC/builder/LibraryBase.php
Outdated
| return false; | ||
| } | ||
| } | ||
| return true; // allow using system dependencies if pkg_config_path is explicitly defined |
There was a problem hiding this comment.
Bypassing check could cause many problems in the future I think. Skipping building and using dynamic libraries should be two separate things, we cannot just do for checking though.
There was a problem hiding this comment.
This behaviour was already intended before, you even documented it: https://github.com/crazywhalecc/static-php-cli/blob/main/docs/en/develop/system-build-tools.md#pkg-config-compilation-nix-only
It was simply bugged before.
|
What do you think of it: This allows us to explicitly and definitively determine whether the dynamic library exists and is correctly imported. |
|
Yes, it's a good idea, but after some consideration, I'm aiming that at v3. For now this is a good enough workaround that implements the logic we already promised. |
Yes, although its side effect is linking to system libraries, the system part is beyond our control if we really want to achieve this effect, unless we explicitly specify it and make it clear to ourselves what we want to do. Passing shared libs explicitly, we could also determine and check |
|
That's why this logic only triggers when PKG_CONFIG_PATH is explicitly set. So users will have to e.g.
Generally, yes, I want this to be configurable. It's quite useful for the system packages to minimise disk space, actually. But I don't think we should showhorn it into v2 anymore and then merge it into v3. V3 already gives us better ways to configure and override library compilation logic, so it should be done there directly. |
Co-authored-by: Jerry Ma <jesse2061@outlook.com>
What does this PR do?
closes #1040
Checklist before merging
*.phpor*.json, run them locally to ensure your changes are valid:composer cs-fixcomposer analysecomposer testbin/spc dev:sort-configsrc/globals/test-extensions.php.extension testortest extensionsto trigger full test suite.