prototool
prototool copied to clipboard
Support Apple arm64 arch
when I run prototool generate
in my Macbook pro M1 chip, it prints unsupported value for runtime.GOARCH: arm64
, then I searched the repo and found this function in internal/protoc/downloader.go
:
func getUnameSUnameMPaths(goos string, goarch string) (string, string, error) {
var unameS string
switch goos {
case "darwin":
unameS = "Darwin"
case "linux":
unameS = "Linux"
default:
return "", "", fmt.Errorf("unsupported value for runtime.GOOS: %v", goos)
}
var unameM string
switch goarch {
case "amd64":
unameM = "x86_64"
default:
return "", "", fmt.Errorf("unsupported value for runtime.GOARCH: %v", goarch)
}
return unameS, unameM, nil
}
So I guess it is a bug of prototool
and composed this issue to ask for some help.
The same problem
forgot about mac m1 users ?
Facing the same issue, is there any workaround until this is fixed?
Facing the same issue, is there any workaround until this is fixed?
In my case, I just add arm64
to the switch. Works for me.
https://github.com/hanksudo/prototool/commit/3086a4b512489fd4bb77d4f0377a961047925bd7
Any updates on this one?
Seems like protobuf is not publishing precompiled binaries for Apple ARM machines yet. More details here https://github.com/protocolbuffers/protobuf/issues/8428
Seems like protobuf now supports apple arm. I'd really like to use the prototool docker image on apple silicon (though that would mean linux arm, not apple arm)! Currently, with rosetta2, it's not possible to use it. qemu throws a segfault.
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
I still get the same error
I was looking for solution and found this https://hub.docker.com/r/decoder89/prototool-m1/tags Works for me