how to install the new dmd on Mac M1?
Steven Schveighoffer
schveiguy at gmail.com
Thu Aug 25 15:19:56 UTC 2022
On 8/25/22 10:44 AM, MichaelBi wrote:
> On Thursday, 25 August 2022 at 14:37:01 UTC, Steven Schveighoffer wrote:
>> On 8/25/22 10:19 AM, MichaelBi wrote:
>>> I downloaded the new dmd 2.1 on Mac, but with fail message of
>>> "unsupported Arch arm64". how can I do? thanks.
>>
>> DMD is x86 only. M1 macs can run x86 via rosetta.
>>
>> I haven't had this specific problem. Can you list the actual commands
>> you are running, and the output from the system?
>>
>> -Steve
>
> it's simple as following:
>
> -iMac ~ % curl -fsS https://dlang.org/install.sh | bash -s dmd
> Unsupported Arch arm64
So install.sh is checking the architecture, and failing because the OS
reports it as arm64.
```sh
case $(uname -m) in
x86_64|amd64) ARCH=x86_64; MODEL=64;;
aarch64) ARCH=aarch64; MODEL=64;;
i*86) ARCH=x86; MODEL=32;;
*)
fatal "Unsupported Arch $(uname -m)"
;;
```
You could change the line that starts with `aarch64` to `aarch64|arm64`
That might work. I'm not sure, because really you want x86_64 for dmd
(there is no aarch64 or arm64 build of dmd).
Have you tried using the dmg package?
-Steve
More information about the Digitalmars-d-learn
mailing list