Hello Monks,

I try to upgrade perl once a year or so using perlbrew on macOS 12.7.2. My last was 5.36.1 in August 2023, a flawless build. Today I tried 5.38.2 to get the latest stable release with all the security fixes, and when that failed, tried 5.36.3, which also failed. Interestingly, both failed for exactly the same build steps, To wit:

Test Summary Report    perl 5.36.3
-------------------
op/magic.t                                     (Wstat: 0 Tests: 208 Failed: 10)
  Failed tests:  181-184, 186-187, 190, 193, 197, 199
Files=2767, Tests=1206617, 935 wallclock secs (65.29 usr 13.91 sys + 570.01 cusr 79.49 csys = 728.70 CPU)
Result: FAIL
make: *** test_harness Error 10
##### Brew Failed #####


Test Summary Report     perl 5.38.2
-------------------
op/magic.t                                     (Wstat: 0 Tests: 208 Failed: 10)
  Failed tests:  181-184, 186-187, 190, 193, 197, 199
Files=2767, Tests=1183648, 874 wallclock secs (61.53 usr 13.42 sys + 513.09 cusr 79.00 csys = 667.04 CPU)
Result: FAIL
Finished test run at Thu Jan 25 12:50:13 2024.
make: *** test_harness Error 10
##### Brew Failed #####


# Failed test 181 - setting $0 does not break %ENV at op/magic.t line 87
#      got "foo foo"
# expected "foo"
# Failed test 182 - setting a key as undef does not delete it at op/magic.t line 87
#      got " "
# expected ""
# Failed test 183 - ENV store of stringified glob at op/magic.t line 87
#      got "*main::TODO *main::TODO"
# expected "*main::TODO"
#  diff at 11
#    after "*main::TODO *main::TODO"
#     have " *main::TODO"
#     want ""
# Failed test 184 - ENV store of stringified ref at op/magic.t line 87
#      got "ARRAY(0x7fadc3259390) ARRAY(0x7fadc3259390)"
# expected "ARRAY(0x7fadc3259390)"
#  diff at 21
#    after "ARRAY(0x7fadc3259390) ARRAY(0x7fadc32593"
#     have " ARRAY(0x7fadc3259390)"
#     want ""
# Failed test 186 - ENV store downgrades utf8 in setenv at op/magic.t line 87
#      got "eh zero <A0> eh zero <A0>"
# expected "eh zero <A0>"
# Failed test 187 - ENV store downgrades utf8 key in setenv at op/magic.t line 87
#      got "widekey widekey"
# expected "widekey"
# Failed test 190 - ENV store takes utf8-encoded key in setenv at op/magic.t line 87
#      got "widekey widekey"
# expected "widekey"
# Failed test 193 - ENV store encodes high utf8 in SV at op/magic.t line 87
#      got "X-Day ᦘ X-Day ᦘ"
# expected "X-Day ᦘ"
# Failed test 197 - at op/magic.t line 87
#      got "foo foo"
# expected "foo"
# Failed test 199 - at op/magic.t line 87
#      got "foo foo"
# expected "foo"
op/magic.t ........................................................... 
Failed 10/208 subtests

Any suggestions? I hate being stuck at 5.36.1. Thanks for your priceless help.

U P D A T E

Apple and macOS are driving me crazy. I purchased a second (refurbished) laptop to run Monterey, as I was maxed out with High Sierra on my go-to machine. I needed to run PDL and it would not build in 10.13.6, and now Perl > 5.36.1 will not build in Monterey. Perlbrew Perl 5.38.2 builds correctly in MacOS 10.13.6. op/magic-27839.t and op/magic.t pass all tests. The changes made to mg.c after 5.36.1 are extensive, more than 3k new code, so the devs broke something. I have little expectation now this will ever be fixed as support for macOS is low-priority. That PDL problem was never addressed to my satisfaction since the way PDL implements macros causes pdlcore.c to segmentation fault in Apple compilers, both clang and gcc. Bummer...

Filed bug report at GitHub

A N O T H E R  U P D A T E

I was asked by Leont at GitHub to try another compiler, so... I downloaded gcc-13 with Homebrew and aliased gcc, cc and clang to gcc-13. I then downloaded a fresh copy of Perl 5.36.3. Unfortunately, there is no diff with gcc-13. op/magic.t still barfs as described above. I see no way forward without help from Perl devs.

F I N A L  U P D A T E

See my reply to syphilis below. I fouled my anchor by writing my own env command and placing it forward of the native macOS env command. That broke the tests. Removing access to my env solved the problem.


In reply to op/magic.t fails to build in perl > 5.36.1 by perlboy_emeritus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.