Glad to hear it! You could help: it’s coming back with a difference, only with double, between using the “gauss” and “jacgauss” in err2, and in the $Gf in err1. $Gf seems to specify “FLOAT”, which I now suspect should say “DOUBLE”? (I don’t know the levmar library, please guide me).
Best regards, Ed From: Shawn Laffan<mailto:shawnlaf...@gmail.com> Sent: 13 October 2021 22:17 To: Ed .<mailto:ej...@hotmail.com> Cc: pdl-devel@lists.sourceforge.net<mailto:pdl-devel@lists.sourceforge.net> Subject: Re: [Pdl-devel] PDL > 2.019 breaks PDL::Fit::Levmar Thanks Ed. Just downloaded and built your fork, and confirm it is back to only failing chkjac.t. Hopefully that is not hard to diagnose and solve. Regards, Shawn. On Thu, 14 Oct 2021 at 06:15, Ed . <ej...@hotmail.com<mailto:ej...@hotmail.com>> wrote: Hi Shawn, P:F:Levmar both instructs the Makefile to compile its “pdlperlfunc.c” (so it duplicates various generated bits of the .xs including declaring a “PDL” entity), but then #includes it into the generated .xs. Because as you say things have changed a bit, the “PDL” entity (a struct core) is now different. The instant fix for this, visible in my fork (https://github.com/mohawk2/PDL-Fit-Levmar/tree/fixups) is just to stop having it compile the .c, and to remove the unneeded declarations (since they happen in the generated .xs before the file gets #include-d). It then goes back to only failing chkjac.t. As you will see on the GitHub issue you linked, I have offered to adopt the library (and will PR what I believe are backward-compatible fixes). Meanwhile I am also going through and fixing up various other improvable bits of the code. Best regards, Ed From: Shawn Laffan <shawnlaf...@gmail.com<mailto:shawnlaf...@gmail.com>> Sent: Wednesday, October 13, 2021 12:07:19 PM To: pdl-devel@lists.sourceforge.net<mailto:pdl-devel@lists.sourceforge.net> <pdl-devel@lists.sourceforge.net<mailto:pdl-devel@lists.sourceforge.net>> Subject: [Pdl-devel] PDL > 2.019 breaks PDL::Fit::Levmar It's good to see all the recent activity and cleanups to PDL. It seems, though, that one or more of these changes have broken PDL::Fit::Levmar (or perhaps the assumptions of PDL::Fit::Levmar were somewhat brittle). One could use PDL::Fit::LM, but PDL::Fit::Levmar is a bit more convenient as it does not need partial derivatives to be formulated. As a general summary: It builds and passes tests with PDL 2.019. It stopped building some time in the 2.019_x dev series (2.019_03?). It builds again with 2.057 but fails one test (chkjac.t). It now fails to build with 2.057_04. Latest build failures are below. Tested on Windows 10 using Strawberry Perl portable 5.32.1. Possibly relevant is that PDL::Fit::Levmar seems to be up for adoption. https://github.com/jlapeyre/PDL-Fit-Levmar/issues/5 Shawn. ====== cpanm --look PDL::Fit::Levmar --> Working on PDL::Fit::Levmar Fetching http://www.cpan.org/authors/id/J/JL/JLAPEYRE/PDL-Fit-Levmar-0.0100.tar.gz ... OK Entering C:/user/perls/5321~2.1_P/data/.cpanm/work/1634122041.29780/PDL-Fit-Levmar-0.0100 with C:\Windows\system32\cmd.exe Microsoft Windows [Version 10.0.19043.1237] (c) Microsoft Corporation. All rights reserved. C:\user\perls\5321~2.1_P\data\.cpanm\work\1634122041.29780\PDL-Fit-Levmar-0.0100>perl -MPDL -E"say $PDL::VERSION" 2.057_04 C:\user\perls\5321~2.1_P\data\.cpanm\work\1634122041.29780\PDL-Fit-Levmar-0.0100>perl Makefile.PL Checking if your kit is complete... Looks good WARNING: Older versions of ExtUtils::MakeMaker may errantly install README.pod as part of this distribution. It is recommended to avoid using this path in CPAN modules. Warning: '-L..' changed to '-LC:/user/perls/5321~2.1_P/data/.cpanm/work/1634122041.29780/PDL-Fit-Levmar-0.0100/..' Writing MYMETA.yml and MYMETA.json Generating a gmake-style Makefile Writing Makefile for PDL::Fit::Levmar Writing MYMETA.yml and MYMETA.json C:\user\perls\5321~2.1_P\data\.cpanm\work\1634122041.29780\PDL-Fit-Levmar-0.0100>gmake "C:\user\perls\5.32.1.1_PDLxx\perl\bin\perl.exe" "-IC:/user/perls/5.32.1.1_PDLxx/perl/site/lib" "-MPDL::PP=PDL::Fit::Levmar,PDL::Fit::Levmar,Levmar,," levmar.pd cp Levmar.pm blib\lib\PDL\Fit/Levmar.pm gmake[1]: Entering directory 'C:/user/perls/5321~2.1_P/data/.cpanm/work/1634122041.29780/PDL-Fit-Levmar-0.0100/Func' "C:\user\perls\5.32.1.1_PDLxx\perl\bin\perl.exe" "-IC:/user/perls/5.32.1.1_PDLxx/perl/site/lib" "-MPDL::PP=PDL::Fit::Levmar::Func,PDL::Fit::Levmar::Func,Func,," func.pd cp Func.pm ..\blib\lib\PDL\Fit\Levmar/Func.pm Running Mkbootstrap for Func () "C:\user\perls\5.32.1.1_PDLxx\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "Func.bs" "C:\user\perls\5.32.1.1_PDLxx\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- Func.bs ..\blib\arch\auto\PDL\Fit\Levmar\Func\Func.bs 644 "C:\user\perls\5.32.1.1_PDLxx\perl\bin\perl.exe" "C:\user\perls\5.32.1.1_PDLxx\perl\lib\ExtUtils/xsubpp" -typemap C:\user\perls\5.32.1.1_PDLxx\perl\lib\ExtUtils\typemap -typemap C:\user\perls\5.32.1.1_PDLxx\perl\site\lib\PDL\Core\typemap Func.xs > Func.xsc "C:\user\perls\5.32.1.1_PDLxx\perl\bin\perl.exe" -MExtUtils::Command -e mv -- Func.xsc Func.c gcc -c "-IC:/user/perls/5.32.1.1_PDLxx/perl/site/lib/PDL/Core" -I./levmar-2.5 "-IC:/user/perls/5.32.1.1_PDLxx/perl/site/lib/PDL/Core" -DWIN32 -DWIN64 -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -O3 --unroll-loops -DVERSION=\"0.0100\" -DXS_VERSION=\"0.0100\" "-IC:\user\perls\5.32.1.1_PDLxx\perl\lib\CORE" Func.c Func.xs: In function 'XS_PDL__Fit__Levmar__Func_call_close_shared_object_file': Func.xs:784:4: warning: implicit declaration of function '_close_shared_object_file' [-Wimplicit-function-declaration] _close_shared_object_file ( &lib_handle, &rval , error_message, nchar); ^~~~~~~~~~~~~~~~~~~~~~~~~ gcc -c "-IC:/user/perls/5.32.1.1_PDLxx/perl/site/lib/PDL/Core" -I./levmar-2.5 "-IC:/user/perls/5.32.1.1_PDLxx/perl/site/lib/PDL/Core" -DWIN32 -DWIN64 -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -O3 --unroll-loops -DVERSION=\"0.0100\" -DXS_VERSION=\"0.0100\" "-IC:\user\perls\5.32.1.1_PDLxx\perl\lib\CORE" getsymbol.c getsymbol.c: In function '_close_shared_object_file': getsymbol.c:81:13: warning: comparison between pointer and integer if ( NULL == *rval ) { ^~ "C:\user\perls\5.32.1.1_PDLxx\perl\bin\perl.exe" -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"PDL::Fit::Levmar::Func\", 'DLBASE' => 'Func', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);" g++.exe Func.def -o ..\blib\arch\auto\PDL\Fit\Levmar\Func\Func.xs.dll -mdll -s -L"C:\user\perls\5.32.1.1_PDLxx\perl\lib\CORE" -L"C:\user\perls\5.32.1.1_PDLxx\c\lib" Func.o getsymbol.o "C:\user\perls\5.32.1.1_PDLxx\perl\lib\CORE\libperl532.a" "C:\user\perls\5.32.1.1_PDLxx\c\x86_64-w64-mingw32\lib\libm.a" "C:\user\perls\5.32.1.1_PDLxx\c\x86_64-w64-mingw32\lib\libmoldname.a" "C:\user\perls\5.32.1.1_PDLxx\c\x86_64-w64-mingw32\lib\libkernel32.a" "C:\user\perls\5.32.1.1_PDLxx\c\x86_64-w64-mingw32\lib\libuser32.a" "C:\user\perls\5.32.1.1_PDLxx\c\x86_64-w64-mingw32\lib\libgdi32.a" "C:\user\perls\5.32.1.1_PDLxx\c\x86_64-w64-mingw32\lib\libwinspool.a" "C:\user\perls\5.32.1.1_PDLxx\c\x86_64-w64-mingw32\lib\libcomdlg32.a" "C:\user\perls\5.32.1.1_PDLxx\c\x86_64-w64-mingw32\lib\libadvapi32.a" "C:\user\perls\5.32.1.1_PDLxx\c\x86_64-w64-mingw32\lib\libshell32.a" "C:\user\perls\5.32.1.1_PDLxx\c\x86_64-w64-mingw32\lib\libole32.a" "C:\user\perls\5.32.1.1_PDLxx\c\x86_64-w64-mingw32\lib\liboleaut32.a" "C:\user\perls\5.32.1.1_PDLxx\c\x86_64-w64-mingw32\lib\libnetapi32.a" "C:\user\perls\5.32.1.1_PDLxx\c\x86_64-w64-mingw32\lib\libuuid.a" "C:\user\perls\5.32.1.1_PDLxx\c\x86_64-w64-mingw32\lib\libws2_32.a" "C:\user\perls\5.32.1.1_PDLxx\c\x86_64-w64-mingw32\lib\libmpr.a" "C:\user\perls\5.32.1.1_PDLxx\c\x86_64-w64-mingw32\lib\libwinmm.a" "C:\user\perls\5.32.1.1_PDLxx\c\x86_64-w64-mingw32\lib\libversion.a" "C:\user\perls\5.32.1.1_PDLxx\c\x86_64-w64-mingw32\lib\libodbc32.a" "C:\user\perls\5.32.1.1_PDLxx\c\x86_64-w64-mingw32\lib\libodbccp32.a" "C:\user\perls\5.32.1.1_PDLxx\c\x86_64-w64-mingw32\lib\libcomctl32.a" -Wl,--enable-auto-image-base "C:\user\perls\5.32.1.1_PDLxx\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 755 ..\blib\arch\auto\PDL\Fit\Levmar\Func\Func.xs.dll gmake[1]: Leaving directory 'C:/user/perls/5321~2.1_P/data/.cpanm/work/1634122041.29780/PDL-Fit-Levmar-0.0100/Func' Running Mkbootstrap for Levmar () "C:\user\perls\5.32.1.1_PDLxx\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "Levmar.bs" "C:\user\perls\5.32.1.1_PDLxx\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- Levmar.bs blib\arch\auto\PDL\Fit\Levmar\Levmar.bs 644 gcc -c "-IC:/user/perls/5.32.1.1_PDLxx/perl/site/lib/PDL/Core" -I./levmar-2.5 -DWIN32 -DWIN64 -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -O3 --unroll-loops -DVERSION=\"0.0100\" -DXS_VERSION=\"0.0100\" "-IC:\user\perls\5.32.1.1_PDLxx\perl\lib\CORE" -o pdlperlfunc.o pdlperlfunc.c pdlperlfunc.c: In function 'pdl_wrap': pdlperlfunc.c:173:40: warning: passing argument 2 of 'PDL->add_deletedata_magic' from incompatible pointer type [-Wincompatible-pointer-types] PDL->add_deletedata_magic(npdl, delete_magic, delparam); ^~~~~~~~~~~~ pdlperlfunc.c:173:40: note: expected 'void (*)(pdl *, size_t)' {aka 'void (*)(struct pdl *, long long unsigned int)'} but argument is of type 'DelMagic' {aka 'void (*)(struct pdl *, int)'} pdlperlfunc.c:176:40: warning: passing argument 2 of 'PDL->add_deletedata_magic' from incompatible pointer type [-Wincompatible-pointer-types] PDL->add_deletedata_magic(npdl, default_magic, 0); ^~~~~~~~~~~~~ pdlperlfunc.c:176:40: note: expected 'void (*)(pdl *, size_t)' {aka 'void (*)(struct pdl *, long long unsigned int)'} but argument is of type 'void (*)(pdl *, int)' {aka 'void (*)(struct pdl *, int)'} "C:\user\perls\5.32.1.1_PDLxx\perl\bin\perl.exe" "C:\user\perls\5.32.1.1_PDLxx\perl\lib\ExtUtils/xsubpp" -typemap C:\user\perls\5.32.1.1_PDLxx\perl\lib\ExtUtils\typemap -typemap C:\user\perls\5.32.1.1_PDLxx\perl\site\lib\PDL\Core\typemap Levmar.xs > Levmar.xsc "C:\user\perls\5.32.1.1_PDLxx\perl\bin\perl.exe" -MExtUtils::Command -e mv -- Levmar.xsc Levmar.c gcc -c "-IC:/user/perls/5.32.1.1_PDLxx/perl/site/lib/PDL/Core" -I./levmar-2.5 -DWIN32 -DWIN64 -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -O3 --unroll-loops -DVERSION=\"0.0100\" -DXS_VERSION=\"0.0100\" "-IC:\user\perls\5.32.1.1_PDLxx\perl\lib\CORE" Levmar.c C:/user/perls/5.32.1.1_PDLxx/perl/site/lib/PDL/PP.pm:681:13: error: static declaration of 'PDL_Fit_Levmar' follows non-static declaration #define PDL %s ^~ C:/user/perls/5.32.1.1_PDLxx/perl/site/lib/PDL/PP.pm:681:13: note: in definition of macro 'PDL' #define PDL %s ^~ C:/user/perls/5.32.1.1_PDLxx/perl/site/lib/PDL/PP.pm:681:13: note: previous declaration of 'PDL_Fit_Levmar' was here #define PDL %s ^~ C:/user/perls/5.32.1.1_PDLxx/perl/site/lib/PDL/PP.pm:681:13: note: in definition of macro 'PDL' #define PDL %s ^~ In file included from C:/user/perls/5.32.1.1_PDLxx/perl/site/lib/PDL/PP.pm:696: pdlperlfunc.c: In function 'pdl_wrap': pdlperlfunc.c:173:40: warning: passing argument 2 of 'PDL_Fit_Levmar->add_deletedata_magic' from incompatible pointer type [-Wincompatible-pointer-types] PDL->add_deletedata_magic(npdl, delete_magic, delparam); ^~~~~~~~~~~~ pdlperlfunc.c:173:40: note: expected 'void (*)(pdl *, size_t)' {aka 'void (*)(struct pdl *, long long unsigned int)'} but argument is of type 'DelMagic' {aka 'void (*)(struct pdl *, int)'} pdlperlfunc.c:176:40: warning: passing argument 2 of 'PDL_Fit_Levmar->add_deletedata_magic' from incompatible pointer type [-Wincompatible-pointer-types] PDL->add_deletedata_magic(npdl, default_magic, 0); ^~~~~~~~~~~~~ pdlperlfunc.c:176:40: note: expected 'void (*)(pdl *, size_t)' {aka 'void (*)(struct pdl *, long long unsigned int)'} but argument is of type 'void (*)(pdl *, int)' {aka 'void (*)(struct pdl *, int)'} C:/user/perls/5.32.1.1_PDLxx/perl/site/lib/PDL/PP.pm: At top level: C:/user/perls/5.32.1.1_PDLxx/perl/site/lib/PDL/PP.pm:681:13: error: non-static declaration of 'PDL_Fit_Levmar' follows static declaration #define PDL %s ^~ C:/user/perls/5.32.1.1_PDLxx/perl/site/lib/PDL/PP.pm:681:13: note: in definition of macro 'PDL' #define PDL %s ^~ C:/user/perls/5.32.1.1_PDLxx/perl/site/lib/PDL/PP.pm:681:13: note: previous declaration of 'PDL_Fit_Levmar' was here #define PDL %s ^~ C:/user/perls/5.32.1.1_PDLxx/perl/site/lib/PDL/PP.pm:681:13: note: in definition of macro 'PDL' #define PDL %s ^~ gmake: *** [Makefile:367: Levmar.o] Error 1
_______________________________________________ pdl-devel mailing list pdl-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pdl-devel