tomgracey has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks
It's been a long time since I posted on Perl Monks - it feels good to be back!
On to my problem...
So I know what you're going to say: why oh why are you trying to compile Perl scripts on Windows? I certainly feel the same as I've been tearing what little remains of my hair out on this on and off for a few weeks now. (I haven't been working on this one problem the whole time I should add - that would be a bit extreme!)
Previously I was able to compile my utility without issue. I am not sure whether module updates have caused the problem or something else has changed in the setup of the (virtual) machine I'm using for the compile process. However, the error messages do make the problem fairly obvious (I think). They say things like:
Can't load 'C:\Users\Tom\AppData\Local\Temp\par-5530185324\cache-(lots of digits)\(more digits).xs.dll for module Net::SSLeay...'To be clear this is after compile has completed, and when I am trying to run the executable that was produced - and when I'm running it on a different Windows machine)
I believe it is ultimately due to one of the SSL related modules (IO::Socket::SSL, LWP::Protocol::https, Net::SSLeay etc) basically caching. The compiler (I'm using pp = the Par Packer) goes ahead and compiles a fixed reference to the cache file in the temp directory. Then the same file can't be found on a different machine.
So at the top level - in my script - I'm using WWW::Mechanize. I guess if I was using IO::Socket::SSL directly, I might be able to do something to influence caching, since I note the docs on this module have a lot of references to a "session_cache". I presume this is the problem. However, I'm confused how I can persuade it to forget about caching, given I don't have a direct interface to it. Perhaps there is an environment variable I can set, or global constants? I have spent a fair amount of time looking over the code in those modules and even putting print/die statements in there, but without much luck. Trial and error is a bit tedious because it involves compiling then transferring to a different machine, only to see the same error pop up.
Very often when I get to this level of frustration it's down to me having missed something obvious that a new set of eyes will find quickly - hence my question on Perl Monks.
I'm using Strawberry Perl 5.6 (32 bit) and compiling on a virtual (box) machine with Windows 7, and I installed all the relevant modules with the cpan shell (if that helps).
Any thoughts would really be appreciated
Thanks!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Preventing IO::Socket::SSL caching so that I can get a utility to compile (on windows :/)
by marto (Cardinal) on Feb 17, 2020 at 18:40 UTC | |
Re: Preventing IO::Socket::SSL caching so that I can get a utility to compile (on windows :/)
by Anonymous Monk on Feb 17, 2020 at 19:03 UTC | |
by bliako (Abbot) on Feb 18, 2020 at 07:40 UTC | |
Re: Preventing IO::Socket::SSL caching so that I can get a utility to compile (on windows :/)
by thechartist (Monk) on Feb 19, 2020 at 03:07 UTC | |
Re: Preventing IO::Socket::SSL caching so that I can get a utility to compile (on windows :/)
by tomgracey (Scribe) on Mar 16, 2020 at 14:30 UTC |