CC: | Kime Philip <philkime [...] kime.org.uk>, David Carlisle <d.p.carlisle [...] gmail.com> |
Subject: | Problem with packed perl archive for biber on 64-bit Cygwin |
Date: | Fri, 23 Sep 2016 15:51:18 -0400 |
To: | bug-PAR-Packer [...] rt.cpan.org |
From: | Ken Brown <kbrown [...] cornell.edu> |
Hi Roderich,
Phil Kime suggested that I raise a ticket concerning a problem I'm
having with a packed archive for biber
(https://sourceforge.net/projects/biblatex-biber/) on 64-bit Cygwin.
The problem doesn't occur on 32-bit Cygwin.
Here's the short version: I use PAR::Packer to create a packed archive
biber.exe. It unpacks itself and runs fine in the Cygwin distribution
on which I created it. But if I run it on a fresh, bare-bones Cygwin
installation (which in particular does not have perl installed), it
fails as follows:
$ ./biber.exe
C:/cygwin64a/tmp/par-6b62726f776e/cache-128a18f7440676b8f4632879a6f42b099bad8a05/biber:
error while loading shared libraries: cygperl5_24.dll: cannot open
shared object file: No such file or directory
When I look at the cache, I see the following:
$ ls -l
/tmp/par-6b62726f776e/cache-128a18f7440676b8f4632879a6f42b099bad8a05/
total 2136
-rwxr-x--- 1 kbrown None 53248 Sep 23 15:01 biber
-rwxr-x--- 1 kbrown None 2133011 Sep 23 15:01 cygperl5_24.dll
So nothing has been unpacked except biber and one DLL. And then the
system tries to load that DLL and fails, because its dependent DLLs have
not yet been unpacked. In this case the DLL cygcrypt-0.dll is the
problematic one, as we can see by running cygcheck:
$ cygcheck
/tmp/par-6b62726f776e/cache-128a18f7440676b8f4632879a6f42b099bad8a05/cygperl5_24.dll
C:\cygwin64a\tmp\par-6b62726f776e\cache-128a18f7440676b8f4632879a6f42b099bad8a05\cygperl5_24.dll
C:\cygwin64a\bin\cygwin1.dll
C:\WINDOWS\system32\KERNEL32.dll
C:\WINDOWS\system32\ntdll.dll
C:\WINDOWS\system32\KERNELBASE.dll
C:\cygwin64a\bin\cygssp-0.dll
cygcheck: track_down: could not find cygcrypt-0.dll
[Note that cygperl5_24.dll also depends on cygssp-0.dll, which also
should have been unpacked; but in this case it doesn't matter, because
/usr/bin/cygssp-0.dll exists in the bare-bones Cygwin install.]
Do you have any idea why biber.exe doesn't fully unpack itself before
trying to load cygperl5_24.dll?
The rest of this message provides more details about how I built
biber.exe. Please let me know if there's anything else you need.
My system (both build and test):
$ uname -a
CYGWIN_NT-10.0 moufang 2.6.0(0.304/5/3) 2016-08-31 14:32 x86_64 Cygwin
My perl on the build system:
$ perl -v
This is perl 5, version 24, subversion 0 (v5.24.0) built for
x86_64-cygwin-threads-multi
I built this perl myself, because biber requires perl 5.24, and Cygwin's
perl is currently at 5.22.
I created the build installation by doing the following:
1. Start with a fresh Cygwin installation, install my build of
perl-5.24, and install a few other packages that are needed for the next
steps.
2. Use cpan to install the build prerequisites for biber and to install
PAR::Packer. (I repeated this process today to make sure my build
environment was clean, so all modules are at their latest versions as of
today.)
3. Clone the biber git repo, checkout v2.6, and build and install biber.
4. Create the packed biber archive by running the attached script
build.sh, which uses the attached auxiliary file biber.files.
Thanks in advance for any help you can offer.
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.