Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Perl 5.10 and Math::Pari

by hubb0r (Pilgrim)
on Jan 22, 2008 at 22:05 UTC ( #663706=perlquestion: print w/replies, xml ) Need Help??
hubb0r has asked for the wisdom of the Perl Monks concerning the following question:

Esteemed Monks,

I have just started testing Perl 5.10, which looks to have some really nice features that I'd love to start implementing code with. Unfortunately, there are some key modules that have no way of installing due to changes in the XS layers from 5.8.x -> 5.10. Math::Pari no longer can install, which leads to many of the crypto libraries having unmet dependencies and also being unable to install.

What is more distressing is that these incompatibilities have been known since late 2006! The exact error has been happening since blead perl 5.9.4 came out. ( and Developers have offered suggestions of how to repair the issue, sort of. Nothing however has been done to either modify the perl core or the module itself to make things work again.

Is there any hope of getting this module working? I don't have the c skills necessary to start playing with the Math::Pari XS code to make that go, nor to start playing with the Perl source. This is really frustrating....

Does anyone have any suggestions? Are there alternatives to the Math::Pari module that can be dropped in to replace it from the perspective of the other Crypt modules? I've found no workaround so far.

UPDATE: Just wanted to mention a few other crypt modules which depend on Math::Pari -

  1. Crypt::DSA
  2. Crypt::PGP
  3. Crypt::Primes
  4. Crypt::RSA
  5. Crypt::Random
  6. Module::Signature

Replies are listed 'Best First'.
Re: Perl 5.10 and Math::Pari
by Khen1950fx (Canon) on Jan 23, 2008 at 01:20 UTC
    I've been trying to install Math::Pari for the last 2 hours. It finally installed when I used:

    perl Makefile.PL machine=none
    make install

      I'm curious, does it actually work correctly?
Re: Perl 5.10 and Math::Pari
by syphilis (Chancellor) on Jan 23, 2008 at 01:29 UTC
    Are there alternatives to the Math::Pari module that can be dropped in to replace it from the perspective of the other Crypt modules?

    If there are alternatives then they should be mentioned in the documentation of the modules.

    Precisely which modules are these "other Crypt modules" ?

      I've updated the main post to reflect a few of the modules with a Math::Pari dependency.
        Couldn't spot any evidence that Crypt::DSA needs Math::Pari. But it certainly looks like the others that you've specified do.

Re: Perl 5.10 and Math::Pari
by dcd (Scribe) on Jan 24, 2008 at 00:07 UTC
    Did you also see this post from Nicholas Clark. I don't recall if I followed up with his suggestion there. I do know that I'm still interested in the solution, but have been sidetracked for a while. It is nice to see the subject raised again.

      I did what Nickolas suggested. It compiled fine, but failed horribly at runtime with error messages that don't seem to be related to the fix I made. I also tried another way using PERL_MAGIC_ext, but it resulted in the same issues.

      So I guess Math::Pari is relying on more <=5.8 behaviour that has changed in 5.10. I wasn't able to figure out what exactly that is though.

        I've tried it with the following patch:
        1153c1153 < ((CV*)cv)->sv_any->xiv_u.xivu_iv = numargs; /* XXXX Nasty of +us... */ --- > ((CV*)cv)->sv_any->xof_off = numargs; /* XXXX Nasty of us... +*/ 1219c1219 < int numargs = ((CV*)cv)->sv_any->xiv_u.xivu_iv; /* XXXX Nasty + of us... */ --- > int numargs = ((CV*)cv)->sv_any->xof_off; /* XXXX Nasty of us +... */
        It seems to work but increases the 'Nasty' level
      Yes, I saw that one. Unfortunately I have no idea about what to do regarding his suggestion. The c code in the Perl guts is beyond my abilities, though I did look in the source at the code he mentioned.
Re: Perl 5.10 and Math::Pari
by falan95054 (Novice) on Oct 11, 2010 at 20:29 UTC
    Does anyone know where Math::Pari stands? I'm trying to use perl 5.8.9 with Net::SSH::Perl which requires Crypt::RSA which requires Math::Pari. It generally works if you don't use threads. When you do it segfaults in XS_Math__Pari_DESTROY.
      To not answer your question:
      Net::OpenSSH and Net::SSH2 are generally considered to be better options than Net::SSH::Perl (which is not being actively maintained, and has problems).

        A better fit for code written to Net::SSH::Perl is Net::SSH2::Simple. This is mostly working for me, however, I have an indefinite loop on processing output under threads while (!$chan->eof()).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://663706]
Approved by kyle
Front-paged by Old_Gray_Bear
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2018-06-22 06:03 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (121 votes). Check out past polls.