On Mon, Oct 27, 2014 at 9:16 PM, Martin A. Brooks <[email protected]>
wrote:

> # Use of runtime loader module Module::Implementation detected.  Results
> of static scanning may be incomplete.
> # Use of runtime loader module Module::Runtime detected.  Results of
> static scanning may be incomplete.
>

This might indicate a problem, but most likely yours has a different cause.


> Indeed, when I run the .exe from a Windows command prompt, it runs just
> fine.
>
> However, in its final use, the program is being called from another piece
> of software, a monitoring agent, which runs as a Windows service.  It shows
> the following error in its log file on execution:
>
> PID 912: [Mon Oct 27 09:32:34 2014] PLUGIN RESULTS:  exit=2; text=Can't
> load
> 'C:\Windows\TEMP\par-4c41444353484e4153484353303124\cache-d9195d87261f3a64d0321e0b38ad4246ee284110\a900cac0.xs.dll'
> for module Net::SSH2


Net::SSH2 is an XS module, ie. in addition to pure Perl code it also
installs a DLL, .../Net/SSH2/SSH2.dll.
If I interpret Net::SSH2's Makefile.PL correctly this "glue" DLL is linked
against two "external"
(to the Perl ecosystem) DLLs, libssl32 and libeay32 (or similar). These are
missing from your
packed executable, causing the loading of SSH2.dll to fail if they can't be
found in the environment.
That's whythe packed executable works on the machine where you generated it
and fails on a machine without them installed.

PAR::Packer *never* packs such "external" DLLs, sorry - you must tell pp
explicitly (using the option --link).
Here's how - I assume that you have the program "objdump", which is the
case if
you're using Strawberry Perl or ActiveState Perl with the mingw32 ppm
installed:

1. Locate .../Net/SSH2/SSH2.dll in your Perl installation and run

   objdump -ax .../Net/SSH2/SSH2.dll  | grep "DLL Name"

(or the Windows equivalent for grep). Some of the DLLs listed might be
Windows system libraries,
these are irrelevant, look for names similar to libssl32.dll and
libeay32.dll.

2. Locate these two DLLs in your Perl installation and run objdump on them,
too.
It will probably turn out that one of these is linked against the other and
one
is linked against some zlib1.dll. Rinse and repeat.

3. You'll end up with a list of DLLs, foo.dll, bar.dll etc. Add them to
your pp command

  pp --link foo.dll --link bar.dll ...

(since they should all be located in a directory that is in your PATH you
need not specify
full pathnames).

4. Check that pp has indeed packed them into the executable (currently it
will not even
complain if it can't find a --link DLL):

  unzip -l your.exe

(the generated executable is also a zip file) and look for foo.dll etc in
the output.
They should all be found in a directory

   shlib/<archname>

for the value of "archname" run

  perl -MConfig -E "say $Config{archname}"


Cheers, Roderich

Reply via email to