This module is meant to ease the install of the Gnu Scientific Library (GSL). It also provides version checking and build flags via the gsl-config utility.
Unfortunately Math::GSL cannot use a static libgsl.a, see https://github.com/leto/math--gsl/issues/225 and this bug report. This is because Math::GSL is building more than one XS module, and each module depends on libgsl.a and libgsl.a maintains static variables. These static variables will get duplicated when linking statically with libgsl.a and cause undefined behavior when the XS modules are combined in a Perl script.
I think this is only a problem for Math::GSL so I wonder if we should provide an option to Alien::GSL to build a shared library (libgsl.so) when doing a shared install? For example something like: use Alien::GSL qw(:shared) would force building a shared library?
Unfortunately Math::GSL cannot use a static
libgsl.a
, see https://github.com/leto/math--gsl/issues/225 and this bug report. This is becauseMath::GSL
is building more than one XS module, and each module depends onlibgsl.a
andlibgsl.a
maintains static variables. These static variables will get duplicated when linking statically withlibgsl.a
and cause undefined behavior when the XS modules are combined in a Perl script.I think this is only a problem for
Math::GSL
so I wonder if we should provide an option toAlien::GSL
to build a shared library (libgsl.so
) when doing a shared install? For example something like:use Alien::GSL qw(:shared)
would force building a shared library?What do you think?