in reply to Re: PAR::Packer fails to install
in thread PAR::Packer fails to install

Maybe Rob will come to the rescue?

I can't reproduce GrandFather's issue on either Windows 7 or Windows 10. Could there be some interference from another (earlier ?) Strawberry installation ?

I can, however, reproduce BernieC's issue (on Windows 10 only):
C:\_32\comp\PAR-Packer-1.050>perl -Mblib t/20-pp.t 1..34 ok 1 - pp_hello_1 . . I will do test pp_hello_to_log_file even though it DOES NOT REALLY TES +T ANYTHING. At least it may show that the --log=cswitch does not ha +rm anything. The system cannot execute the specified program. not ok 26 - pp_hello_to_log_file # [430] # Test 26_0 The command string " a.exe " in directory C:\_32\comp\PAR- +Packer-1.050\contrib\automated_pp_test\pp_switch_tests\temp2,did not +produce :: "hello" :: # Instead, it produced :: 'a.exe' is not recognized as an internal or +external command, # operable program or batch file. :: # End of [430] results # # Did "c:\_64\strawb~3.0\perl\bin\perl.exe" "C:\_32\comp\PAR-Packer-1. +050\blib\script\pp" hello.pl -v --log=c.txt produce a.exe? # # Failed test 'pp_hello_to_log_file # [430] # Test 26_0 The command string " a.exe " in directory C:\_32\comp\PAR- +Packer-1.050\contrib\automated_pp_test\pp_switch_tests\temp2,did not +produce :: "hello" :: # Instead, it produced :: 'a.exe' is not recognized as an internal or +external command, # operable program or batch file. :: # End of [430] results # # Did "c:\_64\strawb~3.0\perl\bin\perl.exe" "C:\_32\comp\PAR-Packer-1. +050\blib\script\pp" hello.pl -v --log=c.txt produce a.exe? # ' # at ./automated_pp_test.pl line 8001. The system cannot execute the specified program. not ok 27 - pp_name_four_ways # amsg326: sub pp_name_four_ways: # [430] # Test 27_0 The command string " a.exe " in directory C:\_32\comp\PAR- +Packer-1.050\contrib\automated_pp_test\pp_switch_tests\temp0,did not +produce :: "hello" :: # Instead, it produced :: 'a.exe' is not recognized as an internal or +external command, # operable program or batch file. :: # End of [430] results # # Failed test 'pp_name_four_ways # amsg326: sub pp_name_four_ways: # [430] # Test 27_0 The command string " a.exe " in directory C:\_32\comp\PAR- +Packer-1.050\contrib\automated_pp_test\pp_switch_tests\temp0,did not +produce :: "hello" :: # Instead, it produced :: 'a.exe' is not recognized as an internal or +external command, # operable program or batch file. :: # End of [430] results # ' # at ./automated_pp_test.pl line 8046. The system cannot execute the specified program. not ok 28 - pp_minus_v_tests Test 28_0 # # [430] # Test 28_0 The command string " a.exe " in directory C:\_32\comp\PAR- +Packer-1.050\contrib\automated_pp_test\pp_switch_tests\temp1,did not +produce :: "hello" :: # Instead, it produced :: 'a.exe' is not recognized as an internal or +external command, # operable program or batch file. :: # End of [430] results # # Did "c:\_64\strawb~3.0\perl\bin\perl.exe" "C:\_32\comp\PAR-Packer-1. +050\blib\script\pp" -v 1 hello.pl > v_1.txt produce a.exe? # # Failed test 'pp_minus_v_tests Test 28_0 # # [430] # Test 28_0 The command string " a.exe " in directory C:\_32\comp\PAR- +Packer-1.050\contrib\automated_pp_test\pp_switch_tests\temp1,did not +produce :: "hello" :: # Instead, it produced :: 'a.exe' is not recognized as an internal or +external command, # operable program or batch file. :: # End of [430] results # # Did "c:\_64\strawb~3.0\perl\bin\perl.exe" "C:\_32\comp\PAR-Packer-1. +050\blib\script\pp" -v 1 hello.pl > v_1.txt produce a.exe? # ' # at ./automated_pp_test.pl line 8092. ok 29 - pp_minus_V ok 30 - pp_help_tests The system cannot execute the specified program. The system cannot execute the specified program. The system cannot execute the specified program. The system cannot execute the specified program. not ok 31 # TODO & SKIP Not yet clean The system cannot execute the specified program. C:\_32\comp\PAR-Packer-1.050\blib\script\pp: Cannot open hello.exe for + reading: No such file or directory at C:\_32\comp\PAR-Packer-1.050\b +lib\lib/PAR/Packer.pm line 1216, <DATA> line 1. not ok 32 - pp_gui_tests # amsg572: sub pp_gui_tests cannot system "c:\_64\strawb~3.0\perl\bin\ +perl.exe" "C:\_32\comp\PAR-Packer-1.050\blib\script\pp" --gui -o hell +o.exe hello.pl:Inappropriate I/O control operation: # # Failed test 'pp_gui_tests # amsg572: sub pp_gui_tests cannot system "c:\_64\strawb~3.0\perl\bin\ +perl.exe" "C:\_32\comp\PAR-Packer-1.050\blib\script\pp" --gui -o hell +o.exe hello.pl:Inappropriate I/O control operation: # ' # at ./automated_pp_test.pl line 8269. The system cannot execute the specified program. not ok 33 - pp_test_small_minus_a # [300]sub pp_test_small_minus_a: cannot copy hello.exe to C:\_32\comp +\PAR-Packer-1.050\contrib\automated_pp_test\pp_switch_tests\temp0/sub +dir1 # # Did "c:\_64\strawb~3.0\perl\bin\perl.exe" "C:\_32\comp\PAR-Packer-1. +050\blib\script\pp" -o hello.exe -a "C:\_32\comp\PAR-Packer-1.050\con +trib\automated_pp_test\pp_switch_tests\temp0\text" hello.pl produce h +ello.exe? # # Failed test 'pp_test_small_minus_a # [300]sub pp_test_small_minus_a: cannot copy hello.exe to C:\_32\comp +\PAR-Packer-1.050\contrib\automated_pp_test\pp_switch_tests\temp0/sub +dir1 # # Did "c:\_64\strawb~3.0\perl\bin\perl.exe" "C:\_32\comp\PAR-Packer-1. +050\blib\script\pp" -o hello.exe -a "C:\_32\comp\PAR-Packer-1.050\con +trib\automated_pp_test\pp_switch_tests\temp0\text" hello.pl produce h +ello.exe? # ' # at ./automated_pp_test.pl line 8314. The system cannot execute the specified program. not ok 34 - pp_test_large_minus_A # [430] # Test 34_0 The command string " hello.exe " in directory C:\_32\comp\ +PAR-Packer-1.050\contrib\automated_pp_test\pp_switch_tests\temp1,did +not produce :: "hello01hello02" :: # Instead, it produced :: 'hello.exe' is not recognized as an internal + or external command, # operable program or batch file. :: # End of [430] results # # Did "c:\_64\strawb~3.0\perl\bin\perl.exe" "C:\_32\comp\PAR-Packer-1. +050\blib\script\pp" -o hello.exe -A all_text_files -a all_text_files + hello.pl produce hello.exe? # # Failed test 'pp_test_large_minus_A # [430] # Test 34_0 The command string " hello.exe " in directory C:\_32\comp\ +PAR-Packer-1.050\contrib\automated_pp_test\pp_switch_tests\temp1,did +not produce :: "hello01hello02" :: # Instead, it produced :: 'hello.exe' is not recognized as an internal + or external command, # operable program or batch file. :: # End of [430] results # # Did "c:\_64\strawb~3.0\perl\bin\perl.exe" "C:\_32\comp\PAR-Packer-1. +050\blib\script\pp" -o hello.exe -A all_text_files -a all_text_files + hello.pl produce hello.exe? # ' # at ./automated_pp_test.pl line 8359. # Looks like you failed 6 tests of 34.
And that's about all the help you'll get from the test suite, which clobbers everything as it goes - thereby ensuring that a full diagnosis is more difficult and frustrating than it would otherwise be.
The first 3 failures apparently expect to execute a file named "a.exe", but are unable to do that either because the executable was not created, or because it was created with a different name (or extension).
The last 3 failures apparently expect to (respectively) open, copy and execute a file named "hello.exe" and fail because a file of that name is also unlocatable - probably for the same reason that "a.exe" could not be found.

