Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: PAR::Packer fails to install

by GrandFather (Saint)
on Sep 14, 2020 at 03:32 UTC ( [id://11121708]=note: print w/replies, xml ) Need Help??


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

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

Replies are listed 'Best First'.
Re^4: PAR::Packer fails to install
by syphilis (Archbishop) on Sep 14, 2020 at 04:03 UTC
    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??
        First, I don't have a c:\perl

        You are right.
        The post to which you have replied was in response to GrandFather's issue - which was a totally separate issue to the one that you (and I) experienced.

        I wonder what cpanm does that plain old cpan didn't??

        Interesting that cpanm gets the job done. It works for me, too.
        I don't know how it avoids the problem that the cpan utility encounters, and I couldn't spot any bug reports that seemed relevant.
        I was thinking that it must be a bug in the cpan utility, but that is NOT so - because when I try to build PAR-Packer-1.050 the ol' fashioned manual way (without using the cpan utiity) I get the same 6 test failures.
        It's a bug in PAR::Packer's t/20-pp.t script, and the use of the cpanm utility is currently the only way of working around that bug.

        This bug in PAR-Packer should be reported.
        We know that it's limited to Windows 10. At least we know it doesn't afflict Windows 7.
        We probably ought to determine the earliest version of PAR::Packer that exhibits the bug.
        I don't have time for this right now ... perhaps I will later on ... or perhaps someone else can follow this through.

        Cheers,
        Rob
Re^4: PAR::Packer fails to install
by swl (Parson) on Sep 14, 2020 at 04:03 UTC

    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

        Yes the path is the issue, and yes I installed using the .msi. I'm using berrybrew at home now so maybe I'll have fewer problems for stuff I care about. Since this was more about exploring another Monk's problem I'll not bother fixing it on my work machine and hope that when I encounter the problem next time I'll remember! (Fat chance!)

        Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11121708]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-19 20:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found