Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Crypt::Random not working

by BMaximus (Chaplain)
on Jul 15, 2003 at 19:13 UTC ( [id://274531]=perlquestion: print w/replies, xml ) Need Help??

BMaximus has asked for the wisdom of the Perl Monks concerning the following question:

Has anyone run into this problem before with Crypt::Random and RedHat 9.0? I compiled in Math::Pari and the test came out fine but when I tested Crypt::Random I got garbage.
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/generator..........ok t/makerandom_itv.....Unable to load module Crypt::Random::Provider::de +vurandom - at /root/.cpan/build/Crypt-Random-1.13/blib/lib/Crypt/Ran +dom.pm line 46. t/makerandom_itv.....dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-5 Failed 5/5 tests, 0.00% okay t/octet_string.......Can't call method "get_data" on an undefined valu +e at /root/.cpan/build/Crypt-Random-1.13/blib/lib/Crypt/Random.pm lin +e 91. t/octet_string.......dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED test 1 Failed 1/1 tests, 0.00% okay t/pari_misfeature....Unable to load module Crypt::Random::Provider::de +vurandom - at lib/Crypt/Random.pm line 46. t/pari_misfeature....dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED test 1 Failed 1/1 tests, 0.00% okay t/random.............Unable to load module Crypt::Random::Provider::de +vurandom - at lib/Crypt/Random.pm line 46. t/random.............dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED test 1 Failed 1/1 tests, 0.00% okay Failed Test Stat Wstat Total Fail Failed List of Failed ---------------------------------------------------------------------- +--------- t/makerandom_itv.t 255 65280 5 5 100.00% 1-5 t/octet_string.t 255 65280 1 1 100.00% 1 t/pari_misfeature.t 255 65280 1 1 100.00% 1 t/random.t 255 65280 1 1 100.00% 1 Failed 4/5 test scripts, 20.00% okay. 8/26 subtests failed, 69.23% oka +y. make: *** [test_dynamic] Error 2

Anyone have an idea as to why its blowing up like this? I installed it anyways and its not working in a small key making script I made a long time ago. I still get the devurandom load error. I even checked the module to see if any syntax errors were in it and I didn't find any. I know it works for perl 5.8.0 because I had it on the last install I did and it worked fine.

BMaximus

Replies are listed 'Best First'.
Re: Crypt::Random not working
by sgifford (Prior) on Jul 15, 2003 at 20:25 UTC
    I've never had trouble with Crypt::Random, but the error you're getting looks like it's having trouble with /dev/urandom. Does your system have this file? What does:
    $ dd if=/dev/urandom bs=1 count=10 |od
    
    do from the shell?
      dd if=/dev/urandom bs=1 count=10 |od reports:

      10+0 records in
      10+0 records out
      0000000 115022 065433 122536 034006 016522
      0000012


      Is this what it supposed to do when given this shell command?

      BMaximus
        Yup. What I would do for my next step would be to use strace or perl -D to figure out what's going on, or else email the developers of Crypt::Random.
Re: Crypt::Random not working
by PodMaster (Abbot) on Jul 16, 2003 at 09:33 UTC
    What you've shown is insufficient for debugging, please provide everything from perl Makefile.PL up until make test, including perl -V. What does perl -Mblib -MCrypt::Random::Provider::devurandom -e 1 report.

    update: http://www.xray.mpe.mpg.de/mailing-lists/cpan-testers/2003-05/msg02287.html

    The tests are OK when calling with LANG=C. The system default here is
    en_US.UTF-8.
    
    Regards,
        Slaven
    
    

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      I fixed the problem. What was happening was that Math::Pari was using the pari library I (in stupidity) installed and subsequently loaded. It was causing a conflict and Crypt::Random got confused as a result since it didn't know which library to use. I removed the installed pari lib and all went well.

      BMaximus

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://274531]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-25 21:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found