Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Compiling darwin/amd64: syscall_syscallX redeclared in this block #147

Open
onetwopunch opened this issue Sep 14, 2020 · 1 comment
Open

Comments

@onetwopunch
Copy link

It seems there may be an issue cross compiling from linux/amd64 to Mac (darwin/amd64).

Go version:

$ go version
go version go1.15 linux/amd64

Error:

$ gox -osarch="darwin/amd64" -output "build/{{.OS}}_{{.Arch}}/myapp" .
Number of parallel builds: 3

-->    darwin/amd64: github.com/onetwopunch/myapp

1 errors occurred:
--> darwin/amd64 error: exit status 2
Stderr: # runtime
/usr/local/go/src/runtime/sys_darwin_64.go:15:6: syscall_syscallX redeclared in this block
        previous declaration at /usr/local/go/src/runtime/sys_darwin.go:73:60
/usr/local/go/src/runtime/sys_darwin_64.go:21:6: syscallX redeclared in this block
        previous declaration at /usr/local/go/src/runtime/sys_darwin.go:79:6

@marcosnils
Copy link

Came across this the other day. You just need to remove your /usr/local/go folder and re-install go. This usually happens when "upgrading" go and un-taring the new version on top of the previous one

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

2 participants