Math::GMP tests and Crypt::Random fail on Compaq (Math::Pari related ??)

Math::GMP tests and Crypt::Random fail on Compaq (Math::Pari related ??)

Post by jussi_mono » Wed, 17 Dec 2003 19:50:17


i,

I've been compiling Math::GMP for different OS's in order to use
Net::SFTP and I have successfully compiled and used it for Solaris,
HP-UX.11 and Linux, but I'm running into trouble on Compaq (Tru5.1b).

GMP library compiled without trouble and all tests were passed. I'm
trying to make a dynamic and only OS dependant version of Math::GMP
(and of Net::SFTP) and thus GMP was configured as follows: (hardware
model from config.guess)

./configure --prefix=$(INSTALL_DIR)/GMP --disable-static
--build=alphaev6-dec-osf5.1 --host=none-unknown-osf5.1

Now the next step was to compile Math::GMP and here are the failed
test results:

PERL_DL_NONLAZY=1 /vobs/prod/tools/perl/OSF1alpha.NG/bin/perl
"-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib',
'blib/arch')" t/*.t
t/gmppm....ok 149/349# Test 277 got: '9999999999' (t/gmppm.t at line
117 fail #277)
# Expected: '1410065407'
# Test 278 got: '99999999999' (t/gmppm.t at line 117 fail #278)
# Expected: '1215752191'
# Test 279 got: '999999999999' (t/gmppm.t at line 117 fail #279)
# Expected: '3567587327'
# Test 284 got: '9999999999' (t/gmppm.t at line 117 fail #284)
# Expected: '1410065407'
t/gmppm....FAILED tests 277-279, 284
Failed 4/349 tests, 98.85% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/gmppm.t 349 4 1.15% 277-279 284
Failed 1/1 test scripts, 0.00% okay. 4/349 subtests failed, 98.85%
okay.
gmake[1]: *** [test_dynamic] Error 2

I am out of ideas what to try next.

I tried to ignore this and continued to compile my Net::SFTP but ran
into problems with Crypt::Random. The Crypt::Random tests fail due to
invalid arguments passed to divll.


PERL_DL_NONLAZY=1 /vobs/prod/tools/perl/OSF1alpha.NG/bin/perl
"-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib',
'blib/arch')" t/*.t
t/generator..........ok
t/makerandom_itv.....ok 4/5PARI: *** Invalid arguments to divll.
at /vobs/prod/AMD/ftpcopy/build/OSF1/Crypt-Random-1.13/blib/lib/Crypt/Random.pm
line 72.
t/makerandom_itv.....dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED test 5
Failed 1/5 tests, 80.00% okay
t/octet_string.......ok
t/pari_misfeature....PARI: *** Invalid arguments to divll. at
lib/Crypt/Random.pm line 72.
t/pari_misfeature....dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
t/random.............ok
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/makerandom_itv.t 255 65280 5 1 20.00% 5
t/pari_misfeature.t 255 65280 1 1 100.00% 1
Failed 2/5 test scripts, 60.00% okay. 2/26 subtests failed, 92.31%
okay.
gmake[1]: *** [test_dynamic] Error 2
gmake[1]: Leaving directory
`/vobs/prod/AMD/ftpcopy/build/OSF1/Crypt-Random-1.13'

Can anyone say whether this problem is related to the Math::Pari ie.
is Crypt::Random using Math::Pari incorrectly or what? Also
Crypt::Random tests take forever (1/2-2 hours) to execute. I haven't
experienced this kind of slowness on any other platform.

I'm using Perl 5.8.0 and it says:

Summary of my perl5 (revision 5.0 version 8 subversion 0)
configuration:
Platform:
osname=dec_osf, osvers=5.1, archname=OSF1alpha-dec_osf
uname='osf1 sinika
 
 
 

Math::GMP tests and Crypt::Random fail on Compaq (Math::Pari related ??)

Post by Sisyphu » Thu, 18 Dec 2003 14:02:51


The GMP documentation suggests that those tests will fail if your
'unsigned long' and 'signed long' are not 32 bits. Your 'perl -V' (which
you thoughtfully provided) would suggest that your 'unsigned long' and
'signed long' are 64 bits. That being the case, the tests have returned
the values that are to be expected - ie they have passed, not failed.

The functions that reported a failure are 'uintify_gmp' and
'intify_gmp'. If you want to know what these functions do, go to:

http://www.yqcomputer.com/ #Converting%20Integers

and read the documentation on 'mpz_get_ui()' and 'mpz_get_si()'.
('uintify_gmp' is simply the perl interface to the former, and
'intify_gmp' the perl interface to the latter.)

As for the rest, I can't really help - though I'd be wondering how those
other modules also cope with 64 bit ints.

Cheers,
Rob


--
To reply by email u have to take out the u in kalinaubears.

 
 
 

Math::GMP tests and Crypt::Random fail on Compaq (Math::Pari related ??)

Post by Sisyphu » Thu, 18 Dec 2003 14:11:42


That's possibly a bit misleading. Just to make sure I'm being clear, the
tests *haven't* failed. A failure is being reported because the
"expected values" that the Math::GMP author provided are incorrect in
your case. (He assumed the tests were going to be conducted on a 32 bit
machine.)

Cheers,
Rob

--
To reply by email u have to take out the u in kalinaubears.
 
 
 

Math::GMP tests and Crypt::Random fail on Compaq (Math::Pari related ??)

Post by jussi_mono » Fri, 19 Dec 2003 18:08:14


So basicly everything _should_ be okay? The results returned from
Math::GMP are _correct_ and can not cause errors in future use?

Can this be considered as a bug in the Math::GMP test suite? I'd hate
to install this and later on find out that it does not work correctly.

anyway, thanks for the information :-)

/jUSSi

ps. just for the record, this module is a prerequisite for Net::SSH
and thus for Net::SFTP which is my actual target. I don't know the
extent of GMP library usage so with a bit of luck this could be
ignored.
 
 
 

Math::GMP tests and Crypt::Random fail on Compaq (Math::Pari related ??)

Post by Sisyphu » Sat, 20 Dec 2003 16:09:50


Sure can.
For these tests you really need to know whether it's 32 or 64 bit
architecture before you can work out what the expected return value is.
(The author has simply assumed that it's 32 bit architecture.)


Wouldn't be hard to find out which Math::GMP functions are used. Just
look for any imported functions when the module is loaded in these other
modules - also search them for the string 'Math::GMP::'.
However, at this stage I haven't seen anything which suggests to me that
you're going to strike trouble with *any* of the Math::GMP functions.

Cheers,
Rob


--
To reply by email u have to take out the u in kalinaubears.