On Tue, Apr 17, 2018 at 1:07 AM, Charles Myers <charl...@voxtel-inc.com>
wrote:

> Transfer use_GD.exe to clean Win64 environment (no perl, no libs).
> Executable is unable to find GD or perhaps a requirement of GD with
> following error:
>
> Can’t load 
> ‘C:\Users\username\AppData\Local\Temp\par-xxxx\cache-xxxx\be064bef.xs.dll’
> for module GD: load_file: The specified module could not be found at
> C:/Strawberry/perl/lib/DynaLoader.pl line 193.
>

Note that you should also have seen a popup complaining about a missing DLL
(but maybe Windows 10 dropped this behaviour).


> I expected all required modules to be included and unpacked in the temp
> location.
>

Correct, but that covers only the modules (.pm files, plus "glue" DLLs),
but *not* any DLLs that these "glue" DLLs are linked to.
In your case, pp will pack in perl/vendor/lib/GD.pm and
perl/vendor/lib/auto/GD/GD.xs.dll (the "glue" DLL). However the latter is
linked to the actual (C-level) libgd (libgd-3_.dll) which in turn is linked
against other image libraries, like libpng, libjpeg (which in turn may be
linked to others like zlib).
You must find these DLLs and then explicitly add them to the pp command
line using the --link option.

For you convenience, here's the list that works for me (with Strawberry
5.26.1):

--link libgd-3_.dll
--link libjpeg-9_.dll
--link liblzma-5_.dll
--link libfreetype-6_.dll
--link libiconv-2_.dll
--link libbz2-1_.dll
--link libxpm_.dll
--link libtiff-5_.dll
--link libpng16-16_.dll
--link zlib1_.dll

You may put the above lines into a file, say libs.txt, then pack with

pp @libs.txt ...

It really seems suspicious that there is a reference to C:/Strawberry/* for
> a portable executable.
>
>
>
That's on purpose: references to files in temp directories (and some even
with mangled filenames) are not very helpful to the person investigating
such an error, i.e. the person that built the packed executable.

Cheers, Roderich

Reply via email to