-
Notifications
You must be signed in to change notification settings - Fork 17
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
How to require specific libraries dependencies #109
Comments
Indeed, Composer supports the |
Checking library for composer packages (runtime) is very different than checking development header needed by C extension (buildtime) The check is usually done in config.m4, don't know if a duplicated check is really needed Common usage is pkg-config, so a check relying on this may be a simple solution
OR, checking minimal version
So something like
Other usage is checking header availability (.h) or/and shared library (.so) |
The goal of listing the library is to check if the development package is installed on Linux or to download the library on Windows. For Windows, each library is built separately from the extension and stored here: https://downloads.php.net/~windows/pecl/deps/ If pie can check if library development is installed, on Windows it can download the library from the repository defined in the configuration (the URL must be changed without an upgrade needed). The building command of the PHP extension on Windows is the same (exclude some exceptions) as Linux when using phpize. @remicollet, IMHO this syntax is too complex: "require": {
"php": ">=8.0",
"command(pkg-config)": "*",
"pkgconfig(libzip)": ">=1.0.0"
} |
@macintoshplus note that PIE does not support building extensions on Windows at the moment, it will ONLY download prebuilt binaries at the moment (see docs: https://github.com/php/pie/blob/main/docs/extension-maintainers.md#windows-support ) so Windows isn't really a consideration at the moment. What Remi said about pkg-config is correct; and this is currently what |
Hi @asgrim, The goal of adding library dependencies is multiple:
For this reason, the library dependencies constraints must be more system agnostic. The real check must be implemented by Pie or another program (e.g., a Pie plugin). |
I think it would be interesting to specify in the required elements of the
composer.json
file the libraries needed for the extension. Like extension, the prefixlib-
can be used.These dependencies would allow us to check for security vulnerabilities and during compilation, retrieve the source code or binary/SDK automatically.
Exemple:
For
openssl
the tag used areopenssl-3.0.8
oropenssl-3.0.15.pl1
or newer.The text was updated successfully, but these errors were encountered: