Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alien::GSL does not work out of the box: Can't exec "gsl-config": No such file or directory at Build.PL line 296 #212

Open
hakonhagland opened this issue Jun 14, 2020 · 1 comment

Comments

@hakonhagland
Copy link
Contributor

I tried to install Math::GSL from a docker container with no preinstalled libgsl.so, and I got the following error:

$ cpanm -v Math::GSL
[...] 
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/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/local/lib/x86_64-linux-gnu/pkgconfig /usr/local/lib/pkgconfig /usr/local/share/pkgconfig /usr/lib/x86_64-linux-gnu/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

Before this output happend, cpanm had already installed Alien::GSL which installed libgsl.so to (I was using perlbrew):

/home/hakond/perl5/perlbrew/perls/perl-5.30.0/lib/site_perl/5.30.0/auto/share/dist/Alien-GSL/lib/

shouldn't that be enough for Build.PL to find gsl-config at

/home/hakond/perl5/perlbrew/perls/perl-5.30.0/lib/site_perl/5.30.0/auto/share/dist/Alien-GSL/bin/

??
I can fix the problem manually by setting PKG_CONFIG_PATH explicitly:

PKG_CONFIG_PATH=/home/hakond/perl5/perlbrew/perls/perl-5.30.0/lib/site_perl/5.30.0/auto/share/dist/Alien-GSL/lib/pkgconfig cpanm Math::GSL

but I think the user should not have to figure this out by himself. Instead he should only have to type the usual command cpanm Math::GSL in it will just work. Any ideas?

@leto
Copy link
Owner

leto commented Jun 14, 2020

@hakonhagland Alien::GSL has not been tested extensively, any improvements you have for it are much appreciated

hakonhagland added a commit to hakonhagland/math--gsl that referenced this issue Jun 14, 2020
Solves issue leto#212. Adds the bin dir in the sharedir of Alien::GSL to PATH if the user has
not installed libgsl.so on their system.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants