Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Hi! I'm having this problem again, and I cannot solve it this time...

Some years ago I wrote a script to extract some info from some objects at Salesforce.com using WWW::Salesforce module, and then PAR::Packer (pp) to build a standalone EXE to be run as a scheduled task in a Windows server. It was running OK until a week ago... logs said that it couldn't log in, but that only meant that some old APIs at Salesforce where removed, and I had to update something. Changes in the configuration trying to find a proper API only changed the error message. The original EXE was generated with pp in ActivePerl in a 32-bit machine, but a year ago I changed to Strawberry in x64, so my development PC is up to date and the plain perl script runs OK on it. So it's time to rebuild the EXE!!!

As the server where the script runs daily was also a x64 machine like my PC, I thought that an EXE build here would work OK, but it failed with the following message:

Can't load 'C:\Users\account\AppData\Local\Temp\par-636c7573746572\cac +he-792b3f8dca19082fb4a8fe816d16486838c5b752\48f12a51.xs.dll' for modu +le XML::Parser::Expat: load_file:The specified module could not be fo +und at C:/Strawberry/perl/lib/DynaLoader.pm line 193. ...

That was simple to solve. I just added -l libexpat-1__.dll to the pp command line, but the error turned into:

500 Can't locate object method "new" via package "LWP::Protocol::https::Socket" at WWW/Salesforce.pm line 103.

Googling around I found that setting environment variable PAR_VERBATIM could solve the missing "new" problem with other modules, but it didn't in my case, and I only got an EXE about 10% bigger than before.

I also tried to build a 32-bit EXE using a virtual machine, but the problem remained as it also had the same Strawberry perl version and the modules were up to date.

As I found that the EXE fails only on the server, where there perl is NOT installed (and it won't be), and it runs OK on machines with perl installed, I guess that something is not being included by pp in the EXE, but I cannot identify what... "-x" option of pp didn't help... the following messages are still present during the build:

# Use of runtime loader module Module::Runtime detected. Results of s +tatic scanning may be incomplete. # Use of runtime loader module Module::Implementation detected. Resul +ts of static scanning may be incomplete.

At some point of my tests, I unsuccessfuly added many other communications libraries to pp command: -l libexpat-1__.dll -l libcrypto-1_1-x64__.dll -l zlib1__.dll -l libssl-1_1-x64__.dll

Now I'm clueless... Any Idea?


In reply to Problems running a packaged script. by vitoco

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-03-29 15:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found