phew47 has asked for the wisdom of the Perl Monks concerning the following question:

We're finally upgrading our (Delphi) application to 64-bit, and I need to add a heap of 64-bit modules to our base Strawberry Perl 5.38 on Windows, using cpanm. The majority of the modules (some 92 in total) loaded without a hitch but a handful failed. The failures included:

Building and testing Compress-Raw-Zlib-2.212 ... FAIL Building and testing Bit-Vector-7.4 ... FAIL Configuring Statistics-R-0.34 ... N/A Building and testing String-CRC32-2.100 ... FAIL Building and testing Win32-Internet-0.087 ... FAIL Building and testing Win32-NetResource-0.057 ... FAIL Building and testing Win32-Process-List-0.09 ... FAIL Building and testing Win32-Registry-0.12 ... FAIL Building and testing Win32-SharedFileOpen-4.06 ... FAIL Building and testing Win32-Shortcut-0.08 ... FAIL Building and testing Win32-SystemInfo-CpuUsage-0.02 ... FAIL

The pattern of failure seems always the same, as in the following build.log. I'm not a Perl wizard, just a simple user, and advice from the convocation of monks would be most welcome.

cpanm (App::cpanminus) 1.7047 on perl 5.038002 built for MSWin32-x64-m +ulti-thread Work directory is T:\hyd\src\strawberry.5.38\data/.cpanm/work/17199063 +15.9776 You have make T:\hyd\src\strawberry.5.38\c\bin\gmake.exe You have LWP 6.72 Falling back to Archive::Tar 3.02 Searching Date::Calc () on cpanmetadb ... --> Working on Date::Calc Fetching http://www.cpan.org/authors/id/S/ST/STBEY/Date-Calc-6.4.tar.g +z -> OK Unpacking Date-Calc-6.4.tar.gz Entering Date-Calc-6.4 Checking configure dependencies from META.json Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.70) Configuring Date-Calc-6.4 Running Makefile.PL Warning: prerequisite Bit::Vector 7.4 not found. ************************************************************* ****** BEWARE: Use "make install UNINST=1" to install! ****** ************************************************************* Checking if your kit is complete... Looks good Generating a gmake-style Makefile Writing Makefile for Date::Calc Writing MYMETA.yml and MYMETA.json -> OK Checking dependencies from MYMETA.json ... Checking if you have Carp::Clan 6.04 ... Yes (6.08) Checking if you have Bit::Vector 7.4 ... No Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.70) ==> Found dependencies: Bit::Vector Searching Bit::Vector (7.4) on cpanmetadb ... --> Working on Bit::Vector Fetching http://www.cpan.org/authors/id/S/ST/STBEY/Bit-Vector-7.4.tar. +gz -> OK Unpacking Bit-Vector-7.4.tar.gz Entering Bit-Vector-7.4 Checking configure dependencies from META.yml Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.70) Configuring Bit-Vector-7.4 Running Makefile.PL Checking if your kit is complete... Looks good Generating a gmake-style Makefile Writing Makefile for Bit::Vector Writing MYMETA.yml and MYMETA.json Writing patchlevel.h for T:\hyd\src\strawberry.5.38\perl\bin\perl.exe +(5.038002) -> OK Checking dependencies from MYMETA.json ... Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.70) Checking if you have Storable 2.21 ... Yes (3.32) Checking if you have Carp::Clan 5.3 ... Yes (6.08) Building and testing Bit-Vector-7.4 cp lib/Bit/Vector/Overload.pm blib\lib\Bit\Vector\Overload.pm cp Vector.pm blib\lib\Bit\Vector.pm cp lib/Bit/Vector/String.pod blib\lib\Bit\Vector\String.pod cp Vector.pod blib\lib\Bit\Vector.pod cp lib/Bit/Vector/Overload.pod blib\lib\Bit\Vector\Overload.pod cp lib/Bit/Vector/String.pm blib\lib\Bit\Vector\String.pm Running Mkbootstrap for Vector () "T:\hyd\src\strawberry.5.38\perl\bin\perl.exe" -MExtUtils::Command -e +chmod -- 644 "Vector.bs" "T:\hyd\src\strawberry.5.38\perl\bin\perl.exe" -MExtUtils::Command::MM + -e cp_nonempty -- Vector.bs blib\arch\auto\Bit\Vector\Vector.bs 644 gcc -c -DWIN32 -DWIN64 -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL +_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-stri +ct-aliasing -mms-bitfields -Os -falign-functions -falign-jumps -falig +n-labels -falign-loops -freorder-blocks -freorder-blocks-algorithm=st +c -freorder-blocks-and-partition -DVERSION=\"7.4\" -DXS_VERSION=\"7 +.4\" "-IT:\hyd\src\strawberry.5.38\perl\lib\CORE" BitVector.c "T:\hyd\src\strawberry.5.38\perl\bin\perl.exe" "T:\hyd\src\strawberry. +5.38\perl\lib\ExtUtils/xsubpp" -typemap T:\hyd\src\strawberry.5.38\p +erl\lib\ExtUtils\typemap -typemap T:\hyd\src\strawberry.5.38\data\.cp +anm\work\1719906315.9776\Bit-Vector-7.4\typemap Vector.xs > Vector.x +sc "T:\hyd\src\strawberry.5.38\perl\bin\perl.exe" -MExtUtils::Command -e +mv -- Vector.xsc Vector.c gcc -c -DWIN32 -DWIN64 -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL +_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-stri +ct-aliasing -mms-bitfields -Os -falign-functions -falign-jumps -falig +n-labels -falign-loops -freorder-blocks -freorder-blocks-algorithm=st +c -freorder-blocks-and-partition -DVERSION=\"7.4\" -DXS_VERSION=\"7 +.4\" "-IT:\hyd\src\strawberry.5.38\perl\lib\CORE" Vector.c "T:\hyd\src\strawberry.5.38\perl\bin\perl.exe" -MExtUtils::Mksymlists +\ -e "Mksymlists('NAME'=>\"Bit::Vector\", 'DLBASE' => 'Vector', 'DL +_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => [] +);" g++.exe Vector.def -o blib\arch\auto\Bit\Vector\Vector.xs.dll -mdll -s + -L"T:\hyd\src\strawberry.5.38\perl\lib\CORE" -L"T:\hyd\src\strawberr +y.5.38\c\lib" BitVector.o Vector.o "T:\hyd\src\strawberry.5.38\perl +\lib\CORE\libperl538.a" -lmoldname -lkernel32 -luser32 -lgdi32 -lwins +pool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -l +uuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 +-Wl,--enable-auto-image-base //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_6 +4-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/dllcrt +2.o: Invalid argument //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_6 +4-w64-mingw32/13.1.0/crtbegin.o: Invalid argument //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lmoldname: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lkernel32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -luser32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lgdi32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lwinspool: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lcomdlg32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -ladvapi32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lshell32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lole32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -loleaut32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lnetapi32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -luuid: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lws2_32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lmpr: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lwinmm: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lversion: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lodbc32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lodbccp32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lcomctl32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lmingw32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lgcc: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lmoldname: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lmingwex: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lmsvcrt: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lkernel32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lpthread: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -ladvapi32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lshell32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -luser32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lkernel32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lmingw32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lgcc: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lmoldname: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lmingwex: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lmsvcrt: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd -lkernel32: No such file or directory //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w6 +4-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot fi +nd //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_6 +4-w64-mingw32/13.1.0/crtend.o: Invalid argument collect2.exe: error: ld returned 1 exit status gmake: *** [makefile:480: blib\arch\auto\Bit\Vector\Vector.xs.dll] Err +or 1 -> FAIL Installing Bit::Vector failed. See T:\hyd\src\strawberry.5.38\ +data\.cpanm\work\1719906315.9776\build.log for details. Retry with -- +force to force install it. -> FAIL Installing the dependencies failed: Module 'Bit::Vector' is no +t installed -> FAIL Bailing out the installation for Date-Calc-6.4.

