Closed aero closed 2 years ago
With PDL::LinearAlgebra 0.26 and strawberry perl 5.28, It doesn't have the problem and started to failed from ver. 0.27.
See http://matrix.cpantesters.org/?dist=PDL-LinearAlgebra%200.26;os=mswin32;perl=5.28.2;reports=1
It seems from this that, quite reasonably, LAPACK wants all its libs as specified in the pkg-config
files. Unfortunately, Devel::CheckLib is being overly clever, but getting it wrong. In particular, I've tried the LIBS
option, but the library misparses that.
Could you try replacing these lines:
# work around Devel::CheckLib not doing Text::ParseWords::shellwords
use Text::ParseWords qw(shellwords);
my @libpath = map {my $r=$_;$r=~s/^-L//?$r:()} shellwords $libs0;
my $f77_uscore = (ExtUtils::F77->trail_ ? '_' : '');
check_lib_or_exit(
lib => 'lapack',
libpath => \@libpath,
header => [($^O =~ /MSWin/ ? 'float.h' : ()), qw(stdio.h math.h)],
with:
# work around Devel::CheckLib not doing Text::ParseWords::shellwords
use Text::ParseWords qw(shellwords);
my @libpath = map {my $r=$_;$r=~s/^-L//?$r:()} my @sw = shellwords $libs0;
my @lib = map {my $r=$_;$r=~s/^-l//?$r:()} @sw;
my $mangled_libs0 = join ' ', (map qq{-L"$_"}, @libpath), (map "-l$_", @lib);
my $f77_uscore = (ExtUtils::F77->trail_ ? '_' : '');
check_lib_or_exit(
ldflags => $mangled_libs0,
header => [($^O =~ /MSWin/ ? 'float.h' : ()), qw(stdio.h math.h)],
and seeing if that works?
This would all be easier if https://github.com/mattn/p5-Devel-CheckLib/pull/34 got merged and released.
In breaking news, that PR actually has been merged and released! However, @aero I still need to know whether the above change fixes the issue on your platform :-)
In breaking news, that PR actually has been merged and released! However, @aero I still need to know whether the above change fixes the issue on your platform :-)
Thanks. Your above work around also works well. ' ')b
Thank you for the feedback! I've released this as 0.31, but due to my misreading the CI results, it's actually broken MacOS, so there will (hopefully) soon be a 0.32 which fixes this.
Hi From reported mail....
strawberry perl 5.28 also has both lapack.pc and blas.pc blas.pc
lapack.pc
I removed "blas" but got the same error.