Reputation: 47
I saw that question multiple times and tried all I can to solve it with the given answers, but it seems it is something else..
I installed the arm64-Version of Go as mentioned in every answer about that question. I have a Macbook with Apple M1-Chip.
Darwin/arm64 is installed, and I can also build a go program in terminal and run it through the terminal, but doing it with fn + f5 gives me that error:
"Failed to launch: could not launch process: can not run under Rosetta, check that the installed build of Go is right for your CPU architecture"
My go env Is like that:
GO111MODULE="off"
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/myName/Library/Caches/go-build"
GOENV="/Users/myName/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/myName/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/myName/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.18"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/jt/r0dd0zvj0jv0jfmdbmxxszqw0000gn/T/go-build3752056080=/tmp/go-build -gno-record-gcc-switches -fno-common"
How is that wrong? I mean, it's buildable by terminal so it should be fixable somehow, right?
Upvotes: 2
Views: 711
Reputation: 80
I have an M1, a use the insiders-edition of VSC (for arm) I have go version go1.18 darwin/arm64 I have dlv version Delve Debugger Version: 1.8.1 Build: $Id: d85f1f6b736db99a1c239c34fd4a081dcff08a3c
It only complains about Rosetta if the apllication runs on Intel. So one of those if NOT arm. Did you have a previous AMD installation? Are you sure that's gone?
Upvotes: 1