Replies are listed 'Best First'.
Re: Perl 5.38 64 bit cpanm fails
by syphilis (Archbishop) on Jul 02, 2024 at 11:34 UTC
    Firstly, all of those libraries that can't be found (ie libmoldname.a, libkernel32.a, libuser32.a, etc.) should be located in your strawberry\c\x86_64-w64-mingw32\lib directory.
    Please check that they are there.

    Secondly, that directory should be specified (along with some others) in $Config{libpth}.
    This is most easily checked by examining the output of perl -V:libpth

    Could you also provide the output of running perl -V

    Cheers,
    Rob

      I suspect my Perl install is confused somehow. I installed the portable version in a non-standard place of T:\hyd\src\strawberry.5.38 under the understanding that I coud install Perl anywhere these days - I know it used to be c:\strawberry or nothing!

      Perl -Vlibpath
      shows
      libpth='T:\hyd\src\strawberry.5.38\c\lib T:\hyd\src\strawberry.5.38\c\ +x86_64-w64-mingw32\lib T:\hyd\src\strawberry.5.38\c\lib\gcc\x86_64-w6 +4- mingw32\13.1.0';

      Everything looks good there. It's worth noting that T: drive is a share of \\k030\hydprime\cnd and the error I get on a build are something like

      //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmoldname: No such file or directory

      The files are there when I look down the T: tree. However note the forward slashes on the error message - very Unix and not at all Windows-like. I don't really understand why the T: turns into //k030/HydPrime/cnd. I suspect that's the real problem! I'll try installing at c:\strawberry and see if the issues go away!

        I installed the portable version in a non-standard place of T:\hyd\src\strawberry.5.38 under the understanding that I could install Perl anywhere these days

        Yes - that's usually not a problem.
        I suspect that the main problem is that the "T:drive is a share of \\k030\hydprime\cnd".
        I've no experience of that hoop, nor of how to jump through it ;-)

        Cheers,
        Rob
