PDLPorters / pdl

Scientific computing with Perl
http://pdl.perl.org
Other
91 stars 46 forks source link

Cannot get PDL to install on windows #455

Closed steveo314 closed 1 year ago

steveo314 commented 1 year ago

I am trying to get PDL installed under berrybrew on windows 10. Perl version 5.38. Running cpan in PowerShell. It fails every time even when I add dependencies that it says are missing.

└─$ cpan PDL
Loading internal logger. Log::Log4perl recommended for better logging
CPAN: CPAN::SQLite loaded ok (v0.220)
Database was generated on Wed, 20 Sep 2023 18:46:33 GMT
Running install for module 'PDL'
CPAN: Digest::SHA loaded ok (v6.04)
CPAN: Compress::Zlib loaded ok (v2.204)
Checksum for C:\berrybrew\instance\5.38.0_64\cpan\sources\authors\id\E\ET\ETJ\PDL-2.084.tar.gz ok
CPAN: Archive::Tar loaded ok (v3.02)
CPAN: YAML::XS loaded ok (v0.88)
CPAN: CPAN::Meta::Requirements loaded ok (v2.143)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20230520)
Configuring E/ET/ETJ/PDL-2.084.tar.gz with Makefile.PL
Loaded ExtUtils::F77 version 1.26
Checking if your kit is complete...
Looks good
        1 file(s) copied.
Extracting Types.pm
Warning (mostly harmless): No library found for

Not building PDL::Graphics::PGPLOT, PGPLOT not installed

No support for PDL::Graphics::IIS on win32 platform yet. Will skip build process

Curses capable library not found, not building PDL::IO::Browser

Error loading Alien::HDF4: ' *** Can't load dependency information for Alien::HDF4:

Can't locate Alien/HDF4/Install/Files.pm in @INC (you may need to install the Alien::HDF4::Install::Files module) (@INC entries checked: c:/perl/lib C:/berrybrew/instance/5.38.0_64/perl/site/lib C:/berrybrew/instance/5.38.0_64/perl/vendor/lib C:/berrybrew/instance/5.38.0_64/perl/lib C:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11 C:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/IO .) at C:/berrybrew/instance/5.38.0_64/perl/vendor/lib/ExtUtils/Depends.pm line 181.

Skipping build of PDL::IO::HDF.

Will skip build of PDL::GIS::Proj on this system - no Alien::proj
'gsl-config' is not recognized as an internal or external command,
operable program or batch file.
        no GSL link info (libgsl probably not available)
'gsl-config' is not recognized as an internal or external command,
operable program or batch file.
        no GSL include info (libgsl probably not available)

'gsl-config' is not recognized as an internal or external command,
operable program or batch file.
        no GSL version info found (gsl-config not installed?)

Not building GSL modules: GSL version UNKNOWN VERSION found, but need at least 1.3
ExtUtils::F77: Unable to guess and/or validate system/compiler configuration
ExtUtils::F77: Will try system=MinGW Compiler=GFortran
ExtUtils::F77: Unable to guess and/or validate system/compiler configuration
ExtUtils::F77: Will try system=MinGW Compiler=GFortran

Will skip build of PDL::Transform::Proj4 on this system - no Alien::proj
Generating a gmake-style Makefile
Writing Makefile for PDL
Writing MYMETA.yml and MYMETA.json
Writing Basic/Core/Config.pm
  ETJ/PDL-2.084.tar.gz
  C:\berrybrew\instance\5.38.0_64\perl\bin\perl.exe Makefile.PL -- OK
Running make for E/ET/ETJ/PDL-2.084.tar.gz
---- Unsatisfied dependencies detected during ----
----           ETJ/PDL-2.084.tar.gz           ----
    Inline::C [requires,optional]
