Re: pp generated executable can't find or load libraries
by swl (Prior) on Apr 13, 2021 at 09:36 UTC
|
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
| [reply] [d/l] [select] |
|
|
| [reply] |
|
|
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.
| [reply] [d/l] [select] |
|
|
|
|
|
|
|
|
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
| [reply] |
Re: pp generated executable can't find or load libraries
by Discipulus (Canon) on Apr 10, 2021 at 17:27 UTC
|
Hello vexed and welcome to the monastery and to the wonderful world of Perl!
your issue seems not so easy: your
> SYSTEM ERROR in executing sendEmail.pl : 256 at C:/Perl/perl/site/lib/Module/ScanDeps.pm line 1503
is when Module::ScanDeps try to perl -c what it received.
This can be related to one of modules you are trying to load because Net::SSLeay is bit particular: Re^3: PAR::Packer - 'dll not found' error on run.
So I cant resolve atm your pp issue with this script.
Anyway to send mail using perl is by far easier than debug the problem you are facing :) so consider well your needs to see if you can just embed or create your own mailsender routine.
PS see also PAR and pp in my bibliotheca dedicated section.
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
| [reply] [d/l] [select] |
|
|
| [reply] |
|
|
| [reply] [d/l] |
|
|
Re: pp generated executable can't find or load libraries
by Lotus1 (Vicar) on Apr 12, 2021 at 14:19 UTC
|
| [reply] |
|
|
Hi Lotus1,
Same issue, it complains about the missing libraries if I use TLS.
| [reply] |
|
|
| [reply] [d/l] [select] |
Re: pp generated executable can't find or load libraries
by perlfan (Parson) on Apr 11, 2021 at 21:31 UTC
|
What's your requirement? That is be installed on Windows as a standalone program or that you can send email on Windows using a Perl script? You seem to be over complicating it with this bit-rotten program. So if you're looking for options; give us the constraints and look into any suggestions you get. In 2021, sending email is pretty darn easy with a number of useful and easy to use modules on CPAN. | [reply] |
|
|
Hi perlfan,
My requirement is to get sendemail.exe to be installed on Windows as a standalone program with TLSv1.2 support. I know there is a million way to send emails but unfortunately the original sendEmail.exe v1.56 from 2009 is used in a legacy (old and complicated) app, and I was simply hoping to package it with TLSv1.2 support to avoid the need to update the legacy app.
| [reply] |
Re: pp generated executable can't find or load libraries
by Anonymous Monk on Apr 12, 2021 at 22:49 UTC
|
| [reply] |
|
|
Hi,
I have just tried ppsimple after a battle to install Wx, it generated the largest packed exe, yet the exe fails to load libraries when using TLS.
| [reply] |
|
|
Heh. Wx is not a prerequisite. Fail to load is not diagnostic.
| [reply] |
|
|