in reply to Re^2: Math::GSL installation on Windows XP
in thread Math::GSL installation on Windows XP

Hey, I could still use some help on acquiring the dll's for GSL. Anyone who can help me with this?

  • Comment on Re^3: Math::GSL installation on Windows XP

Replies are listed 'Best First'.
Re^4: Math::GSL installation on Windows XP
by syphilis (Archbishop) on Nov 20, 2010 at 06:13 UTC
    Sorry - missed the earlier post.
    For a short time only you can grab the 32-bit gsl-0.14 library (libs, headers, dll's and docs) for Win32 here. (Built using MinGW.)

    If you unpack it to anywhere other than C:/_32/gsl_dyn you'll have to edit the paths accordingly in lib/pkgconfig/gsl.pc (which is a trivial task).
    MD5: ea5f96e769f17e66527aee293579c8de SHA1: cabef95aef3098d8197d0c0e84e5183092e55ebe SHA256: 163faf867119f7678e7554e70c689336ddd4cb23753aed67b8063467533b40 +31
    (Can also provide a 64-bit MinGW64 build, but that hasn't been uploaded yet - and won't be unless someone requests it.)

    Cheers,
    Rob

    UPDATE: You might need to create copies of lib/libgsl.dll.a and lib/libgslcblas.dll.a (in the same folder) named libgsl.a and libgslcblas.a ... I think that should be unnecessary as Math::GSL uses ExtUtils::PkgConfig, but worth bearing in mind just in case you have trouble with the linking during the Math::GSL build.

      Your advice helped me to install the Math::GSL 0.22, but I found that in order to use the math functions that I need for Math::GSL 0.22, I have to use gsl v 1.13, which I haven't installed yet. I tried using cgywin to build the gsl v1.13 sourcecode, but it seems to have trouble with my gcc compiler.

      The config.log file says the following:

      configure:3388: $? = 0 configure:3377: gcc -v >&5 Reading specs from C:/Perl/site/lib/auto/MinGW/bin/../lib/gcc/mingw32/ +3.4.5/specs Configured with: ../gcc-3.4.5-20060117-3/configure --with-gcc --with-g +nu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw - +-enable-threads --disable-nls --enable-languages=c,c++,f77,ada,objc,j +ava --disable-win32-registry --disable-shared --enable-sjlj-exception +s --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boe +hm --disable-libgcj-debug --enable-interpreter --enable-hash-synchron +ization --enable-libstdcxx-debug Thread model: win32 gcc version 3.4.5 (mingw-vista special r3) configure:3388: $? = 0 configure:3377: gcc -V >&5 gcc.exe: `-V' option must have argument configure:3388: $? = 1 configure:3377: gcc -qversion >&5 gcc.exe: unrecognized option `-qversion' gcc.exe: no input files configure:3388: $? = 1 configure:3410: checking for C compiler default output file name configure:3432: gcc conftest.c >&5 cc1.exe: ROOTDIR/gsl_nan.h: not a directory configure:3436: $? = 1 configure:3473: result: configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "gsl" | #define PACKAGE_TARNAME "gsl" | #define PACKAGE_VERSION "1.13" | #define PACKAGE_STRING "gsl 1.13" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define PACKAGE "gsl" | #define VERSION "1.13" | #define RELEASED /**/ | /* end confdefs.h. */ | #include <stdio.h> | int | main () | { | FILE *f = fopen ("conftest.out", "w"); | return ferror (f) || fclose (f) != 0; | | ; | return 0; | } configure:3479: error: in `/cygdrive/ROOTDIR/gsl-1.13': configure:3483: error: C compiler cannot create executables See `config.log' for more details.

      Any suggestions?

        The current version is 1.14 - best to grab it.

        With Cygwin, I think you'll need to use *their* gcc compiler, and then cross-compile for Windows (otherwise you'll end up with a gsl library that can be used only with Cygwin). I think the error you see is because you're using MinGW's gcc with Cygwin - the config.log would probably contain a diagnostic that pinpoints the specific problem.

        I use the msys shell with MinGW, but if you want to build using Cygwin, try:

        ./configure --disable-static --enable-shared --host=i686-pc-mingw32 --build=i686-pc-cygwin CXX="g++ -mno-cygwin" CC="gcc -mno-cygwin" host_alias=i686-pc-mingw32 --prefix=/cygdrive/c/wherever && make && make install

        and that should build it for native Win32.
        Because it's a cross-compilation, I don't think there's any way of running 'make check'. Also, I think there might be some redundancy in the configure options I've provided - but that incantation has worked fine for me on the occasions that I've tried it. (Haven't tried it with gsl, but.)
        See how that goes. (/msg me when you reply, otherwise I might miss it.)

        Btw, I have now built Math::GSL-0.22 ppm packages - which you can install with:

        (Update: The following command has been corrected ... was originally incorrect.)
        ppm install http://www.sisyphusion.tk/ppm/Math-GSL.ppd

        That should also install the gsl dll that's needed (via a post-install script that should launch automatically as part of the 'ppm install' process).

        Cheers,
        Rob

        Update: I'm a bit out of date with Cygwin. On my Cygwin-1.7.7, I need to install gcc-3.4.4 (via Cygwin's setup.exe) and run:

        ./configure --disable-static --enable-shared --host=i686-pc-mingw32 --build=i686-pc-cygwin CXX="g++-3 -mno-cygwin" CC="gcc-3 -mno-cygwin" host_alias=i686-pc-mingw32 --prefix=/cygdrive/c/wherever && make && make install

        This is actually being run as I write ... (update: and ran fine).
        My Cygwin-1.7.7 uses gcc-4.3.4 by default, which doesn't accommodate cross-compilation.

        With Cygwin-1.5.x (which already uses gcc-3.x.x), the original incantation should work fine.