Skip to content
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

bump libgmp requirement to avoid bug in 6.2.0 #71

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

1ma
Copy link
Contributor

@1ma 1ma commented Nov 21, 2024

The reason I added a new lib-gmp section instead of setting a version in ext-gmp is because composer sees ext-gmp with the version of PHP you have installed, whereas lib-gmp show the actual version of libgmp installed in the system.

$ composer info -p | grep gmp
ext-gmp                8.3.14   The gmp PHP extension
lib-gmp                6.2.1    The gmp library

Sanity check. Momentarily setting lib-gmp to an unreleased version of libgmp yields this (correct) error:

$ composer install
No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires linked library lib-gmp >=6.5.0 but it has the wrong version installed or is missing from your system, make sure to load the extension providing it.

@Sebastix Sebastix merged commit 5642173 into nostrver-se:main Nov 22, 2024
@1ma 1ma deleted the gmp-bump branch November 22, 2024 10:40
@Sebastix
Copy link
Member

Sebastix commented Nov 23, 2024

phpunit tests are failing (https://github.com/nostrver-se/nostr-php/actions/runs/11969646535) and when I searched why, this was the first result: php/php-src#16870

Is this issue also related to this PR?

@Sebastix
Copy link
Member

Sebastix commented Nov 24, 2024

I will also revert the commit in the main branch and will open an issue to follow the progress / updates on this.

When I test it with PHP version 8.2.26 this error occurs (using docker image php:8.2.6-alpine)
ValueError: base and exponent overflow in /nostr-php/vendor/uma/phpecc/src/Math/GmpMath.php on line 80 and it's related to php/php-src#16870

When I test it with PHP version 8.2.25 these errors don't occur (using docker image php:8.2.5-alpine).

@1ma See phpipam/phpipam@2414f86 for a possible temporary workaround which can be applied in the phpecc package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants