Build of perl-Math-Pari-2.010809-5.fc27 failed with Perl 5.26 on architectures i686 and armv7hl. PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/000_load-problem.t ...... ok Binary number > 0b11111111111111111111111111111111 non-portable at (eval 3) line 6. Binary number > 0b11111111111111111111111111111111 non-portable at (eval 3) line 7. Binary number > 0b11111111111111111111111111111111 non-portable at (eval 3) line 11. Hexadecimal number > 0xffffffff non-portable at (eval 3) line 12. Binary number > 0b11111111111111111111111111111111 non-portable at (eval 3) line 13. t/00_Pari.t ............... Failed 1/559 subtests <...> t/55_program.t ............ Failed 1/37 subtests t/55_qfbsolve.t ........... skipped: no tests found in `/usr/share/libpari23/src/test/32/qfbsolve' t/55_rfrac.t .............. skipped: no tests found in `/usr/share/libpari23/src/test/32/rfrac' t/55_round4.t ............. skipped: no tests found in `/usr/share/libpari23/src/test/32/round4' t/55_stark.t .............. skipped: no tests found in `/usr/share/libpari23/src/test/32/stark' t/55_sumiter.t ............ ok t/55_trans.t .............. ok t/PlotRect.t .............. skipped: per MP_NOGNUPLOT t/zz_leak.t ............... ok Test Summary Report ------------------- t/00_Pari.t (Wstat: 0 Tests: 559 Failed: 1) Failed test: 12 t/55_program.t (Wstat: 0 Tests: 37 Failed: 1) Failed test: 3 Note: It is probably related to fix BZ#1268828 (32 bit platforms uses 64 bit ints)
The failing subtest in t/00_Pari.t is subtest number 12: $ perl -Iblib/{lib,arch} t/00_Pari.t |less 1..559 ok 1 ok 2 ok 3 ok 4 ok 5 ok 6 ok 7 ok 8 ok 9 ok 10 ok 11 not ok 12 ok 13 [...] The test does: use Math::Pari; $add = Math::Pari::loadPari("gadd"); test($add); # 8 test("$add" =~ /^CODE/); # 9 $b= &$add (34,67); test($b); # 10 test(ref $b eq "Math::Pari"); # 11 test(Math::Pari::pari2iv($b)==101); # 12 The failure is the Math::Pari::pari2iv($b) value becomes 33554840 on i686. The $b object is bless( do{\(my $o = 3067660500)}, 'Math::Pari' );
This code: use Math::Pari; #$b= Math::Pari::gadd (1,1); $b= Math::Pari::gadd (1,1); print "$b\n"; my $r = Math::Pari::pari2iv($b); print "$r\n"; prints: 2 9 If you uncomment the first assignment form gadd() call to $b, it will print correctly: 2 2 Assigning to different variable does not help. Replacing the first assignment with: $b=PARI 3.14; also helps.
I rebuilt libpari23 without GMP (which is the same way upstream Math::Pari would build it when bundling it) and that has resolved the problem.