Issue when installing the dependency Math::GSL

89 views
Skip to first unread message

Benoit Morel

unread,
Apr 28, 2023, 10:33:40 AM4/28/23
to SimPhy
Hello,

Several members of our lab got into the same issue on different laptop configurations when installing one of the dependencies of the perl script that runs indedible. I am posting our solution here because it seems to be a common problem on linux systems (at least for us!)

The issue occurs when installing Math::GSL with the command
sudo cpan Math::GSL::RNG

One unit test (test_alien) fails at the end of the installation and cpan aborts. 
One can force the installation despite the failing test by running sudo cpan, and then typing force install Math::GSL in the interactive console. Bypassing the test doesn't seem to affect the indelible perl script.

Some of us ran into a second issue:
"
Unsupported GSL version!!! : 2.7.1 at Build.PL line 85"
We fixed it by installing the package gsl-dev:
sudo apt install libgsl-dev
which installed GSL version 2.5 (at least when I ran it). Installing Math::GSL with cpan then works.

I hope that helps someone. If anyone has a cleaner solution, please share ;-)
Best,
Benoit

Noah Wahl

unread,
Jun 28, 2023, 4:54:20 AM6/28/23
to SimPhy
I ran into the same issue with GSL on archlinux. Downgrading GSL to 2.6 fixed the problem. To do this you need to get the old version from the package archive https://archive.archlinux.org/packages/g/gsl/gsl-2.6-2-x86_64.pkg.tar.zst and run `sudo pacman -U <path-to-pkg>` to perform the downgrade. To disable accidental updates in the future, you can also add gsl to the `IgnorePkg` list in /etc/pacman.conf. This is not a solution that is advisable to have permanently, because at some point other packages may depend on newer GSL versions, but hopefully the perl-lib will be upgraded to support GSL 2.7 soon.

Diego M.

unread,
Jun 29, 2023, 6:49:37 PM6/29/23
to SimPhy
Benoit and Noah, thank you for your contributions here!

I hope the development of Math::GSL keeps up with GSL. Otherwise, we could implement our own samplers in Perl, removing this dependency. This wrapper uses GSL to conveniently generate random numbers sampling from the following statistical distributions:  normal, lognormal, uniform, exponential, gamma, and lognormal.

Best,

Diego M. 
Reply all
Reply to author
Forward
0 new messages