Reputation: 21
I'm trying to use pp (the perl compiler) to create an application that can run independent of the perl installed library and interpreter.
It successfully creates a compiled executable although I had to use the -x -c options to get it to find dependencies successfully. It will run on my machine but when I try it on another machine I get this error so clearly there is still some dependency:
501 Protocol scheme 'https' is not supported (LWP::Protocol::https not installed)
I am running it on MacOS 10.14.1 if that makes any difference. Thanks!
Upvotes: 2
Views: 232
Reputation: 3262
You were building Net::SSLeay
on MacOS 10.14 linking it to libssl.44.dylib
which is not present on MacOS 10.12 where you try to run it.
I've found it annoying having to switch between build and test systems to find out which of the libraries are missing or incompatible and need to be packed.
I am now using the following strategy:
pp
and run the resulting program with export DYLD_PRINT_LIBRARIES=YES
being set (on the development machine)/usr/local/opt/
and /usr/local/cellar/
in my case) using pp -l /full/path/name -l ...
I still check on a target machine before deploying, but chances are very high now that it just works.
Upvotes: 1
Reputation: 385996
LWP::Protocol::https is loaded dynamically when needed, so pp
has no way of knowing it's needed by default.
Solution 1
Pass -x
to pp
, and make sure the module is actually loaded in the run pp
uses to determine the modules to include. This would probably be achieved by using LWP to make an HTTPS request during that run. --xargs=...
might come in useful for this.
Solution 2
Pass -M LWP::Protocol::https
to pp
. You could also pass -M 'LWP::Protocol::**'
to get all protocols handlers you have installed.
Solution 3
Add use LWP::Protocol::https ();
to your script or an included module. Including a comment indicating why you are doing this would be appropriate.
Upvotes: 2