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

Pending my account being opened, asking here: how to build macOS Perl for arm64. I can build Perl for intel but have not figured out how to make for arm64. Ideally I'd like a universal executable with both intel and arm64, but I'll settle for just arm64 and attempt to lipo the two architectures together myself. All this because Apple is dropping support for scripting languages and I need to support M1 chipped machines. Thanks, Steve Lidie

Replies are listed 'Best First'.
Re: how to build arm64 Perl
by 1nickt (Canon) on Feb 14, 2021 at 20:49 UTC

    Hi, I may be misinformed but IIUC Apple is simply dropping the supplied binaries for Python, Perl etc. Nothing I am aware of stops you from building your own Perl with Perlbrew (which has been recommended on MacOS for some time).

    Hope this helps!


    The way forward always starts with a minimal test.
      Does perlbrew build for arm64? I already build for intel and embed it in my Cocoa App, guarding for the future when Apple supplied perl is no longer available. I want to build a Universal perl executable for embedding ...

        The steps to building Perl aren't complicated and they are outlined in the INSTALL file that comes with the Perl tarball.

        My suggestion is that you build Perl from that on an M1 Apple machine. If you don't have an ARM-based MacOS machine, you will have to find out how to cross-compile Perl. This is outlined in the same file, in the Cross-compilation section.

        Since the ARM-Macs are still *BSD-based, I have no reason to suspect that Perl would not build on them.