Re: PAR::Packer cpan install problems on Strawberry Perl

2012-10-06 Thread Roderich Schupp
On Sat, Oct 6, 2012 at 1:00 AM, Mark Dootson mark.doot...@znix.com wrote:
 Anyhow, what needs to happen is someone finding the time to install and test
 the above four setups with choice of
 a) single line or two step resource creation.
 b) explicit architecture or rely on defaults.

Thanks, Mark.
I urge all readers with access to Strawberry or ActiveState Perl
installations (using
the MIngW toolchain) to try Mark's patch and post the results.
I'm putting together the next release of PAR::Packer and this one of the most
reported bugs. The other is for Strawberry Perl 5.16 linking against libstdc++
which I'm currently working on.

Cheers, Roderich


Re: PAR::Packer cpan install problems on Strawberry Perl

2012-10-05 Thread Mark Dootson

Hi,

This particular problem has several alternate solutions posted to this 
list. The main problem is that the acceptable parameters to some 
binutils progs are a moving target so what works on my gcc may not work 
on your gcc.


For Strawberry see kmx post of 24 May 2012 to this list or

https://rt.cpan.org/Public/Bug/Display.html?id=77408

I would suggest this needs to work (for MinGW flavours) on the MinGW for 
Strawberry 32 and 64 bit and the MinGW installed by ActivePerl PPM for 
32 and 64 bit - all of which will have different binutils versions.


I posted the patch below in February but I now can't remember which 
versions of binutils I tested against. It certainly wasn't tested 
against the 64 bit MinGW ActivePerl currently installs.


Anyhow, what needs to happen is someone finding the time to install and 
test the above four setups with choice of

a) single line or two step resource creation.
b) explicit architecture or rely on defaults.

I think my experience was all the versions I tried supported the single 
line resource compilation and relying on default architectures worked 
fine - but that was February and kmx's different patches are proven to 
work with Strawberry.


Hope It Helps

Mark


Index: myldr/Makefile.PL
===
--- myldr/Makefile.PL   (revision 1354)
+++ myldr/Makefile.PL   (working copy)
@@ -115,8 +115,13 @@
 if( $^O =~ /^(?:MSWin|cygwin)/ ){
$res = 'ppresource.coff';
$pre_res = qq(winres\\pp.res);
-   $rt_cmd = qq(windres -F pei-i386 -i winres\\pp.rc -o $pre_res);
-   $res_cmd = qq(windres -o ppresource.coff $pre_res);
+
+   # some versions of binutils cannot handle two-step creation
+   #$rt_cmd = qq(windres -F pei-i386 -i winres\\pp.rc -o $pre_res);
+   #$res_cmd = qq(windres -o ppresource.coff $pre_res);
+   $rt_cmd = qq(windres -o ppresource.coff -i winres\\pp.rc);
+   $res_cmd = q(-$(NOOP));
+
$res_section = $res;
 }
 $mt_cmd = '-$(NOOP)';
Index: myldr/winres/pp.rc
===
--- myldr/winres/pp.rc  (revision 1354)
+++ myldr/winres/pp.rc  (working copy)
@@ -5,7 +5,7 @@
 #define PP_MANIFEST_FILEFLAGS 0
 #include windows.h

-CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST pp.manifest
+CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST winres\\pp.manifest

 VS_VERSION_INFO VERSIONINFO
 FILEVERSION0,0,0,0
@@ -37,5 +37,5 @@
 END
 END

-WINEXE ICON pp.ico
+WINEXE ICON winres\\pp.ico






On 04/10/2012 16:32, smu johnson wrote:

Hi,

I got this email address from Steffen Müller, after he mentioned on IRC
that he no longer maintains PAR::Packer.

I'm not sure if anyone in charge knows yet, but this module hasn't compiled
on Strawberry Perl for the last few years.  There was a time I could get it
working by using a somewhat old version of the module, but even after
trying all the old versions I can find from https://metacpan.org/ last
week they still result in the same problem(s).  I decided to finally
write in after seeing a surprising amount of people joining #win32 on
irc.perl.org and asking about it.

All that is needed to demonstrate this is install any recent version of
Strawberry Perl, and run:  cpan PAR::Packer on Windows.

Can anything be done?  Any information would be greatly appreciated.  Thank
you, to whoever reads this.  I'd be more than happy to be the mule that
attempts to try different versions to see if any suggested patch might make
this work again.

Here is an error log, from the command:  cpan PAR::Packer 1  pp-error.txt
21

=

CPAN: CPAN::SQLite loaded ok (v0.202)
Database was generated on Thu, 04 Oct 2012 15:16:25 GMT
Running install for module 'PAR::Packer'
Running make for R/RS/RSCHUPP/PAR-Packer-1.013.tar.gz
CPAN: Digest::SHA loaded ok (v5.71)
CPAN: Compress::Zlib loaded ok (v2.055)
Checksum for
C:\strawberry\cpan\sources\authors\id\R\RS\RSCHUPP\PAR-Packer-1.013.tar.gz
ok
CPAN: Archive::Tar loaded ok (v1.88)
CPAN: File::Temp loaded ok (v0.22)
CPAN: Parse::CPAN::Meta loaded ok (v1.4404)
CPAN: CPAN::Meta loaded ok (v2.120921)
CPAN: Module::CoreList loaded ok (v2.70)

   CPAN.pm: Building R/RS/RSCHUPP/PAR-Packer-1.013.tar.gz

Checking if your kit is complete...
Looks good
Prototype mismatch: sub main::prompt: none vs ($;$) at
C:/strawberry/perl/lib/ExtUtils/MakeMaker.pm line 219.
Writing Makefile for par.exe
Writing MYMETA.yml and MYMETA.json
Writing Makefile for PAR::Packer
Writing MYMETA.yml and MYMETA.json
cp lib/App/Packer/PAR.pm blib\lib\App\Packer\PAR.pm
cp lib/PAR/Packer.pm blib\lib\PAR\Packer.pm
cp lib/PAR/Filter/Obfuscate.pm blib\lib\PAR\Filter\Obfuscate.pm
cp lib/PAR/Filter/PodStrip.pm blib\lib\PAR\Filter\PodStrip.pm
cp lib/PAR/StrippedPARL/Base.pm blib\lib\PAR\StrippedPARL\Base.pm
cp lib/PAR/Filter.pm blib\lib\PAR\Filter.pm
cp lib/PAR/Filter/PatchContent.pm blib\lib\PAR\Filter\PatchContent.pm
cp lib/PAR/Filter/Bytecode.pm blib\lib\PAR\Filter\Bytecode.pm
cp lib/pp.pm blib\lib\pp.pm
cp