I have an issue using Net::SMTP::TLS::ButMaintained with perl 5.36 build (on Windows 11). I was previously using perl 5.28 without issue. It fails with the following message:
Attempt to reload Net/SSLeay.pm aborted.
Compilation failed in require at …/site/lib/Net/SMTP/TLS/ButMaintained.pm line 14.
BEGIN failed–compilation aborted at …/site/lib/Net/SMTP/TLS/ButMaintained.pm line 14.
Compilation failed in require at …\email.pl line 9.
BEGIN failed–compilation aborted at …\email.pl line 9.
ButMaintained.pm line 14: use Net::SSLeay;
email.pl line 9: use Net::SMTP::TLS::ButMaintained;
Net::SSLeay version 1.92
IO::Socket::INET version 1.51
IO::Socket::SSL version 2.083
Net::SSLeay version 1.84
IO::Socket::INET version 1.39
IO::Socket::SSL version 2.054
I am not knowledgeable enough to resolve this, hence I am seeking advice here.
“Attempt to reload (modulename).pm aborted”
often means that a dll needed by that module is missing or incompatible.
In this case, I think you have a problem with your openssl dll. The nature of the problem would depend on the build date for your 5.36 project. It if was built in the March/April timeframe it could have been affected by a bug we had with the builder for Net-SSLeay, and a rebuild would fix it.
(Because you’re on Windows, it’s also possible that there’s a third-party version of OpenSSL at a different revision which is higher on your search PATH than the copy of OpenSSL that Net::SSLeay needs to find. dll hell still exists.)
However, if the build date is within the last week or so, you could have OpenSSL 3.0. While Perl 5.36 can use version 3 of OpenSSL, there are still modules which can’t. Net::SMTP::TLS is old code, which is why the modernized version Net::SMTP::TLS::ButMaintatined exists. Since the original code base is far older than OpenSSL 3, this might be a module which must still consume OpenSSL 1.1.1. In this case, going to the Configuration Pane and pinning OpenSSL to 126.96.36.199 might well get you a new build that will solve this problem.
Thanks for your reply. I only created the 5.36 build for the first time yesterday because I needed an additional module. Until then I was still using 5.28 (and not updating to avoid issues like I have now).
I will try your suggestion.
I wrote the code that uses Net/SMTP/TLS/ButMaintained.pm a very long time ago, before Net::SMTP included support for TLS and SSL. I have rewritten my code to use Net::SMTP.
As I am not using Net/SMTP/TLS/ButMaintained.pm, the aborted attempt to reload Net/SSLeay.pm is no longer an issue for me.
So, I am currently no longer looking out for replies to this topic or to Compilation is failing for Net::SMTP::TLS::ButMaintained with perl 5.36 build on Windows.
That leaves Unusable Perl 5.36 build - compilation failures due to various dll files not loading still requiring resolution.
The ‘attempt to reload Net/SSLeay.pm aborted’ issue goes away if the exec folder is above the bin and site\bin folders in PATH.
I am waiting to hear why the wrong order causes issues. See Unusable Perl 5.36 build - compilation failures due to various dll files not loading - #12 by onlyonelikeme.