3

I am attempting to use the lastest version of Perlbrew to install the latest stable version of Perl (5.24.1) with multi-threading on a computer running macOS-Sierra.

Perlbrew appears to be installed correctly but when I run the command:

Perlbrew install perl-5.24.1 --thread or
perlbrew install stable --thread

The installation proceeds but then fails with the following message

Installation process failed. To spot any issues, check

  /Users/alan/perl5/perlbrew/build.perl-5.24.1.log

If some perl tests failed and you still want to install this distribution anyway,
do:

  (cd /Users/alan/perl5/perlbrew/build/perl-5.24.1; make install)

You might also want to try upgrading patchperl before trying again:

Looking at the log file as suggested above I find the following error messages at the end of the file:

1 error generated.
make[1]: *** [HiRes.o] Error 1
cc -c   -fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack- protector-strong -I/usr/local/include -Wall -Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings -Wthread-safety -O3 -DVERSION=\"1.9733\" -DXS_VERSION=\"1.9733\"  "-I../.."  -DTIME_HIRES_NANOSLEEP -DTIME_HIRES_CLOCK_GETTIME -DTIME_HIRES_CLOCK_GETRES -DTIME_HIRES_CLOCK_NANOSLEEP -DTIME_HIRES_CLOCK -DTIME_HIRES_STAT=1 -DATLEASTFIVEOHOHFIVE HiRes.c
HiRes.xs:945:15: error: use of undeclared identifier 'darwin_time_mutex'
MUTEX_INIT(&darwin_time_mutex);
          ^
1 error generated.
make[1]: *** [HiRes.o] Error 1
Unsuccessful make(dist/Time-HiRes): code=512 at make_ext.pl line 569.
make: *** [lib/auto/Time/HiRes/HiRes.bundle] Error 25
##### Brew Failed #####"

At other points in the log file, the following message appears several times too (although I have no idea how relevant this is to the failed installation process):

ld: warning: object file (xxxxxxxx) was built for newer OSX version (10.12) than being linked (10.4)

I have searched for similar problems on the web and found nothing close. I therefore wondering if this is a general issue with Perlbrew and Sierra or whether it is specific to my setup.

Obviously I am beginner at programming and programming in Perl especially so please keep any responses as simple as possible

Thanks for any help

Matteo
  • 14,696
  • 9
  • 68
  • 106

1 Answers1

3

You are not the only one: it's a bug. See Bug #128972 for perl5: Build failure on OS X 10.12 Sierra

It seems that the bug is solved for 5.26.0, but not (yet) back-ported to 5.24.2 and 5.22.4.

You could try with the bleeding-edge version (but that could very well have other problems):

perlbrew install perl-blead
Matteo
  • 14,696
  • 9
  • 68
  • 106
  • 1
    While this is technically correct, there is no 5.26.0 yet. The most current dev release at the moment is 5.25.9. We don't know if the patch will still be there in 5.26.0. – simbabque Jan 26 '17 at 17:19
  • Sorry I did some typing errors. As far as I can remember it should be fixed in 5.24.2 – Matteo Jan 26 '17 at 17:27
  • 1
    It's fixed in blead (the future 5.26.0), which is not the same as 5.24.2. According to that ticket, the fix has not been backported to the 5.24 branch, which is why ikegami edited your answer; "the bug is solved for the not yet released 5.24.2" is not true. – ThisSuitIsBlackNot Jan 26 '17 at 17:38
  • @ikegami Sorry I edited my post without seeing your edits. I reverted my last edit. – Matteo Jan 27 '17 at 07:21
  • Excellent. Thank you all for your help – Alan Hudson Jan 27 '17 at 11:27