Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Pelr packer pp with -C fails else ok

by dkhosla1 (Sexton)
on Oct 04, 2018 at 16:58 UTC ( [id://1223540]=perlquestion: print w/replies, xml ) Need Help??

dkhosla1 has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

Background: The issue is happening on only 1 system which is very strange. Other systems with the exact same OS (RedHat 7.2) and same binary don't see this issue.

By default, I am using '-C' (--clean) 'pp' option to build the packaged binary.

On this system, when running it, it got the "Can't locate File/Temp.pm in @INC .." type error. See below. Since other systems were not having this issue, the package must be there. But just to make double-sure, I compiled with "-M File::Temp". It did not fix the issue.

So then to see if it really was missing, I compiled without the '-C', and it worked! No issues.

Any ideas?

Here is the full output - none of the output is from mytest itself

$ ./mytest -v Invalid argument at -e line 119. Can't locate File/Temp.pm in @INC (@INC contains: /home/shared/perl5/R +EL5/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/x86_64-linux /hom +e/shared/perl5/REL5/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3 / +home/shared/perl5/REL5/perlbrew/perls/perl-5.16.3/lib/5.16.3/x86_64-l +inux /home/shared/perl5/REL5/perlbrew/perls/perl-5.16.3/lib/5.16.3 .) + at -e line 6. END failed--call queue aborted at -e line 616.

pp -v -> PAR Packager, version 1.041 (PAR version 1.015)

Replies are listed 'Best First'.
Re: Pelr packer pp with -C fails else ok
by dkhosla1 (Sexton) on Oct 04, 2018 at 18:33 UTC
    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..)

      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 modify @INC anywhere. I will try build a binary to just print @INC and report early next week.
Re: Pelr packer pp with -C fails else ok
by Anonymous Monk on Oct 04, 2018 at 22:03 UTC
    -c is not -C ive yet to see someone smart enough to use big C
Re: Pelr packer pp with -C fails else ok
by Anonymous Monk on Oct 08, 2018 at 23:26 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1223540]
Approved by marto
Front-paged by haukex
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-09-16 23:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (22 votes). Check out past polls.

    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.