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

Hi.

I'm really struggling getting Math::Pari to build in Activeperl. I've installed a C Compiler and I'm at the point where cl.exe runs OK once I have set the environment variables correctly. This is how I did it:

Free MSVC tools + Activestate to compile CPAN Modules

The only step I didn't follow was to install the SDK update because I can't get on the website at the moment. I don't think this is the problem but if anyone knows different please let me know.

Apparently Math::Pari requires the GP/PARI build directory. I don't really know what GP/PARI is, but I've installed the pari-2.1.6 directory plus the cygwin1.dll and gp-2-1-1.exe file as described in the readme file for Windows.

I've looked through quite a bit of documentation but the compilation of Math::Pari is still failing with the following error:

../../pari-2.1.6\src\gp\highlvl.c(77) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory.

This looks like a pretty fundamental problem to me, but I've no idea how to fix it. Can anyone help?

Thanks.

Edited by Chady -- linkified the URL

Replies are listed 'Best First'.
Re: Activeperl: Can't install Math::Pari
by fireartist (Chaplain) on Jan 18, 2005 at 15:44 UTC

    Do you know that Math::Pari is available ready-built for ActiveState Perl?
    Use the ActiveState / Perl Package Manager in your start menu.
    install Math::Pari

    Have you also read HowTo build and distribute a PPMed module for Win32 in Tutorials?

    (Can't give you any more help than this, having never compiled on Win32.)

      Thanks for the response. Installing Math::Pari was part of a larger problem, namely how to get Net::SFTP to compile for ActiveState.

      Net::SFTP needs Net::SSH::Perl in order to compile. ActiveState have not yet (as of 31/01/05) made this module available via ppm, so the only way to get it is to compile it manually.

      A number of the pre-reqs require a C Compiler, and despite reading all the advice I could find on this website, I couldn't get the compiler to successfully compile CPAN modules (probably more due to my skills than the advice) :)

      Eventually, I found the following link: www.soulcage.net

      The author of this site has written Net::SSH::W32Perl, a ppm module that downloads Net::SSH::Perl automatically. Once I had got this installed, Net::SFTP compiled. Problem solved. Full marks to the guy who maintains this site. I imagine it has dug quite a few Windows users out of a whole.

      My recommendation to anyone using this is to pay extra attention to the install notes. I actually had to uninstall Perl and delete the Perl directory under Program Files, reinstall Perl and download the ppm module before it would work.
        Have you added crazyinsomniac's repository to your ppm? ppm> rep add crazy http://crazyinsomniac.perlmonk.org/perl/ppm/5.8/ I believe he's open to suggestions for modules to add to it.