jlapeyre / PDL-Fit-Levmar

PDL interface to constrained Levenberg-Marquardt library levmar
Other
3 stars 3 forks source link

Error of compiling with lapack #8

Closed YuryPakhomov closed 2 years ago

YuryPakhomov commented 2 years ago

Hello All,

if uncomment string: our $HAVE_LAPACK = 1; to use lapack and blas libraries then compiling process is stopped by error:

/usr/local/lib64/perl5/PDL/PP.pm: In function 'pdl_levmar_der_ub_A_b_readdata': /usr/local/lib64/perl5/PDL/PP.pm:1462:177: warning: passing argument 13 of 'slevmar_blec_der' makes integer from pointer without a cast [-Wint-conversion] 1462 my @pars; ^
void *
In file included from pp-levmar_der_ub_A_b.c:52: ./levmar-2.6/levmar.h:254:11: note: expected 'int' but argument is of type 'void *' 254 int itmax, float opts, float info, float work, float covar, void *adata); ~~^~~ /usr/local/lib64/perl5/PDL/PP.pm:1463:29: warning: passing argument 14 of 'slevmar_blec_der' makes pointer from integer without a cast [-Wint-conversion] 1463 my $switched_to_other_pars = 0; ^~
int
In file included from pp-levmar_der_ub_A_b.c:52: ./levmar-2.6/levmar.h:254:25: note: expected 'float *' but argument is of type 'int' 254 int itmax, float opts, float info, float work, float covar, void *adata); ~^~ /usr/local/lib64/perl5/PDL/PP.pm:1460:49: error: too many arguments to function 'slevmar_blec_der' 1460 # Everything is semicolon-delimited ^
In file included from pp-levmar_der_ub_A_b.c:52: ./levmar-2.6/levmar.h:250:12: note: declared here 250
extern int slevmar_blec_der( ^~~~ /usr/local/lib64/perl5/PDL/PP.pm:1585:177: warning: passing argument 13 of 'dlevmar_blec_der' makes integer from pointer without a cast [-Wint-conversion] 1585 Signature: ($sig) ^
void *
In file included from pp-levmar_der_ub_A_b.c:52: ./levmar-2.6/levmar.h:149:11: note: expected 'int' but argument is of type 'void *' 149 int itmax, double opts, double info, double work, double covar, void *adata); ~~^~~ /usr/local/lib64/perl5/PDL/PP.pm:1586:29: warning: passing argument 14 of 'dlevmar_blec_der' makes pointer from integer without a cast [-Wint-conversion] 1586 ^
int

In file included from pp-levmar_der_ub_A_b.c:52: ./levmar-2.6/levmar.h:149:26: note: expected 'double ' but argument is of type 'int' 149 | int itmax, double opts, double info, double work, double covar, void adata); | ~~^~ /usr/local/lib64/perl5/PDL/PP.pm:1583:49: error: too many arguments to function 'dlevmar_blec_der' 1583 | XXX=for sig | ^
In file included from pp-levmar_der_ub_A_b.c:52: ./levmar-2.6/levmar.h:145:12: note: declared here 145 | extern int dlevmar_blec_der( | ^~~~ make: *** [Makefile:349: pp-levmar_der_ub_A_b.o] Error 1

I have Slackware 15 with PDL 2.075 lapack-3.9.1-x86_64-1_SBo lapack-atlas-3.6.1-x86_64-2_SBo blas-3.9.1-x86_64-1_SBo cblas-3.9.1-x86_64-1_SBo gcc-11.2.0_multilib-x86_64-2alien

mohawk2 commented 2 years ago

Thanks for the report! levmar 2.6 added a dscl argument to the bc functions (only), so I made it add a NULL if there were any arguments. I have now fixed it to only add it for that case, and it now works again. A new version will be released in just a moment.