Fri Sep 23 15:51:35 2016: Request 118053 was acted upon. Transaction: Ticket created by kbr...@cornell.edu Queue: PAR-Packer Subject: 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: new Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=118053 >
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
../../data/biber-tool.conf;lib/Biber/biber-tool.conf ../../data/schemata/config.rnc;lib/Biber/config.rnc ../../data/schemata/config.rng;lib/Biber/config.rng ../../data/schemata/bcf.rnc;lib/Biber/bcf.rnc ../../data/schemata/bcf.rng;lib/Biber/bcf.rng ../../lib/Biber/LaTeX/recode_data.xml;lib/Biber/LaTeX/recode_data.xml ../../data/bcf.xsl;lib/Biber/bcf.xsl /usr/lib/perl5/5.24/Unicode/Collate/Locale;lib/Unicode/Collate/Locale /usr/lib/perl5/5.24/Unicode/Collate/CJK;lib/Unicode/Collate/CJK /usr/lib/perl5/5.24/Unicode/Collate/allkeys.txt;lib/Unicode/Collate/allkeys.txt /usr/lib/perl5/5.24/Unicode/Collate/keys.txt;lib/Unicode/Collate/keys.txt /usr/lib/perl5/site_perl/5.24/Business/ISBN/RangeMessage.xml;lib/Business/ISBN/RangeMessage.xml
#!/bin/bash # The cp/rm steps are so that the packed biber main script is not # called "biber" as on case-insensitive file systems, this clashes with # the Biber lib directory and generates a (harmless) warning on first run # Also, pp resolves symlinks and copies the symlink targets of linked libs # which then don't have the right names and so things that link to them # through the link name break. So, we copy them to the link names first and # and package those. # Have to explicitly include the Input* modules as the names of these are dynamically # constructed in the code so Par::Packer can't auto-detect them. # Same with some of the output modules. cp /usr/local/bin/biber /tmp/biber-cygwin PAR_VERBATIM=1 pp \ --unicode \ --module=deprecate \ --module=Biber::Input::file::bibtex \ --module=Biber::Input::file::biblatexml \ --module=Biber::Output::dot \ --module=Biber::Output::bbl \ --module=Biber::Output::bblxml \ --module=Biber::Output::bibtex \ --module=Biber::Output::biblatexml \ --module=Pod::Simple::TranscodeSmart \ --module=Pod::Simple::TranscodeDumb \ --module=List::MoreUtils::XS \ --module=List::SomeUtils::XS \ --module=List::MoreUtils::PP \ --module=HTTP::Status \ --module=HTTP::Date \ --module=Encode:: \ --module=IO::Socket::SSL \ --module=File::Find::Rule \ --module=Text::CSV_XS \ --module=DateTime \ --link=/usr/bin/cygz.dll \ --link=/usr/bin/cyggcrypt-20.dll \ --link=/usr/bin/cygiconv-2.dll \ --link=/usr/bin/cyggpg-error-0.dll \ --link=/usr/local/bin/libbtparse.dll \ --link=/usr/bin/cygxml2-2.dll \ --link=/usr/bin/cygxslt-1.dll \ --link=/usr/bin/cygexslt-0.dll \ --link=/usr/bin/cygssp-0.dll \ --link=/usr/bin/cygcrypto-1.0.0.dll \ --link=/usr/bin/cygssl-1.0.0.dll \ --link=/usr/bin/cygcrypt-0.dll \ --link=/usr/bin/cygdatrie-1.dll \ --link=/usr/bin/cygthai-0.dll \ --addlist=biber.files \ --cachedeps=scancache \ --output=biber-cygwin64.exe \ /tmp/biber-cygwin \rm -f /tmp/biber-cygwin