Repository navigation
Enable sodium and gmp when their libraries are installed - #1
Merged
Rusydy merged 2 commits intoOct 20, 2026
Merged
Conversation
php-build's default configure options include --with-bz2, so configure fails with "Please reinstall the BZip2 distribution" without it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
php-build's default configure options include neither --with-sodium nor --with-gmp, so installing libsodium or gmp had no effect, and composer install fails for packages that require ext-sodium. Add both flags when pkg-config finds the library, on Linux and macOS. The flags take no DIR because PHP < 8.4 then looks for DIR/include/gmp.h, which Debian's multiarch layout lacks. A sodium or gmp flag in PHP_CONFIGURE_OPTIONS takes precedence. CI installs both libraries and checks with php --ri that openssl, curl, sodium and gmp are loaded. Fixes asdf-community#147 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
For asdf-community#200. Fixes asdf-community#147.
php-build's default configure options include neither
--with-sodiumnor--with-gmp. On master, macOS got both automatically when Homebrew had libsodium/gmp, but asdf-community#200 removes that detection, even though its README still lists brew install gmp libsodium. Linux never had it, so composer install fails for packages that need ext-sodium unless you setPHP_CONFIGURE_OPTIONS.setup_optional_extensions adds
--with-sodium/--with-gmpwhenpkg-configfinds the library, on Linux and macOS. The flags take no DIR, because PHP < 8.4 then looks forDIR/include/gmp.h, which Debian's multiarch layout lacks. A sodium or gmp flag inPHP_CONFIGURE_OPTIONStakes precedence.CI installs both libraries and checks with
php --rithat openssl, curl, sodium and gmp are loaded.The README's Linux dependencies add libsodium-dev, libgmp-dev and libbz2-dev. php-build configures
--with-bz2by default and fails without it.Tested on Debian 12: asdf install php 8.2.34 loads all four extensions, and a Laravel app's composer install and test suite run on it. make lint, make fmt-check and bats (6 new tests) pass.
Not tested on macOS.