Skip to content
This repository has been archived by the owner on Mar 4, 2022. It is now read-only.

Support Apple arm64 arch #574

Open
zephyrpathsofglory opened this issue Feb 18, 2021 · 9 comments
Open

Support Apple arm64 arch #574

zephyrpathsofglory opened this issue Feb 18, 2021 · 9 comments

Comments

@zephyrpathsofglory
Copy link

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.

@jinsuojinsuo
Copy link

The same problem

@totmaxim
Copy link

forgot about mac m1 users ?

@mehuled
Copy link

mehuled commented Jul 7, 2021

Facing the same issue, is there any workaround until this is fixed?

@hanksudo
Copy link

hanksudo commented Jul 7, 2021

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.

hanksudo@3086a4b

@ddiaz914
Copy link

ddiaz914 commented Oct 6, 2021

Any updates on this one?

@shettyh
Copy link

shettyh commented Oct 7, 2021

Seems like protobuf is not publishing precompiled binaries for Apple ARM machines yet. More details here protocolbuffers/protobuf#8428

@freisenhauer
Copy link

freisenhauer commented Nov 16, 2021

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

@peterdemartini
Copy link

I still get the same error

@hsqds
Copy link

hsqds commented Feb 4, 2022

I was looking for solution and found this https://hub.docker.com/r/decoder89/prototool-m1/tags
Works for me

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants