On the arm64 architecture m1, go1.21.4.darwin-amd64.pkg can be successfully installed, and it seems to run normally.

136 views
Skip to first unread message

fliter

unread,
Nov 20, 2023, 6:50:59 AM11/20/23
to golang-nuts
On the arm64 architecture m1, go1.21.4.darwin-amd64.pkg can be successfully installed, and it seems to run normally....I am very shocked.

Is this because of any adaptations made by Go? Going one step further, is it possible to not distinguish the CPU architecture during future installations and just focus on the operating system type?

Bruno Albuquerque

unread,
Nov 20, 2023, 7:22:31 AM11/20/23
to fliter, golang-nuts
This is Rosetta 2. It is not Go, it is MacOS.

-Bruno

On Mon, Nov 20, 2023, 6:51 AM fliter <imc...@gmail.com> wrote:
On the arm64 architecture m1, go1.21.4.darwin-amd64.pkg can be successfully installed, and it seems to run normally....I am very shocked.

Is this because of any adaptations made by Go? Going one step further, is it possible to not distinguish the CPU architecture during future installations and just focus on the operating system type?

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/9331d217-1aee-490f-bdac-049d762d4d68n%40googlegroups.com.

fliter

unread,
Nov 20, 2023, 8:42:16 AM11/20/23
to golang-nuts
Thanks. It does seem to be related to Rosetta

Bruno Albuquerque

unread,
Nov 20, 2023, 8:45:58 AM11/20/23
to fliter, golang-nuts
If you are running the amd64 Go version on a Apple silicon Mac, it is. That is exactly what Rosetta 2 makes possible. It works for Go and also for most AMD64 binaries out there.

g...@iltofa.com

unread,
Nov 20, 2023, 11:43:15 AM11/20/23
to fliter, golang-nuts
This is because it runs under Rosetta 2. 
The emulation is pretty fast, and it’s possible to detect it both from the GUI of Activity Monitor, than on the command line

ps -p `fuser /usr/libexec/rosetta/runtime | sed -e 's/.*: //' | sed -e 's/ /,/g'`


From inside the program it should be fairly easy too… 

HTH,
gt

Il giorno 20 nov 2023, alle ore 12:50, fliter <imc...@gmail.com> ha scritto:

On the arm64 architecture m1, go1.21.4.darwin-amd64.pkg can be successfully installed, and it seems to run normally....I am very shocked.

Is this because of any adaptations made by Go? Going one step further, is it possible to not distinguish the CPU architecture during future installations and just focus on the operating system type?

fliter

unread,
Nov 20, 2023, 10:45:27 PM11/20/23
to golang-nuts
Thanks for the useful replay!
Reply all
Reply to author
Forward
0 new messages