swift-emacs / swift-mode

Emacs support for Apple's Swift programming language.
GNU General Public License v3.0
363 stars 47 forks source link

Does not work on M1 Macs #177

Open konrad1977 opened 2 years ago

konrad1977 commented 2 years ago

After some investigation of my own swift-stuff for emacs I noticed that "uname -a" is different in iTerm compared to emacs shell. iTerm (rosetta) returns x86_64 while Emacs returns arm64.

The only way I could get xcodebuild to run correctly on M1 is if its prepended with "env /usr/bin/arch - x86_64 \\". Just to be clear, the command runs oki but the -destination with iOS Simulator doesnt work without it.

Skärmavbild 2022-03-19 kl  12 01 53
bestlem commented 2 years ago

Why not use iTerm under arm?

konrad1977 commented 2 years ago

It has nothing to do with the terminal, but the xcrun and xcodebuild that fails to build for the correct architecture.

rgri commented 11 months ago

Is this at all related to a Cannot invoke executable error?

taku0 commented 11 months ago

I don't have Apple silicon Mac yet. Please provide details (steps to reproduce, expected behavior, actual behavior, and possible fix (if any)).

bestlem commented 11 months ago

I think everything is working as expected. uname -a reports what architecture is running.

On an M1 it is arm64 unless you explicitly do something. Here the OP has told iTerm to run under Rosetta and so the code software in iTerm is running using the Intel architecture. For most users of iTerm who run natively you would get uname giving arm as the architecture) Emacs is running from the GUI and so is running natively.

I think the question here is why is the OP running iTerm under Rosetta - what is the issue they are trying to solve with that?