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

[github version] Some test failures on Android (32-bit) #63

Open
trizen opened this issue Mar 23, 2022 · 2 comments
Open

[github version] Some test failures on Android (32-bit) #63

trizen opened this issue Mar 23, 2022 · 2 comments

Comments

@trizen
Copy link
Contributor

trizen commented Mar 23, 2022

Hi. I tested the latest GitHub commit of Math::Prime::Util on a 32-bit Android phone, using the Termux environment and the clang compiler.

Unfortunately, some tests failed:

1-almost-primes

2-semiprime

3-chinese

4-lucky

Here are the versions of the dependencies:

0-versions

Perl version is 5.34.1:

perl_version

The library can be installed, by ignoring the tests, but some functions will produce incorrect results:

perfect-power-count

Steps to reproduce the issue:

  1. get a 32-bit Android phone
  2. install Termux from F-Droid
  3. run the following commands:
pkg up
pkg install perl make clang libgmp curl
cpan App::cpanminus
cpanm -v https://github.com/danaj/Math-Prime-Util-GMP/archive/refs/heads/master.zip
cpanm -v https://github.com/danaj/Math-Prime-Util/archive/refs/heads/master.zip

Alternative commands, using git instead of cpanm (and also without installing Math::Prime::Util::GMP):

pkg up
pkg install perl make clang git
git clone --depth=1 https://github.com/danaj/Math-Prime-Util
cd Math-Prime-Util
perl Makefile.PL
make test
@sisyphus
Copy link

sisyphus commented Apr 3, 2022

FWIW I see the same failures on 32-bit perl-5.34.0 (ivsize == 4) built using mingw-w64 port of gcc-10.2.0.
However, all tests pass for the same version of 32-bit perl, built using the same toolchain on the same machine, but having ivsize == 8.

Apparently, there's something in the github version that's not allowing for the possibility that ivsize is 4.
(Maybe it's in the test scripts themselves ? ... I haven't investigated.)

Cheers,
Rob

@danaj
Copy link
Owner

danaj commented Apr 3, 2022

Thank you very much for the report, and also big thanks for the confirmation on 32-bit perl with ivsize == 4. Definitely something to fix!

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

No branches or pull requests

3 participants