Just in case the link posted by the AnonyMonk doesn't suffice to solve the issue, I'll elaborate a bit:  Net::SSLeay makes use of AutoSplit and AutoLoader, i.e. most subroutines of the module are kept in separate .al files, which are then loaded on demand. In other words, when IO::Socket::SSL is calling Net::SSLeay::randomize(), the randomize.al file is being loaded. This is done via the AutoLoader::AUTOLOAD routine. OTOH, many XS modules provide a facility to load C constants defined in the related header files. As this is also done using AUTOLOAD, both mechanisms need to peacefully cooperate. This is usually achieved by first trying to load a constant of the requested name, and in case that fails (as is the case with "randomize" here), pass the autoload request on to AutoLoader::AUTOLOAD. To indicate to the caller that the loading of a constant failed, the constant() routine in the XS code sets errno = EINVAL (which, in stringified form, typically is "Invalid argument").

Apparently, the target system where you're trying to deploy your PAR package is showing some weird behaviour with respect to EINVAL, so the autoload request isn't being passed through to the AutoLoader... (btw, even if the test for "Invalid" etc. fails, the || $!{EINVAL} should still normally be true — %! is a tied hash from Errno).

The code below is the related AUTOLOAD routine from Net/SSLeay.pm. To figure out what's happening, insert the lines between the "###" (of course, make that modification before creating the PAR package). Then, once you know what EINVAL actually is on the target system, modify the next line (the one with $!{EINVAL}) to match whatever you're getting... (or post here what you're getting).

# package Net::SSLeay; # ... sub AUTOLOAD { # This AUTOLOAD is used to 'autoload' constants from the constant( +) # XS function. If a constant is not found then control is passed # to the AUTOLOAD in AutoLoader. my $constname; ($constname = $AUTOLOAD) =~ s/.*:://; my $val = constant($constname); if ($! != 0) { ### debug if ($constname =~ /randomize/) { printf "errno: #%d ('%s') %s expected value (#%d)\n", $!, $!, $!{EINVAL} ? "matches":"doesn't match", Err +no::EINVAL; } ### if ($! =~ /((Invalid)|(not valid))/i || $!{EINVAL}) { $AutoLoader::AUTOLOAD = $AUTOLOAD; goto &AutoLoader::AUTOLOAD; } else { croak "Your vendor has not defined SSLeay macro $constname +"; } } eval "sub $AUTOLOAD { $val }"; goto &$AUTOLOAD; }

In reply to Re^3: PAR::Packer - 'dll not found' error on run by almut
in thread PAR::Packer - 'dll not found' error on run by ethrbunny

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.