in reply to pp generated executable can't find or load libraries

It appears that the use of Net::SSLeay and IO::Socket::SSL are not detected by Module::Scandeps when it is called by PAR::Packer.

Net::SSLeay in turn has DLL dependencies that need to be packed.

If you edit the script to explicitly use Net::SSLeay then pp-autolink detects dependencies of libcrypto, libssl and zlib.

pp_autolink -o sendemail.exe sendemail.pl DLL check iter: 1 DLL check iter: 2 DLL check iter: 3 No alien system dlls detected Detected link list: --link c:\berrybrew\5.28.0_64_pdl\c\bin/libcrypto- +1_1-x64__.dll --link c:\berrybrew\5.28.0_64_pdl\c\bin/libssl-1_1-x64_ +_.dll --link c:\berrybrew\5.28.0_64_pdl\c\bin/zlib1__.dll CMD: pp --link c:\berrybrew\5.28.0_64_pdl\c\bin/libcrypto-1_1-x64__.dl +l --link c:\berrybrew\5.28.0_64_pdl\c\bin/libssl-1_1-x64__.dll --link + c:\berrybrew\5.28.0_64_pdl\c\bin/zlib1__.dll -o sendemail.exe sendem +ail.pl

Replies are listed 'Best First'.
Re^2: pp generated executable can't find or load libraries
by vexed (Novice) on Apr 13, 2021 at 13:13 UTC

    Hi swl,

    Many thanks for your input! I think we are making progress here.

    I am now getting the below error instead.

    Can't locate object method "start_SSL" via package "IO::Socket::SSL" at script/sendemail.pl line 474.

      It seems that a plain pp call, even with the -x flag, does not trigger all of the libraries, but packing works under pp_autolink.

      You could also add these lines to the script, assuming in your case you always want to use them anyway:

      BEGIN { use Net::SSLeay; use IO::Socket::SSL; IO::Socket::SSL->start_SSL($SERVER, SSL_version => 'TLSv1_2', SSL_ +verify_mode => 0 ); }

      When I run the exe I can get the usage information.

      However, I have not tested if sending emails actually works, and that might be the next point of failure, leading to your other reply in 11131180.

        You are an absolute legend!!!

        It works now :D

        Many thanks for your time and help, it is greatly appreciated.

Re^2: pp generated executable can't find or load libraries
by vexed (Novice) on Apr 13, 2021 at 14:31 UTC

    I think this program is far too old and too broken to fix.

    I am also not a developer or a Perl user. Time to look for an alternative.

    Thank you all for your input, this is such a great community, I have learned a couple of things about Perl :D

    EDIT: With swl's help, TLSv1.2 and TLSv1.3 are now working as expected in sendMail.exe after packing it with pp_autolink