opensource icon indicating copy to clipboard operation
opensource copied to clipboard

Failure trying to cross compile GO 1.7

Open matt-richardson opened this issue 9 years ago • 1 comments

I've just been following the (excellent) instructions in Get the required software for Windows and when I got to step 9 from Install Go and cross-compile it, it fails with:

PS C:\go\src> .\make.bat
##### Building Go bootstrap tool.
cmd/dist
ERROR: Cannot find C:\Users\matt\Go1.4\bin\go.exe
"Set GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4."

I'm running on WIndows Server 2016 TP5.

I tried to install Go 1.4 via the msi, and that uninstalled Go 1.7. I then re-installed Go 1.7, and that uninstalled Go 1.4.

matt-richardson avatar Sep 01 '16 05:09 matt-richardson

Solved it by:

  1. download go1.4.windows-amd64.zip and extract to c:\go.1.4
  2. download go1.7.windows-amd64.zip and extract to c:\go.1.7
  3. run make.bat in c:\go.1.4\src
  4. run set GOOS=linux
  5. run set GOARCH=amd64
  6. run make.bat in c:\go1.7\src

I'm unblocked, however I'd still suggest that the instructions are updated to keep this part as super smooth and polished as the rest.

Keep up the great work!

matt-richardson avatar Sep 01 '16 06:09 matt-richardson