cp Bugs.pod blib\lib/PDL/Bugs.pod
gmake[1]: Entering directory 'C:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/Basic'
cp AutoLoader.pm ..\blib\lib/PDL/AutoLoader.pm
cp Options.pm ..\blib\lib/PDL/Options.pm
cp Matrix.pm ..\blib\lib/PDL/Matrix.pm
cp default.pdl ..\blib\lib/PDL/default.pdl
cp Constants.pm ..\blib\lib/PDL/Constants.pm
cp LiteF.pm ..\blib\lib/PDL/LiteF.pm
cp PDL.pm ..\blib\lib/PDL.pm
cp Reduce.pm ..\blib\lib/PDL/Reduce.pm
cp Lite.pm ..\blib\lib/PDL/Lite.pm
cp Lvalue.pm ..\blib\lib/PDL/Lvalue.pm
gmake[2]: Entering directory 'C:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/Basic/Pod'
"C:\berrybrew\instance\5.38.0_64\perl\bin\perl.exe" -MPod::Select -e "podselect('../Gen/Inline/Pdlpp.pm');" > PP-Inline.pod
cp Tips.pod ..\..\blib\lib\PDL/Tips.pod
cp Broadcasting.pod ..\..\blib\lib\PDL/Broadcasting.pod
cp Philosophy.pod ..\..\blib\lib\PDL/Philosophy.pod
cp Course.pod ..\..\blib\lib\PDL/Course.pod
cp ParallelCPU.pod ..\..\blib\lib\PDL/ParallelCPU.pod
cp MATLAB.pod ..\..\blib\lib\PDL/MATLAB.pod
cp API.pod ..\..\blib\lib\PDL/API.pod
cp Objects.pod ..\..\blib\lib\PDL/Objects.pod
cp Tutorials.pod ..\..\blib\lib\PDL/Tutorials.pod
cp FAQ.pod ..\..\blib\lib\PDL/FAQ.pod
cp Dataflow.pod ..\..\blib\lib\PDL/Dataflow.pod
cp Internals.pod ..\..\blib\lib\PDL/Internals.pod
cp BadValues.pod ..\..\blib\lib\PDL/BadValues.pod
cp PP.pod ..\..\blib\lib\PDL/PP.pod
cp QuickStart.pod ..\..\blib\lib\PDL/QuickStart.pod
cp Modules.pod ..\..\blib\lib\PDL/Modules.pod
cp Graphics.pod ..\..\blib\lib\PDL/Graphics.pod
cp Scilab.pod ..\..\blib\lib\PDL/Scilab.pod
cp PP-Inline.pod ..\..\blib\lib\PDL/PP-Inline.pod
cp Indexing.pod ..\..\blib\lib\PDL/Indexing.pod
gmake[2]: Leaving directory 'C:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/Basic/Pod'
gmake[2]: Entering directory 'C:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/Basic/Gen'
"C:\berrybrew\instance\5.38.0_64\perl\bin\perl.exe" PP/dump.pp > PP/Dump.pm.tmp
"C:\berrybrew\instance\5.38.0_64\perl\bin\perl.exe" -MExtUtils::Command -e mv -- PP/Dump.pm.tmp PP/Dump.pm
"C:\berrybrew\instance\5.38.0_64\perl\bin\perl.exe" -MPod::Select -e "podselect('pptemplate');" > pptemplate.pod
cp pptemplate.pod ..\..\blib\lib\PDL/pptemplate.pod
cp PP.pm ..\..\blib\lib\PDL/PP.pm
cp PP/PDLCode.pm ..\..\blib\lib\PDL/PP/PDLCode.pm
cp PP/Signature.pm ..\..\blib\lib\PDL/PP/Signature.pm
cp PP/Dims.pm ..\..\blib\lib\PDL/PP/Dims.pm
cp PP/PdlParObj.pm ..\..\blib\lib\PDL/PP/PdlParObj.pm
cp PP/Dump.pm ..\..\blib\lib\PDL/PP/Dump.pm
cp PP/CType.pm ..\..\blib\lib\PDL/PP/CType.pm
gmake[3]: Entering directory 'C:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/Basic/Gen/Inline'
cp Pdlpp.pm ..\..\..\blib\lib/Inline/Pdlpp.pm
cp MakePdlppInstallable.pm ..\..\..\blib\lib/Inline/MakePdlppInstallable.pm
gmake[3]: Leaving directory 'C:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/Basic/Gen/Inline'
"C:\berrybrew\instance\5.38.0_64\perl\bin\perl.exe" -MExtUtils::Command -e cp -- pptemplate ..\..\blib\script\pptemplate
pl2bat.bat ..\..\blib\script\pptemplate
gmake[2]: Leaving directory 'C:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/Basic/Gen'
gmake[2]: Entering directory 'C:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/Basic/SourceFilter'
cp ModuleCompile.pm ..\..\blib\lib\PDL/NiceSlice/ModuleCompile.pm
cp NiceSlice.pm ..\..\blib\lib\PDL/NiceSlice.pm
cp FilterUtilCall.pm ..\..\blib\lib\PDL/NiceSlice/FilterUtilCall.pm
cp FilterSimple.pm ..\..\blib\lib\PDL/NiceSlice/FilterSimple.pm
gmake[2]: Leaving directory 'C:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/Basic/SourceFilter'
gmake[2]: Entering directory 'C:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/Basic/Core'
"C:\berrybrew\instance\5.38.0_64\perl\bin\perl.exe" pdl.h.PL pdl.h
Extracting pdl.h
"C:\berrybrew\instance\5.38.0_64\perl\bin\perl.exe" pdlperl.h.PL pdlperl.h
Extracting pdlperl.h
"C:\berrybrew\instance\5.38.0_64\perl\bin\perl.exe" pdlsimple.h.PL pdlsimple.h
Extracting pdlsimple.h (with variable substitutions)
cp pdlcore.h ..\..\blib\lib\PDL/Core/pdlcore.h
cp pdlsimple.h ..\..\blib\lib\PDL/Core/pdlsimple.h
cp pdl.h ..\..\blib\lib\PDL/Core/pdl.h
cp Overloads.pm ..\..\blib\lib\PDL/Complex/Overloads.pm
cp Char.pm ..\..\blib\lib\PDL/Char.pm
cp Dev.pm ..\..\blib\lib\PDL/Core/Dev.pm
cp Dbg.pm ..\..\blib\lib\PDL/Dbg.pm
cp typemap ..\..\blib\lib\PDL/Core/typemap
cp Types.pm ..\..\blib\lib\PDL/Types.pm
cp pdlmagic.h ..\..\blib\lib\PDL/Core/pdlmagic.h
cp Core.pm ..\..\blib\lib\PDL/Core.pm
cp Exporter.pm ..\..\blib\lib\PDL/Exporter.pm
cp Basic.pm ..\..\blib\lib\PDL/Basic.pm
cp pdlperl.h ..\..\blib\lib\PDL/Core/pdlperl.h
cp pdlbroadcast.h ..\..\blib\lib\PDL/Core/pdlbroadcast.h
cp ppport.h ..\..\blib\lib\PDL/Core/ppport.h
cp Config.pm ..\..\blib\lib\PDL/Config.pm
cp IFiles.pm ..\..\blib\lib\PDL/Install/Files.pm
Running Mkbootstrap for Core ()
"C:\berrybrew\instance\5.38.0_64\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "Core.bs"
"C:\berrybrew\instance\5.38.0_64\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- Core.bs ..\..\blib\arch\auto\PDL\Core\Core.bs 644
"C:\berrybrew\instance\5.38.0_64\perl\bin\perl.exe" "C:\berrybrew\instance\5.38.0_64\perl\lib\ExtUtils/xsubpp"  -typemap C:\berrybrew\instance\5.38.0_64\perl\lib\ExtUtils\typemap -typemap C:\berrybrew\instance\5.38.0_64\cpan\build\PDL-2.084-11\Basic\Core\typemap  Core.xs > Core.xsc
"C:\berrybrew\instance\5.38.0_64\perl\bin\perl.exe" -MExtUtils::Command -e mv -- Core.xsc Core.c
gcc -c  "-IC:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/Basic/Core" -DWIN32 -DWIN64 -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields -Os   -DVERSION=\"2.084\" -DXS_VERSION=\"2.084\"  "-IC:\berrybrew\instance\5.38.0_64\perl\lib\CORE"  -DPDL_PTHREAD  Core.c
gcc -c  "-IC:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/Basic/Core" -DWIN32 -DWIN64 -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields -Os   -DVERSION=\"2.084\" -DXS_VERSION=\"2.084\"  "-IC:\berrybrew\instance\5.38.0_64\perl\lib\CORE"  -DPDL_PTHREAD  pdlcore.c
gcc -c  "-IC:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/Basic/Core" -DWIN32 -DWIN64 -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields -Os   -DVERSION=\"2.084\" -DXS_VERSION=\"2.084\"  "-IC:\berrybrew\instance\5.38.0_64\perl\lib\CORE"  -DPDL_PTHREAD  pdlapi.c
gcc -c  "-IC:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/Basic/Core" -DWIN32 -DWIN64 -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields -Os   -DVERSION=\"2.084\" -DXS_VERSION=\"2.084\"  "-IC:\berrybrew\instance\5.38.0_64\perl\lib\CORE"  -DPDL_PTHREAD  pdlbroadcast.c
gcc -c  "-IC:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/Basic/Core" -DWIN32 -DWIN64 -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields -Os   -DVERSION=\"2.084\" -DXS_VERSION=\"2.084\"  "-IC:\berrybrew\instance\5.38.0_64\perl\lib\CORE"  -DPDL_PTHREAD  pdlconv.c
gcc -c  "-IC:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/Basic/Core" -DWIN32 -DWIN64 -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields -Os   -DVERSION=\"2.084\" -DXS_VERSION=\"2.084\"  "-IC:\berrybrew\instance\5.38.0_64\perl\lib\CORE"  -DPDL_PTHREAD  pdlmagic.c
gcc -c  "-IC:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/Basic/Core" -DWIN32 -DWIN64 -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields -Os   -DVERSION=\"2.084\" -DXS_VERSION=\"2.084\"  "-IC:\berrybrew\instance\5.38.0_64\perl\lib\CORE"  -DPDL_PTHREAD  pdlaffine.c
gcc -c  "-IC:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/Basic/Core" -DWIN32 -DWIN64 -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields -Os   -DVERSION=\"2.084\" -DXS_VERSION=\"2.084\"  "-IC:\berrybrew\instance\5.38.0_64\perl\lib\CORE"  -DPDL_PTHREAD  pdlutil.c
"C:\berrybrew\instance\5.38.0_64\perl\bin\perl.exe" -MExtUtils::Mksymlists \
     -e "Mksymlists('NAME'=>\"PDL::Core\", 'DLBASE' => 'Core', 'DL_FUNCS' => {  }, 'FUNCLIST' => [], 'IMPORTS' => {  }, 'DL_VARS' => []);"