I'm not really familiar with either Windows 10 or PAR::Packer, as I hardly ever use either of them.
But if someone wants to provide some directions on how the problem might be diagnosed, then I don't mind following those directions if it helps out.
I think that if I wanted to use PAR::Packer on Windows 10 then I would just force install it (cpan -fi PAR::Packer), and be somewhat confident that it's going to be quite serviceable for general purposes.

Cheer,
Rob

Replies are listed 'Best First'.
Re^3: PAR::Packer fails to install
by GrandFather (Saint) on Sep 14, 2020 at 03:32 UTC

    I have just uninstalled Strawberry Perl and reinstalled it then attempted to install PAR::Packer with:

    cpanm PAR::Packer C:\>cpanm --force PAR::Packer --> Working on PAR::Packer Fetching http://www.cpan.org/authors/id/R/RS/RSCHUPP/PAR-Packer-1.050. +tar.gz ... OK Configuring PAR-Packer-1.050 ... OK Building and testing PAR-Packer-1.050 ... FAIL ! Installing PAR::Packer failed. See C:\...\build.log for details. Ret +ry with --force to force install it.

    Using the force produced the same result. The log contents look happy until:

    gmake[1]: Entering directory 'C:/.../PAR-Packer-1.050/myldr' Makefile:870: warning: overriding recipe for target '.c.o' Makefile:340: warning: ignoring old recipe for target '.c.o' "C:\Strawberry\perl\bin\perl.exe" par_pl2c.pl my_par_pl < ..\script\pa +r.pl > my_par_pl.c gcc -c -DWIN32 -DWIN64 -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPT +S -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -f +no-strict-aliasing -mms-bitfields -I"C:\STRAWB~1\perl\lib\CORE" -DL +DLIBPTHNAME=\"\" -DPARL_EXE=\"parl.exe\" -DPAR_PACKER_VERSION=\"1.050 +\" -s -O2 main.c In file included from C:/STRAWB~1/perl/lib/CORE/perl.h:6158, from main.c:2: C:/STRAWB~1/perl/lib/CORE/inline.h: In function `Perl_is_utf8_invarian +t_string_loc': C:/STRAWB~1/perl/lib/CORE/inline.h:451: warning: cast from pointer to +integer of different size C:/STRAWB~1/perl/lib/CORE/inline.h:451: warning: cast from pointer to +integer of different size C:/STRAWB~1/perl/lib/CORE/inline.h:451: warning: cast from pointer to +integer of different size C:/STRAWB~1/perl/lib/CORE/inline.h:454: warning: cast from pointer to +integer of different size C:/STRAWB~1/perl/lib/CORE/inline.h:459: warning: cast from pointer to +integer of different size gcc -c -DWIN32 -DWIN64 -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPT +S -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -f +no-strict-aliasing -mms-bitfields -I"C:\STRAWB~1\perl\lib\CORE" -DL +DLIBPTHNAME=\"\" -DPARL_EXE=\"parl.exe\" -DPAR_PACKER_VERSION=\"1.050 +\" -s -O2 -DBYTEORDER=0x12345678 -DU64TYPE="unsigned long long" sha1. +c windres -i winres/pp.rc -o ppresource.coff --input-format=rc --output- +format=coff --target=pe-x86-64 C:\Perl\site\lib\auto\MinGW\bin\windres.exe: Can't detect target endia +ness and architecture. gmake[1]: *** [Makefile:880: ppresource.coff] Error 1 gmake[1]: Leaving directory 'C:/.../PAR-Packer-1.050/myldr' gmake: *** [Makefile:545: subdirs] Error 2 -> FAIL Installing PAR::Packer failed. See C:\...\build.log for detail +s. Retry with --force to force install it. 2 distributions installed

    The interesting bit seems to be

    C:\Perl\site\lib\auto\MinGW\bin\windres.exe: Can't detect target endia +ness and architecture. gmake[1]: *** [Makefile:880: ppresource.coff] Error 1
    which is related to windres -i winres/pp.rc ... --target=pe-x86-64. However pe-x86-64 doesn't seem to be a valid target on my system. windres --help reports:

    C:\Perl\site\lib\auto\MinGW\bin\windres.exe: supported targets: pe-i38 +6 pei-i386 elf32-i386 elf32-little elf32-big srec symbolsrec tekhex b +inary ihex

    I've no idea how to fix that.

    Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
      C:\Perl\site\lib\auto\MinGW\bin\windres.exe

      I don't think that's Strawberry's windres.exe.
      I expect that the correct windres.exe is in C:/STRAWB~1/c/bin.

      You should be seeing:
      supported targets: pe-x86-64 pei-x86-64 pe-bigobj-x86-64 elf64-x86-64 +elf64-l1om elf64-k1om pe-i386 pei-i386 elf32-i386 elf32-iamcu elf64-l +ittle elf64-big elf32-little elf32-big plugin srec symbolsrec verilog + tekhex binary ihex
      In fact, it may well be that the compiler in use is C:\Perl\site\lib\auto\MinGW\bin\gcc.exe - which might explain the other issues with inline.h.
      (You might need to fiddle with your PATH ;-)

      Cheers,
      Rob
        First, I don't have a c:\perl. Second, I ran windres directly out of the Strawberry\c\bin directory and got:
        windres: supported targets: pe-x86-64 pei-x86-64 pe-bigobj-x86-64 elf6 +4-x86-64 elf64-l1om elf64-k1om pe-i386 pei-i386 elf32-i386 elf32-iamc +u elf64-little elf64-big elf32-little elf32-big plugin srec symbolsre +c verilog tekhex binary ihex Report bugs to <http://www.sourceware.org/bugzilla/>
        and my PATH is
        C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\sy +stem32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\Window +sPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;D:\BIN;;C:\Program Fil +es (x86)\Bitvise SSH Client;C:\Program Files (x86)\Intel\Intel(R) Man +agement Engine Components\DAL;C:\Program Files\Intel\Intel(R) Managem +ent Engine Components\DAL;C:\Strawberry\c\bin;C:\Strawberry\perl\site +\bin;C:\Strawberry\perl\bin;C:\Users\win10\AppData\Local\Microsoft\Wi +ndowsApps;d:\perl;D:\Perl\rcs\bin\win32;D:\LaTeX\texlive\2019\bin\win +32;C:\Program Files (x86)\EaseUS\Todo Backup\bin\x64\
        I'm not sure where this leaves me but I have a strange/amazing result. I tried, as recommended, "cpanm -v PAR::Packer" and look at what I got:
        Successfully installed PAR-Packer-1.050 Installing C:\STRAWB~1\perl\site\lib\MSWin32-x64-multi-thread\.meta\PA +R-Packer-1.050\install.json Installing C:\STRAWB~1\perl\site\lib\MSWin32-x64-multi-thread\.meta\PA +R-Packer-1.050\MYMETA.json 1 distribution installed
        and confirmed with:
        C:\Strawberry\c\bin>perldoc PAR::Packer NAME PAR::Packer - PAR Packager DESCRIPTION This module implements the App::Packer::Backend interface, for generating stand-alone executables, perl scripts and PAR files. Currently, this module is used by the command line tool pp interna +lly, as well as by the contributed contrib/gui_pp/gpp program. Since version 0.97 of PAR, this module and its related tools such +as "pp" have been stripped from the PAR distribution and are now distributed as the "PAR-Packer" distribution so that PAR users nee +d not necessarily have a C compiler. ....
        I wonder what cpanm does that plain old cpan didn't??

      Are the Strawberry perl dirs at the front of the path? e.g., in my case the first three entries are:

      PATH=C:\berrybrew\5.32.0_64\perl\site\bin;C:\berrybrew\5.32.0_64\perl\ +bin;C:\berrybrew\5.32.0_64\c\bin;

      I wonder if something else is getting in the way? The Git for Windows MSYS shell has caused problems in the past, for example.

        Are the Strawberry perl dirs at the front of the path?

        If you've installed Strawberry Perl from the .msi installer, then the answer is "no". This is something that has created problems in the past
        AFAIK, that installer always places the Strawberry perl dirs at the end of the path.
        This makes it tricky if you have multiple perls and/or multiple anything-that-is-included-in-strawberry/c/bin.

        It makes far better sense to run a portableshell.bat (or similar) which puts everything at the beginning of the PATH.
        That way, even if there is another compiler (or whatever) in the PATH, perl is still using the one that it's meant to use.

        I go one step further and make sure that there is no perl or C compiler in my PATH, until I run a batch script (eg portableshell.bat) that places the perl/compiler combination of my choice at the start of the PATH.

        Cheers,
        Rob