Re: [rt.cpan.org #118053] Problem with packed perl archive for biber on 64-bit Cygwin

2016-09-27 Thread Ken Brown via RT
Tue Sep 27 11:23:32 2016: Request 118053 was acted upon.
Transaction: Correspondence added by kbr...@cornell.edu
   Queue: PAR-Packer
 Subject: Re: [rt.cpan.org #118053] Problem with packed perl archive for 
biber on 64-bit Cygwin
   Broken in: (no value)
Severity: (no value)
   Owner: Nobody
  Requestors: kbr...@cornell.edu
  Status: open
 Ticket https://rt.cpan.org/Ticket/Display.html?id=118053 >


It looks like David Carlisle's issue is completely unrelated, so I think 
you can apply your change and close this ticket.

Thanks again for your help.

Ken



Re: [rt.cpan.org #118053] Problem with packed perl archive for biber on 64-bit Cygwin

2016-09-26 Thread Roderich Schupp via RT
Mon Sep 26 13:34:36 2016: Request 118053 was acted upon.
Transaction: Correspondence added by roderich.sch...@gmail.com
   Queue: PAR-Packer
 Subject: Re: [rt.cpan.org #118053] Problem with packed perl archive for 
biber on 64-bit Cygwin
   Broken in: (no value)
Severity: (no value)
   Owner: Nobody
  Requestors: kbr...@cornell.edu
  Status: open
 Ticket https://rt.cpan.org/Ticket/Display.html?id=118053 >


On Mon, Sep 26, 2016 at 7:23 PM, Ken Brown via RT <
bug-par-pac...@rt.cpan.org> wrote:

> No, they were actually both going to the root of the cache directory.
> So you're explanation makes perfect sense.
>

You're absolutely right. --link stuff goes into folder "shlib" in the
packed executable viewed as a zip,
but gets extracted into the root of the cache directory.

Cheers, Roderich



Re: [rt.cpan.org #118053] Problem with packed perl archive for biber on 64-bit Cygwin

2016-09-26 Thread Ken Brown via RT
Mon Sep 26 13:23:05 2016: Request 118053 was acted upon.
Transaction: Correspondence added by kbr...@cornell.edu
   Queue: PAR-Packer
 Subject: Re: [rt.cpan.org #118053] Problem with packed perl archive for 
biber on 64-bit Cygwin
   Broken in: (no value)
Severity: (no value)
   Owner: Nobody
  Requestors: kbr...@cornell.edu
  Status: open
 Ticket https://rt.cpan.org/Ticket/Display.html?id=118053 >


On 9/26/2016 1:16 PM, Roderich Schupp via RT wrote:
> https://rt.cpan.org/Ticket/Display.html?id=118053 >
>
> On Mon, Sep 26, 2016 at 3:51 PM, Ken Brown via RT <
> bug-par-pac...@rt.cpan.org> wrote:
>
>> The change was to remove
>> these two arguments from the invocation of pp:
>>
>>--link=/usr/bin/cygssp-0.dll
>>--link=/usr/bin/cygcrypt-0.dll
>>
>
> I was going to suggest that as well: these result in a second copy of the
> DLL to be unpacked - while the first copy is probably already in use.
> Which Windows doesn't allow i(the Linux equivalent error would be EBUSY).
> But then I convinced myself that the two copies would go to different
> directories (the first to the root of the cache area, the second to
> cache/shlibs or similar)...

No, they were actually both going to the root of the cache directory. 
So you're explanation makes perfect sense.

Thanks.

Ken




Re: [rt.cpan.org #118053] Problem with packed perl archive for biber on 64-bit Cygwin

2016-09-26 Thread Roderich Schupp via RT
Mon Sep 26 13:16:13 2016: Request 118053 was acted upon.
Transaction: Correspondence added by roderich.sch...@gmail.com
   Queue: PAR-Packer
 Subject: Re: [rt.cpan.org #118053] Problem with packed perl archive for 
biber on 64-bit Cygwin
   Broken in: (no value)
Severity: (no value)
   Owner: Nobody
  Requestors: kbr...@cornell.edu
  Status: open
 Ticket https://rt.cpan.org/Ticket/Display.html?id=118053 >


On Mon, Sep 26, 2016 at 3:51 PM, Ken Brown via RT <
bug-par-pac...@rt.cpan.org> wrote:

> The change was to remove
> these two arguments from the invocation of pp:
>
>--link=/usr/bin/cygssp-0.dll
>--link=/usr/bin/cygcrypt-0.dll
>

I was going to suggest that as well: these result in a second copy of the
DLL to be unpacked - while the first copy is probably already in use.
Which Windows doesn't allow i(the Linux equivalent error would be EBUSY).
But then I convinced myself that the two copies would go to different
directories (the first to the root of the cache area, the second to
cache/shlibs or similar)...

Cheers, Roderich



Re: [rt.cpan.org #118053] Problem with packed perl archive for biber on 64-bit Cygwin

2016-09-26 Thread Ken Brown via RT
Mon Sep 26 09:51:06 2016: Request 118053 was acted upon.
Transaction: Correspondence added by kbr...@cornell.edu
   Queue: PAR-Packer
 Subject: Re: [rt.cpan.org #118053] Problem with packed perl archive for 
biber on 64-bit Cygwin
   Broken in: (no value)
Severity: (no value)
   Owner: Nobody
  Requestors: kbr...@cornell.edu
  Status: open
 Ticket https://rt.cpan.org/Ticket/Display.html?id=118053 >


On 9/26/2016 6:17 AM, Roderich Schupp via RT wrote:
> https://rt.cpan.org/Ticket/Display.html?id=118053 >
>
> Am 2016-09-25 13:37:42, kbr...@cornell.edu schrieb:
>> Actually, there's still one glitch.  If I run biber with no arguments,
>> it unpacks itself and gives me a usage message.  It also works fine if I
>> run 'biber --help'.  But if I give it a file as an argument (e.g.,
>> 'biber test.bcf') before the cache is created, it unpacks itself and
>> then hangs.  After I kill it, I can rerun it with no problem.
>
> Sorry, no clue. If "biber --help" works, then basically PAR::Packer's job
> is done (though there might still be missing files etc, but typically that
> doesn't result in a hang). Does this hang occur also on the machine
> where you packed biber?

It did originally, but I just repacked biber (which a slight change), 
and now I can't reproduce the problem anymore.  The change was to remove 
these two arguments from the invocation of pp:

   --link=/usr/bin/cygssp-0.dll
   --link=/usr/bin/cygcrypt-0.dll

The first is not needed because cygssp-0.dll is contained in a minimal 
Cygwin install, and the second is not needed now that cygcrypt-0.dll is 
embedded.

I'm not sure whether (or why) these changes made a difference, but in 
any case the problem seems to be gone.

Thanks for your help.

Ken



Re: [rt.cpan.org #118053] Problem with packed perl archive for biber on 64-bit Cygwin

2016-09-25 Thread Ken Brown via RT
Sun Sep 25 13:37:42 2016: Request 118053 was acted upon.
Transaction: Correspondence added by kbr...@cornell.edu
   Queue: PAR-Packer
 Subject: Re: [rt.cpan.org #118053] Problem with packed perl archive for 
biber on 64-bit Cygwin
   Broken in: (no value)
Severity: (no value)
   Owner: Nobody
  Requestors: kbr...@cornell.edu
  Status: open
 Ticket https://rt.cpan.org/Ticket/Display.html?id=118053 >


On 9/25/2016 11:24 AM, Ken Brown wrote:
> On 9/25/2016 3:06 AM, Roderich Schupp via RT wrote:
>> https://rt.cpan.org/Ticket/Display.html?id=118053 >
>>
>> On 2016-09-24 21:06:22, kbr...@cornell.edu wrote:
>>> On 9/23/2016 3:51 PM, Bugs in PAR-Packer via RT wrote:
>>> I understand a little better how the packed executable is supposed to
>>> work.  First the embedded files are extracted, which are a perl
>>> interpreter (named biber) and cygperl5_24.dll in; it's then supposed
>>> to
>>> be possible to run the extracted biber, which will extract the rest of
>>> the files.  Roderich, is this right?
>>
>> Your analysis is correct.
>>
>>> So it seems that the solution should be to add cygcrypt-0.dll as an
>>> embedded file.
>>
>> Yes. Try changing line 43 of myldr/embed_files.pl in the PAR::Packer
>> source to
>>
>> *is_system_lib = sub { shift =~
>> m{^/usr/bin/(?!cygcrypt\b)|^\Q$system_root\E/}i };
>>
>> i.e. /usr/bin/cygcrypt-0.dll is _not_ regarded as a "system library"
>> anymore.
>> Then re-build and install PAR:Packer and re-pack biber.
>>
>> Cheers, Roderich
>
> Thanks, that fixes it.

Actually, there's still one glitch.  If I run biber with no arguments, 
it unpacks itself and gives me a usage message.  It also works fine if I 
run 'biber --help'.  But if I give it a file as an argument (e.g., 
'biber test.bcf') before the cache is created, it unpacks itself and 
then hangs.  After I kill it, I can rerun it with no problem.

David Carlisle, who is also testing, finds that it still hangs even 
after the cache is created, but that may be a separate issue.

Do you have any idea what might cause this?  For me it's just a glitch. 
For David, it means that biber is unusable.

Thanks.

Ken



Re: [rt.cpan.org #118053] Problem with packed perl archive for biber on 64-bit Cygwin

2016-09-25 Thread Ken Brown via RT
Sun Sep 25 11:24:43 2016: Request 118053 was acted upon.
Transaction: Correspondence added by kbr...@cornell.edu
   Queue: PAR-Packer
 Subject: Re: [rt.cpan.org #118053] Problem with packed perl archive for 
biber on 64-bit Cygwin
   Broken in: (no value)
Severity: (no value)
   Owner: Nobody
  Requestors: kbr...@cornell.edu
  Status: open
 Ticket https://rt.cpan.org/Ticket/Display.html?id=118053 >




On 9/25/2016 3:06 AM, Roderich Schupp via RT wrote:
> https://rt.cpan.org/Ticket/Display.html?id=118053 >
>
> On 2016-09-24 21:06:22, kbr...@cornell.edu wrote:
>> On 9/23/2016 3:51 PM, Bugs in PAR-Packer via RT wrote:
>> I understand a little better how the packed executable is supposed to
>> work.  First the embedded files are extracted, which are a perl
>> interpreter (named biber) and cygperl5_24.dll in; it's then supposed
>> to
>> be possible to run the extracted biber, which will extract the rest of
>> the files.  Roderich, is this right?
>
> Your analysis is correct.
>
>> So it seems that the solution should be to add cygcrypt-0.dll as an
>> embedded file.
>
> Yes. Try changing line 43 of myldr/embed_files.pl in the PAR::Packer source to
>
> *is_system_lib = sub { shift =~ 
> m{^/usr/bin/(?!cygcrypt\b)|^\Q$system_root\E/}i };
>
> i.e. /usr/bin/cygcrypt-0.dll is _not_ regarded as a "system library" anymore.
> Then re-build and install PAR:Packer and re-pack biber.
>
> Cheers, Roderich

Thanks, that fixes it.

Ken