g++.exe Core.def -o ..\..\blib\arch\auto\PDL\Core\Core.xs.dll -mdll -s -L"C:\berrybrew\instance\5.38.0_64\perl\lib\CORE" -L"C:\berrybrew\instance\5.38.0_64\c\lib" Core.o pdlcore.o pdlapi.o pdlbroadcast.o pdlconv.o pdlmagic.o pdlaffine.o pdlutil.o   "C:\berrybrew\instance\5.38.0_64\perl\lib\CORE\libperl538.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libpthread.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libm.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libmoldname.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libkernel32.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libuser32.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libgdi32.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libwinspool.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libcomdlg32.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libadvapi32.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libshell32.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libole32.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\liboleaut32.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libnetapi32.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libuuid.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libws2_32.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libmpr.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libwinmm.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libversion.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libodbc32.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libodbccp32.a" "C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libcomctl32.a" -Wl,--enable-auto-image-base
C:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\berrybrew\instance\5.38.0_64\c\x86_64-w64-mingw32\lib\libkernel32.a(dgfes01489.o): illegal symbol index 45 in relocs
collect2.exe: error: ld returned 1 exit status
gmake[2]: *** [Makefile:503: ..\..\blib\arch\auto\PDL\Core\Core.xs.dll] Error 1
gmake[2]: Leaving directory 'C:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/Basic/Core'
gmake[1]: *** [Makefile:517: subdirs] Error 2
gmake[1]: Leaving directory 'C:/berrybrew/instance/5.38.0_64/cpan/build/PDL-2.084-11/Basic'
gmake: *** [makefile:525: subdirs] Error 2
  ETJ/PDL-2.084.tar.gz
  C:\berrybrew\instance\5.38.0_64\c\bin\gmake.exe -- NOT OK
Stopping: 'install' failed for 'PDL'.
shawnlaffan commented 1 year ago

The use of C:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe looks suspicious to me.

Do you have an older Strawberry perl installed in that location? And is it in your path ahead of the berrybrew perl 5.38.0 bin dirs?

And FWIW, if you want to avoid building PDL there are recent Strawberry Perl PDL editions with PDL 2.084 including many of the optional components such as GSL.
https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/tag/SP_5380_5361

steveo314 commented 1 year ago

I felt a disturbance in the force that the older Strawberry may have been the culprit. I just recently switched to berrybrew after not knowing Strawberry Perl switched to the berrybrew method rather than the install packages in the main website.

I noticed the PDL builds after posting also.

steveo314 commented 1 year ago

I removed the instances of the old Strawberry Perl, switched to the 5.38 PDL, and moved to cpanm and am having better luck.