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

Hi, I am trying to install the Math::Gsl::histogram module so that I can do cumulative distributions.
I am using Active State perl on windows.
This is what I did.

1. From command prompt "ppm install http://theoryx5.uwinnipeg.ca/ppms/Math-Gsl.ppd"
2. It installed correctly but not sure if it downloaded the necesary DLL's correctly.
3. Copied the Math directory over to my perl /lib directory.
When I tried to run my test script with only use Math::Gsl::histogram, it gave me an error saying that it "can't locate loadable object".

Can anyone tell me whats wrong?

Also, if I wanted to create a standalone executable to include the Math::GSL::Histogram then I should be able to include the DLL's that this module seems to require with no problem right?

Replies are listed 'Best First'.
Re: How to install Math::GSL module
by syphilis (Archbishop) on Jan 25, 2009 at 23:12 UTC
    1. From command prompt "ppm install http://theoryx5.uwinnipeg.ca/ppms/Math-Gsl.ppd"

    You specified "Math-Gsl", instead of the correct "Math-GSL". (I'm not sure if that can cause problems.)

    2. It installed correctly but not sure if it downloaded the necesary DLL's correctly.

    If you accepted the defaults, then you should find libgsl-0.dll and libgslcblas-0.dll in your perl/bin folder. (Otherwise they should be found in the non-default location that you specified.) The only requirement wrt those 2 DLL's is that they be in a folder that is in your path.

    Step 3 is unnecessary and wrong (and quite possibly the cause of the problem.) To install Math::GSL via ppm, all you need do is run ppm install http://theoryx5.uwinnipeg.ca/ppms/Math-GSL.ppd and follow the prompts ... nothing more.

    it gave me an error saying that it "can't locate loadable object".

    This means that the Math::GSL module is not installed correctly - it has nothing to do with the DLL's upon which Math::GSL depends. Try installing the module again - only this time specify "Math-GSL". If ppm won't re-install it because it's already there, then first run ppm remove Math-GSL (or ppm remove Math-Gsl as the case may be). There's no need to repeat the downloading of the 2 DLL's if you already have them.

    I'm not sure what to do about that Math folder you copied over. Just leave it as is for the moment, and we'll see what eventuates.

    Cheers,
    Rob
      Thanks for the replies. Sorry, about the typo. I meant to write ppm install http://theoryx5.uwinnipeg.ca/ppms/Math-GSL.ppd.

      Also, I guess PPM was installing my perl modules in another temp directory so that was why I was moving over the files. I changed my ppm to install modules to /perl/bin from now on and removed files that I currently moved to perl/bin just to begin with a fresh install.

      Now, after I downloaded it though I can't seem to see the package in /perl/bin though it says that 99 files have been downloaded. When I open up PPM graphical interface it says that Math-GSL has been downloaded to /perl/bin.

      Can anyone tell me what I am doing wrong?
        I guess PPM was installing my perl modules in another temp directory

        PPM uses a temp directory to store files that it downloads, prior to actually installing the module. I think the location of that temp directory is configurable - in any case, it doesn't matter where that folder is located, so long as PPM is permitted to create the files in that folder.

        Afaik, the actual location into which PPM installs the modules cannot be configured - they simply go into perl/site/lib (as Anonymous Monk has already said). The only things that should be going into perl/bin are the 2 DLL's - unless, of course, you requested that they be placed elsewhere.

        What happens now when you run:
        perl -MMath::GSL::Histogram=":all" -we "gsl_histogram_alloc(100);"
        For me, that runs and terminates without producing any output at all (which is as expected).

        Cheers,
        Rob
        Modules do not go into perl/bin, they go into perl/site/lib. Sounds like you've "configured" something that didn't need any configuring, and now its broken. You can always start fresh and reinstall perl.
Re: How to install Math::GSL module
by Anonymous Monk on Jan 25, 2009 at 16:59 UTC
    Error 404 Object not found! Try with correct name,
    ppm install http://theoryx5.uwinnipeg.ca/ppms/Math-GSL.ppd
Re: How to install Math::GSL module
by zwon (Abbot) on Jan 25, 2009 at 20:14 UTC

    Do you have libgsl installed? According to information on GNU.org it's available for Windows as part of Cygwin.