leto / math--gsl

Perl interface to the GNU Scientific Library
http://leto.net/code/Math-GSL
34 stars 25 forks source link

Installing Math::GSL on Windows 10, MSYS2 #219

Open hakonhagland opened 4 years ago

hakonhagland commented 4 years ago

I am trying to install Math::GSL on Windows 10 using MSYS2. Currently I have been able to install the GSL library using Alien::GSL, but when I run perl Build.PL for Math::GSL:

$ perl Build.PL
Checking for GSL using gsl-config
Can't exec "gsl-config": No such file or directory at Build.PL line 296.

***
*** Can't find GSL with gsl-config.
*** Trying with PkgConfig.

Asking PkgConfig with ENV{PKG_CONFIG_PATH}=/usr/lib/pkgconfig:/usr/share/pkgconfig:/lib/pkgconfig:/usr/pkgconfig:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/pkgconfig:/usr/libdata/pkgconfig:/usr/local/libdata/pkgconfig:/opt/pkgconfig

***
*** PkgConfig failed with error message: Can't find gsl.pc in any of /usr/lib/pkgconfig /usr/share/pkgconfig /lib/pkgconfig /usr/lib/pkgconfig /usr/share/pkgconfig
use the PKG_CONFIG_PATH environment variable, or
specify extra search paths via 'search_paths'

*** Probably you need to install GSL?
***  On Debian/Ubuntu you can use:
***      sudo apt-get install libgsl0-dev
***  On Mac you can use homebrew (http://brew.sh/):
***      brew install gsl
***  On Fedora/CentOS/RedHat/openSUSE you can use
***      sudo yum install gsl-devel
*** Or get GSL at http://www.gnu.org/software/gsl

I believe this is the same problem as #212 which was fixed in PR #213 (but unfortunately did not make it into version 0.42). I will test with the code in PR #213 and see if it works or what more needs to be added for it to work on MSYS2. If we get it to work we might consider releasing a new version 0.43 to CPAN ..

hakonhagland commented 4 years ago

Yes using the fix in #213 worked:

$ perl Build.PL
Checking for GSL using gsl-config
Found GSL 2.6 (via gsl-config) installed in /home/hakon/.cpanm/work/1595801186.15197/Alien-GSL-1.02/blib/lib/auto/share/dist/Alien-GSL
Checking if gcc supports "-Wall"...yes
Checking if gcc supports "-Wno-sometimes-uninitialized"...yes
Checking if gcc supports "-Wno-unused-function"...yes
Checking if gcc supports "-Wno-unused-value"...yes
Checking if gcc supports "-Wno-unused-function"...yes
Checking if gcc supports "-Wno-unused-variable"...yes
Checking if gcc supports "-Wno-gnu"...yes
Checking if gcc supports "-g"...yes
Checking prerequisites...
  build_requires:
    !  Test::Class is not installed
    !  Test::Most is not installed
    !  Test::Taint is not installed

ERRORS/WARNINGS FOUND IN PREREQUISITES.  You may wish to install the versions
of the modules indicated above before proceeding with this installation

Run 'Build installdeps' to install missing prerequisites.

Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Math-GSL' version '0.42'
Have a great day!
hakonhagland commented 4 years ago

But now I get other errors when trying to compile the C files.. I am opening a new issue for that, see #220