StrawberryPerl / Perl-Dist-Strawberry

Tooling to build and package releases for Perl on Windows.
https://strawberryperl.com
Other
289 stars 49 forks source link

perl 5.40 cpan | PDL::Stats fails to build #187

Closed shawnlaffan closed 6 months ago

shawnlaffan commented 6 months ago

PDL::Stats is failing to build with Perl 5.40 RC1. Extract of the build log is below. Full log is attached.

This does not occur with Strawberry Perl 5.38.2.2.

@mohawk2 - FYI.

gcc -c  "-IC:/strawberry/perl/vendor/lib/PDL/Core"  "-IC:\strawberry\c\bin\..\include" -std=c99 -DWIN32 -DWIN64 -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields -Os   -DVERSION=\"0\" -DXS_VERSION=\"0\"  "-IC:\strawberry\perl\lib\CORE"   pp-mle_geosh.c
gcc -c  "-IC:/strawberry/perl/vendor/lib/PDL/Core"  "-IC:\strawberry\c\bin\..\include" -std=c99 -DWIN32 -DWIN64 -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields -Os   -DVERSION=\"0\" -DXS_VERSION=\"0\"  "-IC:\strawberry\perl\lib\CORE"   pp-pmf_geosh.c
gcc -c  "-IC:/strawberry/perl/vendor/lib/PDL/Core"  "-IC:\strawberry\c\bin\..\include" -std=c99 -DWIN32 -DWIN64 -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields -Os   -DVERSION=\"0\" -DXS_VERSION=\"0\"  "-IC:\strawberry\perl\lib\CORE"   pp-mle_lognormal.c
pp-pdf_gaussian.c: In function 'pdl_pdf_gaussian_readdata':
pp-pdf_gaussian.c:107:58: error: 'M_PI' undeclared (first use in this function)
  107 |               (p_datap)[0] = 1 / sqrt((v_datap)[0] * 2 * M_PI)
      |                                                          ^~~~
pp-pdf_gaussian.c:107:58: note: each undeclared identifier is reported only once for each function it appears in
gmake[1]: *** [Makefile:324: pp-pdf_gaussian.o] Error 1
gmake[1]: *** Waiting for unfinished jobs....
gmake[1]: Leaving directory 'C:/strawberry_build/env/AppDataRoaming/.cpanm/work/1716609896.15860/PDL-Stats-0.83/Distr'
gmake: *** [makefile:495: subdirs] Error 2

mod_install_PDL_Stats_FAIL_1716609895.log.txt

shawnlaffan commented 6 months ago

Adding #include <gsl/gsl_math.h> to the add_hdr block gets it to work. https://github.com/PDLPorters/PDL-Stats/blob/639a13e3463a407a3e6949e38c7295a4eb249d7b/Distr/distr.pd#L56-L60

mohawk2 commented 6 months ago

New PDL::Stats with this now out as 0.84.

shawnlaffan commented 6 months ago

PDL::Stats 0.84 installs cleanly with SP 5.40-RC1.

Thanks for updating.