Tue Aug 30 02:23:41 2016: Request 117323 was acted upon. Transaction: Ticket created by BHALLISSY Queue: PAR-Packer Subject: parl a.par not finding DLL that was added with -l Broken in: 1.035 Severity: (no value) Owner: Nobody Requestors: bhalli...@cpan.org Status: new Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=117323 >
Summary: Using 32-bit Strawberry perl 5.24.0 on Windows; PAR::Packer v1.035. Build a.par and a.exe as follows: pp -p -B -c -l some.dll myprog.pl pp -o a.exe a.par I now have two ways to run the program: a.exe or parl a.par but when I use the parl approach, the dll is loaded from C:\Strawberry rather from the unpacked PAR cache. Is this expected? Am I missing a parameter somewhere? Details: I'm trying to get XML::Parser::Expat to work in a .par file for distributing a package. Taking some hints from PerlMonks, I have installed ListDLLs.exe (https://technet.microsoft.com/en-us/sysinternals/bb896656.aspx) to help figure out where the DLL is being loaded. Turning this into a one-liner I get: pp -p -B -c -l libexpat-1_.dll -e "use XML::Parser::Expat; print XML::Parser::Expat->VERSION, `ListDLLs.exe $$`, join($/, @INC) " pp -o a.exe a.par When I execute a.exe, the ListDLLs output shows that the library was loaded from the cache: 0x62200000 0x19000 ...\par-494555736572\cache-60267defee8028cf3b2a13f4019904acfa2b57f9\01f5bf5f.xs.dll 0x6f940000 0x2c000 ...\par-494555736572\cache-60267defee8028cf3b2a13f4019904acfa2b57f9\libexpat-1_.dll However, when I try running the program via parl, the library that is in the cache isn't used: 0x62200000 0x19000 ...\par-494555736572\cache-05fd90c5e7a752b0fb90f30dbe8ed3fddef8e1e4\01f5bf5f.xs.dll 0x6f940000 0x2c000 C:\Strawberry\c\bin\libexpat-1_.dll Investigating further, it appears that the library is included twice in the cache from a.exe, but only one for that of a.par: cache-60267defee8028cf3b2a13f4019904acfa2b57f9\libexpat-1_.dll cache-60267defee8028cf3b2a13f4019904acfa2b57f9\inc\shlib\MSWin32-x86-multi-thread-64int\libexpat-1_.dll cache-05fd90c5e7a752b0fb90f30dbe8ed3fddef8e1e4\inc\shlib\MSWin32-x86-multi-thread-64int\libexpat-1_.dll The other output from my test shows that I'm using XML::Parser::Expat v2.44, and @INC is essentially the same in both cases: C:\Users\IEUser\AppData\Local\Temp\par-494555736572\cache-60267defee8028cf3b2a13f4019904acfa2b57f9\inc\lib C:\Users\IEUser\AppData\Local\Temp\par-494555736572\cache-60267defee8028cf3b2a13f4019904acfa2b57f9\inc CODE(0x1eff76c) CODE(0x1eff964) and C:\Users\IEUser\AppData\Local\Temp\par-494555736572\cache-05fd90c5e7a752b0fb90f30dbe8ed3fddef8e1e4\inc\lib C:\Users\IEUser\AppData\Local\Temp\par-494555736572\cache-05fd90c5e7a752b0fb90f30dbe8ed3fddef8e1e4\inc CODE(0x1edb23c) CODE(0x1edb434)