Skip Menu |

This queue is for tickets about the PAR-Packer CPAN distribution.

Report information
The Basics
Id: 116056
Status: resolved
Priority: 0/
Queue: PAR-Packer

People
Owner: Nobody in particular
Requestors: kbrown [...] cornell.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.030
Fixed in: (no value)



Subject: Fixes for Cygwin build of PAR::Packer
Date: Mon, 11 Jul 2016 15:15:06 -0400
To: bug-par [...] rt.cpan.org
From: Ken Brown <kbrown [...] cornell.edu>
There are two problems with the build of PAR::Packer 1.033 on Cygwin: 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. 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: $ perl -e 'use Config; print $Config{archname}' cygwin-thread-multi $ perl -e 'use Config; print $Config{myuname}' cygwin_nt-6.3 cygwin 2.5.1(0.29753) 2016-04-21 22:14 x86_64 cygwin So PAR::Packer should use myuname on Cygwin instead of archname. See the attached x86_64_cygwin.patch. (This comes from a patch used by Yaakov Selkowitz, the Cygwin maintainer of PAR::Packer.) Ken

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

Am 2016-07-11 15:15:22, kbrown@cornell.edu schrieb: Show quoted text
> 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. Show quoted text
> 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. I'll look into why this undefined reference appears. Show quoted text
> 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. Cheers, Roderich
Subject: Re: [rt.cpan.org #116056] Fixes for Cygwin build of PAR::Packer
Date: Wed, 13 Jul 2016 10:02:35 -0400
To: bug-PAR-Packer [...] rt.cpan.org
From: Ken Brown <kbrown [...] cornell.edu>
On 7/13/2016 6:26 AM, Roderich Schupp via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=116056 > > > Am 2016-07-11 15:15:22, kbrown@cornell.edu 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. Show quoted text
>> 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 Show quoted text
>> 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
On 2016-07-13 10:02:51, kbrown@cornell.edu wrote: Show quoted text
> >> 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;
The reason is that boot.o is compiled with something like -fstack-protector-strong (hence stack checks are compiled in), but boot.exe is linked without this flag (which would have linked the library implementing these checks). OK, so $static_ldflags is back, but this time the suppression of -l<perl lib> works. I've committed both fixes at https://www.openfoundry.org/svn/par/PAR-Packer/trunk - can you give it a try? Cheers, Roderich
Subject: Re: [rt.cpan.org #116056] Fixes for Cygwin build of PAR::Packer
Date: Sat, 16 Jul 2016 13:09:34 -0400
To: bug-PAR-Packer [...] rt.cpan.org
From: Ken Brown <kbrown [...] cornell.edu>
On 7/16/2016 12:38 PM, Roderich Schupp via RT wrote: Show quoted text
> I've committed both fixes at https://www.openfoundry.org/svn/par/PAR-Packer/trunk - > can you give it a try?
Works for me. Thanks. Ken
On 2016-07-16 13:09:45, kbrown@cornell.edu wrote: Show quoted text
> Works for me.
Thanks for testing! Released as 1.034. Cheers, Roderich