Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Error building a simple program with GOOS=darwin GOARCH=arm64 environment variables #39033
What version of Go are you using (
The problem is that darwin-arm64 does not support internal linking, which means that Go has to invoke the C linker, which means that you need to have a cross-linker from your host system to darwin-arm64. The Go linker is invoking the C linker, but it's not a cross-linker, so it fails.
At present we assume that darwin-arm64 is an iPhone, so in general it only works for building for a mobile device. See #38485.
I'm going to close this issue since there isn't much we can do at present, but if you want to repurpose this in some way that would be OK.