Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Pelr packer pp with -C fails else ok

by dkhosla1 (Sexton)
on Oct 04, 2018 at 18:33 UTC ( [id://1223550]=note: print w/replies, xml ) Need Help??


in reply to Pelr packer pp with -C fails else ok

Additional:

Just noticed that the @INC contains path for where the package was built not the 'par-xxx' temp directory. Is that correct behavior? (Not sure if relevant as it does not explain why the '-C' switch causes this failure but wanted to highlight it..)

  • Comment on Re: Pelr packer pp with -C fails else ok

Replies are listed 'Best First'.
Re^2: Pelr packer pp with -C fails else ok
by swl (Parson) on Oct 04, 2018 at 21:59 UTC

    I think the absence of the par-xxx path(s) in @INC is a key symptom. Does your code modify @INC in any way?

    What happens if you build an executable that only prints @INC? Like this (adjusting quote chars as needed for linux):

    pp -C -e "print join q{ }, @INC"

    If I run it on my windows machine using PAR::Packer 1.047, I get the result below. Note the absence of any of the lib dirs from the perl it was built with.

    a.exe C:\Users\user\AppData\Local\Temp\par-736861776e\temp-21884\inc\lib C:\ +Users\user\AppData\Local\Temp\par-736861776e\temp-21884\inc CODE(0x38 +59d88) CODE(0x385a310)

      The first line of the error also raises questions.

      Invalid argument at -e line 119.

      Can you provide the full text of the pp command you are calling?

      And, a bit more speculatively, does your code call system perl anywhere?

        No, I don't call 'system perl' anywhere and the command is:

        pp -C -M Net::OpenSSH::ShellQuoter::POSIX -M arybase -o mytest mytest.pl

        Yes - the first line is coming from somewhere outside my code. It almost seems like some race condition where the cleanup is happening before any code can execute (or it did but by the time it did some cleanup had already occurred..). The par-temp directory does get created and is empty as expected. Removing the -C works like a charm.

      No, I don't modify @INC anywhere. I will try build a binary to just print @INC and report early next week.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1223550]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-09-07 14:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.