Error installing perl using perlbrew on Big Sur
Asked Answered
W

2

5

I'm trying to install perl version 5.33.4 in my macOS environment using perlbrew. I cannot comprehend why it fails during installation.

I started installing perlbrew using \curl -L https://install.perlbrew.pl | bash, then I added in my zshenv this line: source ~/perl5/perlbrew/etc/bashrc and started installing perl with perlbrew install perl-5.33.4 command. I tried also with different perl versions, but the problem is the same.

This is the logged error:

# Failed test 20 - array should contain one result or more: libc => () at t/DynaLoader.t line 127
#      got "0"
# expected >= "1"
../ext/DynaLoader/t/DynaLoader.t ..................................... 
Failed 1/44 subtests 


Test Summary Report
-------------------
../ext/DynaLoader/t/DynaLoader.t                                   (Wstat: 0 Tests: 44 Failed: 1)
  Failed test:  20
Files=2652, Tests=1183275, 624 wallclock secs (25.86 usr  5.24 sys + 260.60 cusr 25.43 csys = 317.13 CPU)
Result: FAIL
make: *** [test_harness] Error 1
##### Brew Failed #####

How can I find a way to detect the problem and solve it? Thanks in advance to any suggestion.

Webfoot answered 14/12, 2020 at 22:13 Comment(4)
5.33.4 is an internal release (because 33 is odd) Did you mean to install that version? 5.32.0 is the latest public release. If you don't need that version specifically, you might have better luck with 5.32.0. Whichever you choose to install, please include the actual error, not just the summary.Lysozyme
Hi @ikegami, thanks for your suggestion. I'll try with the 5.32.0. I edited my answer. The build.perl-5.33.4.log is very long. It's the first time I'm reading it. Hope I've included the interested lines to check the problem.Webfoot
Same error also installing the 5.32.0 version @LysozymeWebfoot
See also Perl blead issue on macOS 11Salas
L
6

A change in macOS Big Sur has broken part of Perl's module-installing tool chain.

From the macOS Big Sur 11.0.1 Release Notes

New in macOS Big Sur 11.0.1, the system ships with a built-in dynamic linker cache of all system-provided libraries. As part of this change, copies of dynamic libraries are no longer present on the filesystem. Code that attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail. Instead, check for library presence by attempting to dlopen() the path, which will correctly check for the library in the cache. (62986286)

This is preventing Perl from being installed.

A ticket (#381) has been filed against ExtUtils-MakeMaker here. It is currently unresolved.

A ticket (#18406) has been filed against Perl itself here.

Lysozyme answered 15/12, 2020 at 9:28 Comment(1)
For what it's worth, both bugs mentioned in the answer have been closed, and I was able to perlbrew install 5.32.1 on Big Sur today.Concerned
S
3

It's something that perl needs to fix. There's perlbrew issue 701 that's related to how MakeMaker looks for libraries.

Slapstick answered 15/12, 2020 at 5:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.