in reply to Re^2: Pelr packer pp with -C fails else ok
in thread Pelr packer pp with -C fails else ok

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?

Replies are listed 'Best First'.
Re^4: Pelr packer pp with -C fails else ok
by dkhosla1 (Sexton) on Oct 06, 2018 at 00:17 UTC

    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.

      It could be a race condition where the PAR temp dir is deleted before your code has finished its cleanup or some other step in global destruction (which has no guarantee of order if I remember correctly), but it is difficult to have any certainty without seeing your code. You could put some feedback statements into an end block in your code to get a better sense of when the error is triggered.

      Maybe upgrading to the latest PAR::Packer will also help, but I don't see anything obvious in the change logs.

      In any case, I packed using the command below, and it generates and removes the temp dir as expected.

      pp -C -M Net::OpenSSH::ShellQuoter::POSIX -M arybase -o mytest.exe -e +"print join q{ }, @INC"
        To clarify, compilation with -C works fine on 30+ systems so far. It is failing like this only on 1 specific system. So I am trying to figure out why just on that specific system.
      Why do you want to use the big C?
        Because I would prefer to not leave the folders lying around for easy browsing. Also, each time we put anew version (quite often) a new folder is created and old one not cleaned up. If it turns out that in some cases this functionality can break, then I'll consider not using it but this is the first time I have seen issues with it. Of course the easy answer is to not use 'C'; I am just prone to spending a little effort to see if I can figure out root causes :-).