Re: Perl 5.38 64 bit cpanm fails
by swl (Prior) on Jul 02, 2024 at 22:20 UTC

    I suspect something is awry with your setup. I just ran cpanm --look Compress::Raw::Zlib using Strawberry Perl 5.38.2.2 and the build and test worked without issue.

    If you are using the portable version then have you run the portableshell.bat that lives in the top of the Strawberry Perl directory? If you installed using the MSI then does the path include .../perl/bin, .../c/bin and .../perl/site/bin?

    Edit:

    The issue with Statistics::R is related to the removal of dot-in-inc in perl 5.26: https://metacpan.org/release/XSAWYERX/perl-5.26.0/view/pod/perldelta.pod#Notice.

    It can be built manually using this sequence (uncomment the last line to install):

    cpanm --look Statistics::R perl -I. Makefile.PL gmake test ::gmake install

    One of the tests fails on my system but it seems to be due to buffering of messages to stderr. I have not looked further.

    t/03-run.t ......... 4/? # R version 4.1.0 found at C:\Program Files\R +\R-4.1.0\bin\x64\R.EXE # Failed test 'IO' # at t/03-run.t line 53. # got: '' # expected: 'Some innocuous message on stderr' # Failed test at t/03-run.t line 56. # got: 'Some innocuous message on stderrSome innocuous messag +e on stdout' # expected: 'Some innocuous message on stdout' # Looks like you failed 2 tests of 21. t/03-run.t ......... Dubious, test returned 2 (wstat 512, 0x200) Failed 2/21 subtests

    (Edit2 - maybe it's not dot-in-inc since cpan testers has it passing on linux for later versions, nonetheless the above works with Strawberry Perl).

      I suspect something is awry with your setup

      Yes - there's some weird stuff going on there.
      I've just noticed that the ld.exe that's being executed is the one that's in strawberry/c/x86_64-w64-mingw32/bin (even though that location is usually NOT present in the path) instead of the usual strawberry/c/bin/ld.exe.

      And, if ld.exe is being accessed as //k030/HydPrime/cnd/hyd/src/strawberry.5.38/c/x86_64-w64-mingw32/bin/ld.exe then I'm not sure what $Config{libpth} needs to look like.

      Cheers,
      Rob
Re: Perl 5.38 64 bit cpanm fails
by phew47 (Novice) on Jul 03, 2024 at 11:47 UTC

    Thanks everyone for your help. It was clear that installing Strawberry Perl on a network drive was the cause of the problem, as somehow cpanm was expanding T: drive to //k030/HydPrime/cnd, when it should have expanded to \\k030\HydPrime\cnd if it was going to expand anything, tho it really should have just used T:. Anyway the solution was to build on C: drive, and everything just worked! Then I copied it across to T: drive and all was good.

Re: Perl 5.38 64 bit cpanm fails
by etj (Priest) on Sep 19, 2024 at 14:20 UTC