Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Fun (pain) installing Math::Pari on cygwin.

by anneli (Pilgrim)
on Oct 05, 2011 at 04:56 UTC ( #929705=perlquestion: print w/ replies, xml ) Need Help??
anneli has asked for the wisdom of the Perl Monks concerning the following question:

Venerable monks,

I'm trying to get Net::SSH::Perl up to do some nifty stuff, which depends (transitively!) on Math::Pari. Unfortunately, I'm having more fun getting Pari installed than I'd necessarily like. This is probably because my perl's in Cygwin on Windows 7, and further, my Windows installation is 64-bit (but Cygwin's 32).

For those curious, the build ends in this way:

gcc-4 -c -I .././pari-2.1.7/src -I .././pari-2.1.7/src/headers -I ../ +./pari-2.1.7/src/graph -I . -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ +-g3 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include + -DUSEIMPORTLIB -O3 -DVERSION=\"\" -DXS_VERSION=\"\" -Derr=pari_er +r -DASMINLINE -DGCC_INLINE -DDYNAMIC_PLOTTING -o compat.o .././pari-2 +.1.7/src/language/compat.c gcc-4 -c -I .././pari-2.1.7/src -I .././pari-2.1.7/src/headers -I ../ +./pari-2.1.7/src/graph -I . -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ +-g3 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include + -DUSEIMPORTLIB -O3 -DVERSION=\"\" -DXS_VERSION=\"\" -Derr=pari_er +r -DASMINLINE -DGCC_INLINE -DDYNAMIC_PLOTTING -o base3.o .././pari-2. +1.7/src/basemath/base3.c gcc-4 -c -I .././pari-2.1.7/src -I .././pari-2.1.7/src/headers -I ../ +./pari-2.1.7/src/graph -I . -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ +-g3 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include + -DUSEIMPORTLIB -O3 -DVERSION=\"\" -DXS_VERSION=\"\" -Derr=pari_er +r -DASMINLINE -DGCC_INLINE -DDYNAMIC_PLOTTING -o mp.o .././pari-2.1.7 +/src/kernel/none/mp.c {standard input}: Assembler messages: {standard input}:32982: Error: operand type mismatch for `div' make[1]: *** [mp.o] Error 1 make[1]: Leaving directory `/home/arlen/.cpan/build/Math-Pari-2.010806 +05-VlhOm9/libPARI' make: *** [libPARI/libPARI.a] Error 2

The operand type mismatch is what makes me think this might be a 32/64-bit thing. The same result happens regardless of whether I invoke cpanm Math::Pari, cpan -i Math::Pari, or enter ~/.cpan/build/Math-Pari-... and perl Makefile.PL; make thence.

Math::Pari's INSTALL mentions some assembly detection magic, but states that it'll default to machine=none, which is meant to use portable C. That does seem to be the case here (and I tried forcing it in the last example, to the same effect).

I'm going to give this a go with ActivePerl now (maybe a native solution will be better? I'm not sure! The package manager seems to lack Net::SSH::Perl, but I don't really know what I'm doing with this thing (ActivePerl) now that I've installed it), but I'm not hopeful. If any monks have any advice, I'd be most appreciative.

Anne

brief update: found a repository for ActivePerl that included Math::Pari, having fun seeing how far I can kick it!

Comment on Fun (pain) installing Math::Pari on cygwin.
Select or Download Code
Re: Fun (pain) installing Math::Pari on cygwin.
by syphilis (Canon) on Oct 05, 2011 at 06:34 UTC
    The presence of -DASMINLINE and Assembler messages make me think that it's very unlikely that a generic C build is being attempted.

    IIRC, the way to get that C build is to start with perl Makefile.PL machine=none so give that a try - but make sure you run make realclean first.

    found a repository for ActivePerl that included Math::Pari, having fun seeing how far I can kick it!

    Math::Pari that's built for ActivePerl won't work at all with Cygwin's perl.

    BTW, there are better options for SSH than Net::SSH::Perl - eg I think Net::OpenSSH should be fine on Cygwin, or there's also Net::SSH2.

    Cheers,
    Rob

      You raise some very good points: I completely failed to run make realclean (or indeed, make steps to find out that I'd need to do that!)

      Math::Pari that's built for ActivePerl won't work at all with Cygwin's perl.

      Indeed: I was going to just switch to using ActivePerl entirely, if it was going to get things working and otherwise function identically; this is for a few small scripts at work, so I'm not too fussed about the environment (yet), though keeping things in Cygwin is preferable for homogeneity's sake.

      Using Net::OpenSSH or Net::SSH2 sounds like a much better idea! I had only scratched the surface of the SSH modules, it seems. :)

      Thanks!

      Anne

        I was going to just switch to using ActivePerl entirely, if it was going to get things working and otherwise function identically

        Fair enough ... if you do switch to ActivePerl, be aware that although Net::OpenSSH should be fine on Cygwin, it's a no-go on native Windows perls such as ActivePerl. However, Net::SSH2 is fine on ActivePerl.
        If your current list of ppm repos doesn't have a ppm package for Net::SSH2:
        ppm repo add sisyphusion ppm install Net-SSH2
        Cheers,
        Rob
Re: Fun (pain) installing Math::Pari on cygwin.
by MrCricket (Initiate) on Oct 06, 2011 at 20:12 UTC
    Try to configure it with machine=hppa, worked for me (W7pro_64 + cygwin 1.7.9 + Math-Pari-2.01080605.tar.gz):
    perl Makefile.PL machine=hppa make make test make install

      Thanks! I'll be sure to try this configuration if I end up depending on Pari another way!

      Anne :)

      This worked flawlessly on 2008R2.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (13)
As of 2014-08-27 18:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (248 votes), past polls