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

Hey,

For some strange reason, Crypt::Random isn't working on my Red Hat 7.1 box. It is using perl 5.6.0.

When Crypt::Random runs the test pari_misfeature.t, it segfaults. It also segfaults at other points.

It seems to be the way it uses Math::Pari.

I've done some google group searches, and back in Crypt::Random 0.22 days, it would cause segfaults with Math::Pari.

I'm using Crypt::Random 1.11 and Math::Pari 2.010201.

Does anybody have any suggestions?

thanks.

Replies are listed 'Best First'.
Re: Crypt::Random and Math::Pari
by Zaxo (Archbishop) on Nov 08, 2001 at 05:38 UTC

    Do you recall if Math::Pari had difficulties when tested and installed? Has ldconfig been run?

    I get:

    $ perl -MMath::Pari -e 'print $Math::Pari::VERSION,$/' 2.010201 $ # installing Crypt::Random from CPAN ... PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/lib/perl +5/5.6.0/i486-linux-thread -I/usr/lib/perl5/5.6.0 -e 'use Test::Harnes +s qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t t/generator.........ok t/makerandom_itv....ok t/octet_string......ok t/pari_misfeature...ok t/random............ok All tests successful. ... $ $ perl -MCrypt::Random -e 'print $Crypt::Random::VERSION,$/' 1.11 $
    Are you using a binary distribution of Math::Pari? You could have an ABI incompatable compiler.

    After Compline,
    Zaxo

      Math::Pari was installed via cpan. ldconfig shouldn't be an issue as it builds it's own pari.
Re: Crypt::Random and Math::Pari
by brother ab (Scribe) on Nov 08, 2001 at 12:24 UTC

    I have had such a problem with perl5.00503 on my Linux RedHat 6.0. It gone away now I use perl5.6.1. The problem is in XS_Math__Pari_DESTROY - all works right, but cleaning fails. Nevertheless, all tests for Math::Pari show ok. I wrote about it to the author of Crypt::Random but have got no reply, alas.

    Suggestions? Try to upgrade perl. For what special reasons do you need that buggy 5.6.0 version at all?

    -- brother ab
Re: Crypt::Random and Math::Pari
by mitd (Curate) on Nov 08, 2001 at 12:53 UTC
    Running RH 7.1 with distribution supplied Perl 5.6.0 removed and a fresh locally compiled 5.6.1 in its place.

    Crypt::Random install clean passing all tests.

    BTW, if you happen to be using Ximian Red Carpet leave the old perl in place just compile 5.6.1 into /usr/local and answer yes to 'do you want replace perl in /usr/bin?'. RedCarpet really wants to see perl in RPM DB.

    Good Luck!

    Update ditto for Math::Pari

    mitd-Made in the Dark
    'My favourite colour appears to be grey.'