Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

How can I track down why perl 5.34.0 will install on one user account on macos with perlbrew and not another?

by nysus (Parson)
on Jan 07, 2022 at 05:55 UTC ( #11140235=perlquestion: print w/replies, xml ) Need Help??

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

Running macOS Monterey using perlbrew. I've installed several versions of perl with perlbrew on my account without issue in the past. I recently tried to install 5.34.0 and I keep getting failed tests:

<snip> op/for.t ............................................................. + ok PROG: $| = 1; $\ = "\n"; my $echo = 'echo'; if ($^O =~ /android/) { $echo = q{sh -c 'echo $@' -- }; } if ($pid = fork) { waitpid($pid,0); print "parent got $?" } else { exec("$echo foo"); } EXPECTED: foo parent got 0 GOT: hi parent got 0 # Failed test 13 - at op/fork.t line 18 # # Note: 'run_multiple_progs' run has one or more failures # you can consider setting the environment variable # PERL_TEST_ABORT_FIRST_FAILURE=1 before running the test # to stop on the first error. # op/fork.t ............................................................ <snip> # Failed test 'arrayref cmd: https://rt.cpan.org/Ticket/Display.html +?id=70530' # at t/03_run-forked.t line 41. # Looks like you failed 1 test of 114. ../cpan/IPC-Cmd/t/03_run-forked.t .................................... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/114 subtests (less 100 skipped subtests: 13 okay) <snip> # Failed test 20 - array should contain one result or more: libc => () + at t/DynaLoader.t line 127 # got "0" # expected >= "1" <snip> Test Summary Report ------------------- op/fork.t (Ws +tat: 0 Tests: 28 Failed: 1) Failed test: 13 op/incfilter.t (Ws +tat: 0 Tests: 151 Failed: 0) Parse errors: Bad plan. You planned 153 tests but ran 151. ../cpan/IPC-Cmd/t/03_run-forked.t (Ws +tat: 256 Tests: 114 Failed: 1) Failed test: 5 Non-zero exit status: 1 ../dist/IO/t/io_pipe.t (Ws +tat: 0 Tests: 9 Failed: 0) Parse errors: Tests out of sequence. Found (9) but expected (8) Tests out of sequence. Found (10) but expected (9) Bad plan. You planned 10 tests but ran 9. ../ext/DynaLoader/t/DynaLoader.t (Ws +tat: 0 Tests: 44 Failed: 1) Failed test: 20 Files=2668, Tests=1185113, 733 wallclock secs (54.46 usr 13.72 sys + 4 +06.34 cusr 70.24 csys = 544.76 CPU)

I've updated perlbrew and perlpatch. Still nothing works. perlbrew info:

Current perl: Using system perl. Shebang: #!/usr/bin/perl perlbrew: version: 0.94 ENV: PERLBREW_ROOT: /Users/me/perl5/perlbrew PERLBREW_HOME: /Users/me/.perlbrew PERLBREW_PATH: /Users/me/perlbrew/bin PERLBREW_MANPATH:

Googling around doesn't turn up anything useful. I had perl installed with homebrew and removed it to try to fix the issue. I've also tried remove a few other homebrew packages to try to resolve the issue but nothing. I created a new account on the machine, installed perlbrew, and 5.34.0 installed without issue.

I'm not sure how to go about tracking down the problem. Any ideas?

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks

  • Comment on How can I track down why perl 5.34.0 will install on one user account on macos with perlbrew and not another?
  • Select or Download Code

Replies are listed 'Best First'.
Re: How can I track down why perl 5.34.0 will install on one user account on macos with perlbrew and not another?
by kcott (Archbishop) on Jan 07, 2022 at 06:55 UTC

    G'day nysus,

    The first thing that leapt out at me was:

    Current perl: Using system perl. Shebang: #!/usr/bin/perl

    That looks very wrong to me. One the main reasons for using perlbrew is that you avoid messing with the system perl.

    I used to use perlbrew on macOS but haven't since about 2018/2019. I no longer have the Mac machine, so can't help with any direct testing. I do not recall output like that, but that's just a 4-5 year old memory.

    I'm currently running perlbrew on Cygwin. I get:

    $ perlbrew info Current perl: Name: perl-5.34.0 Path: /home/ken/perl5/perlbrew/perls/perl-5.34.0/bin/perl ...

    What does `perlbrew info` output when run from the new (apparently, problem-free) account?

    Did you accidentally `perlbrew switch` to the system perl on the old (problematic) account? If so, try switching to the last working perlbrew perl version and see if that helps.

    — Ken

      I don't think this is the issue. It just means I have perlbrew swithced off. When I install 5.34.0 with the second account, I am also using system perl because no other perl is installed.

      $PM = "Perl Monk's";
      $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
      $nysus = $PM . ' ' . $MCF;
      Click here if you love Perl Monks

Re: How can I track down why perl 5.34.0 will install on one user account on macos with perlbrew and not another?
by Anonymous Monk on Jan 07, 2022 at 14:02 UTC

    You say Perl installs when logged in on one account but fails when logged in on another. The code you exhibit forks, and the parent waits while the child execs command echo foo. It looks like on the failing account this command says 'hi'.

    When you log in to the failing account and issue the command type echo, what do you get?

      OMG, I had an echo script in ~/bin.

      $PM = "Perl Monk's";
      $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
      $nysus = $PM . ' ' . $MCF;
      Click here if you love Perl Monks

        LOL!!! Good comedy for a Friday.

        Well, maybe something valuable can come out of this. The build log did catch that `echo` was not the correct one. It said so right in the log. But it's way at the top of the build log and very easy to miss. Maybe instead, at the bottom of the build log in big letters: "YOU'RE AN IDIOT!"

        $PM = "Perl Monk's";
        $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
        $nysus = $PM . ' ' . $MCF;
        Click here if you love Perl Monks

      Yeah, that seemed weird to me, too. I get `echo is a shell builtin`. I'm using zsh.

      $PM = "Perl Monk's";
      $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
      $nysus = $PM . ' ' . $MCF;
      Click here if you love Perl Monks

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2022-06-26 10:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (85 votes). Check out past polls.

    Notices?