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.

Flavio Del Grosso
  • 490
  • 2
  • 7
  • 21
  • 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. – ikegami Dec 14 '20 at 22:35
  • 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. – Flavio Del Grosso Dec 14 '20 at 22:44
  • Same error also installing the 5.32.0 version @ikegami – Flavio Del Grosso Dec 14 '20 at 23:13
  • See also [Perl blead issue on macOS 11](https://www.nntp.perl.org/group/perl.perl5.porters/2020/11/msg258581.html) – Håkon Hægland Dec 14 '20 at 23:41

2 Answers2

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.

ikegami
  • 367,544
  • 15
  • 269
  • 518
  • 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. – mcdave Mar 14 '21 at 00:57
3

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

brian d foy
  • 129,424
  • 31
  • 207
  • 592