August 27, 2022

On Thursday, 25 August 2022 at 14:44:22 UTC, MichaelBi wrote:

>

-iMac ~ % curl -fsS https://dlang.org/install.sh | bash -s dmd
Unsupported Arch arm64

I've fixed this quite some time ago:
https://github.com/dlang/installer/pull/491

Apparently it was never released?

-Johan

August 29, 2022

On Thursday, 25 August 2022 at 14:19:47 UTC, MichaelBi wrote:

>

I downloaded the new dmd 2.1 on Mac, but with fail message of "unsupported Arch arm64". how can I do? thanks.

Step 1

Get LDC here: https://github.com/ldc-developers/ldc/releases

  • If you are running on Apple Silicon, be sure to use the Universal LDC package (for LDC version >= 1.30).

  • If the "Universal" build is not available, use the x86_64 LDC package instead. (for LDC version < 1.30).

Those builds are cross-compilers, able to target both x86_64 and arm64, with flags -a x86_64-apple-macos and -a arm64-apple-macos respectively.

Step 2

Make sure you are using the dub and ldc2 executable from those builds. Please install Xcode 12.2+ to.

$ sudo ln -s /my/absolute/path/to/ldc-xxx/bin/ldc2 /usr/local/bin/ldc2
$ sudo ln -s /my/absolute/path/to/ldc-xxx/bin/dub /usr/local/bin/dub
  • build a x86_64 program with: dub -a x86_64-apple-macos
  • build an arm64 program with: dub -a arm64-apple-macos
1 2
Next ›   Last »