Re: [rt.cpan.org #116056] Fixes for Cygwin build of PAR::Packer

"Ken Brown via RT" <[email protected]>
Newsgroups gmane.comp.lang.perl.par
Message-ID <[email protected]>
Wed Jul 13 10:02:51 2016: Request 116056 was acted upon.
Transaction: Correspondence added by [email protected]
       Queue: PAR-Packer
     Subject: Re: [rt.cpan.org #116056] Fixes for Cygwin build of PAR::Packer
   Broken in: 1.030
    Severity: (no value)
       Owner: Nobody
  Requestors: [email protected]
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=116056 >


On 7/13/2016 6:26 AM, Roderich Schupp via RT wrote:
> <URL: https://rt.cpan.org/Ticket/Display.html?id=116056 >
> 
> Am 2016-07-11 15:15:22, [email protected] schrieb:
>> There are two problems with the build of PAR::Packer 1.033 on Cygwin:
> 
> Thanks for reporting these problems. Next time, please do not lump
> several problems into one bug, but submit diffrent bug reports for ach.

OK, sorry about that.

>> 1. The build fails with "undefined reference to `__stack_chk_fail'". 
>> This happens starting with version 1.030 due to the removal of the line
>>
>>    $boot_ldflags .= $static_ldflags;
>>
>> from Makefile.PL.  Adding that line back (see the attached 
>> boot_ldflags.patch) fixes the problem.
> 
> That's definitively the wrong fix, boot.exe is a standalone executable
> that has no dependencies or perl stuff.

How about something like this:

--- origsrc/PAR-Packer-1.033/myldr/Makefile.PL	2016-05-12 03:20:37.000000000 -0400
+++ src/PAR-Packer-1.033/myldr/Makefile.PL	2016-07-13 09:48:08.177541500 -0400
@@ -370,7 +370,7 @@ $parldyn_exe: $par_exe
 boot$o: \$(MKTMP_STUFF) boot_embedded_files.c
 
 $boot_exe: boot$o
-	\$(LD) boot$o $boot_ldflags $res $out$boot_exe_link
+	\$(LD) boot$o \$(LDFLAGS) $boot_ldflags $res $out$boot_exe_link
 	$mt_cmd
 
 boot_embedded_files.c: $par_exe


>> 2. The method for detecting a 64-bit system in Makefile.PL, based on 
>> $Config{archname}, doesn't work on 64-bit Cygwin.  Here we have the 
>> following:
>> ...
>> So PAR::Packer should use myuname on Cygwin instead of archname.  See 
>> the attached x86_64_cygwin.patch. 
> 
> A better solution is to use $Config{ptrsize} (4 or 8) to differentiate
> between 32 bit and 64 bit systems.

Agreed.

Ken
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.