Ask a Question related to PERL Modules, Design and Development.
-
Jussi Mononen #1
Math::GMP tests and Crypt::Random fail on Compaq (Math::Pari related ??)
Hi,
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 v5.1 732 alpha '
config_args='-Dcc=cc -Dprefix=/vobs/prod/tools/perl/OSF1alpha'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=define uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-std -D_INTRINSICS -fprm d -ieee
-I/usr/local/include -DLANGUAGE_C',
optimize='-O4',
cppflags='-std -D_INTRINSICS -ieee -I/usr/local/include
-DLANGUAGE_C'
ccversion='V6.3-029', gccversion='', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='ld', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc
/usr/lib /var/shlib
libs=-lpthread -ldbm -ldb -lm -lutil
perllibs=-lpthread -lm -lutil
libc=/usr/shlib/libc.so, so=so, useshrplib=true,
libperl=libperl.so
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='
-Wl,-rpath,/vobs/prod/tools/perl/OSF1alpha/lib/5.8.0/OSF1alpha-dec_osf/CORE'
cccdlflags=' ', lddlflags='-shared -expect_unresolved "*" -O4
-msym -std -s -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: USE_64_BIT_INT USE_64_BIT_ALL USE_LARGE_FILES
Built under dec_osf
Compiled at Oct 15 2002 10:03:55
%ENV:
PERL5LIB="/vobs/prod/AMD/ftpcopy/lib/OSF1/lib:/vobs/prod/AMD/ftpcopy/lib/OSF1/lib/site_perl:/vobs/prod/AMD/ftpcopy/lib/OSF1/lib/site_perl/5.8.0/OSF1"
@INC:
/vobs/prod/AMD/ftpcopy/lib/OSF1/lib/5.8.0/OSF1alpha-dec_osf
/vobs/prod/AMD/ftpcopy/lib/OSF1/lib/5.8.0
/vobs/prod/AMD/ftpcopy/lib/OSF1/lib
/vobs/prod/AMD/ftpcopy/lib/OSF1/lib/site_perl/5.8.0/OSF1alpha-dec_osf
/vobs/prod/AMD/ftpcopy/lib/OSF1/lib/site_perl/5.8.0
/vobs/prod/AMD/ftpcopy/lib/OSF1/lib/site_perl
/vobs/prod/AMD/ftpcopy/lib/OSF1/lib/site_perl/5.8.0/OSF1
/vobs/prod/tools/perl/OSF1alpha/lib/5.8.0/OSF1alpha-dec_osf
/vobs/prod/tools/perl/OSF1alpha/lib/5.8.0
/vobs/prod/tools/perl/OSF1alpha/lib/site_perl/5.8.0/OSF1alpha-dec_osf
/vobs/prod/tools/perl/OSF1alpha/lib/site_perl/5.8.0
/vobs/prod/tools/perl/OSF1alpha/lib/site_perl
my platform is:
OSF1 V5.1 2650 alpha
best regards,
/jUSSi
Jussi Mononen Guest
-
Math::Pari 'factor' is wrong
#!/usr/local/bin/perl -w # use Math::PariInit qw( primes=12000000 stack=1e8 ); # use Math::Pari qw(:all); use Math::Pari 'factor'; # $i =... -
Segmentation violation in Math:Pari when used in connection with
I have developed a script to run jobs in parallel on a multi CPU machine. Therefor I use the module Thread:Pool version 0.32. After creating the... -
Math::Pari test fail on Compaq OSF1 5.1b
Hi again and sorry for the double posting, the first post was sent to comp.lang.perl by a mistake (I blame the evil M$ programs for this ;) ### ... -
Math::Pari and libsunmath.so.1 - is it really required?
Hi, first of all my apologies for not being able to help/debug the precision problem I posted recently in comp.lang.perl.modules. I just run out... -
Math::PARI tests fail on HP-UX.11 and Linux RH7.3
> Ilya Zakharevich <nospam-abuse@ilyaz.org> wrote in message news: <bnjup4$29va$1@agate.berkeley.edu>... This is what I found from my... -
Sisyphus #2
Re: Math::GMP tests and Crypt::Random fail on Compaq (Math::Parirelated ??)
Jussi Mononen wrote:
The GMP documentation suggests that those tests will fail if your>
> 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
'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:
[url]http://swox.com/gmp/manual/Converting-Integers.html#Converting%20Integers[/url]
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.
Sisyphus Guest
-
Sisyphus #3
Re: Math::GMP tests and Crypt::Random fail on Compaq (Math::Parirelated ??)
Sisyphus wrote:
That's possibly a bit misleading. Just to make sure I'm being clear, the>
>
> The GMP documentation suggests that those tests will fail if your
> 'unsigned long' and 'signed long' are not 32 bits.
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.
Sisyphus Guest
-
Jussi Mononen #4
Re: Math::GMP tests and Crypt::Random fail on Compaq (Math::Pari related ??)
> Sisyphus <kalinaubears@iinet.net.au> wrote in message news:
So basicly everything _should_ be okay? The results returned from> <3fdfe44f$0$1749$5a62ac22@freenews.iinet.net.au>.. .
>>> > 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.
> 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.)
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.
Jussi Mononen Guest
-
Sisyphus #5
Re: Math::GMP tests and Crypt::Random fail on Compaq (Math::Parirelated ??)
Jussi Mononen wrote:
Sure can.>
> Can this be considered as a bug in the Math::GMP test suite?
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>
> 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.
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.
Sisyphus Guest



Reply With Quote

