0

I want to learn Go. I installed Go 1.13.5 on 64-bit Windows 10. I started out trying to build the following hello world program:

package hello

import ("fmt")

func main() {
    fmt.Printf("Hello world!")

}

However, when I try to build it or any other Go program, I get errors

c:\go\src\runtime\stubs_x86.go:10:6: stackcheck redeclared in this block
        previous declaration at c:\go\src\runtime\stubs_amd64x.go:10:6
c:\go\src\runtime\unaligned1.go:11:6: readUnaligned32 redeclared in this block
        previous declaration at c:\go\src\runtime\alg.go:321:40
c:\go\src\runtime\unaligned1.go:15:6: readUnaligned64 redeclared in this block
        previous declaration at c:\go\src\runtime\alg.go:329:40

Does anyone know what is going wrong?

3
  • 1
    how do you install go? did you just clone it from the go github repo?
    – novalagung
    Dec 30, 2019 at 1:15
  • Did you upgrade from another version?
    – Adrian
    Dec 30, 2019 at 4:18
  • 1
    @Adrian, yep, apparently the Windows for Go does not completely remove C:\Go like it should. I had to manually delete the directory after running the uninstaller.
    – Sean W.
    Dec 30, 2019 at 13:37

1 Answer 1

5

It seems a common issue of Go v1.13. You can try to do a clean uninstall and reinstall. See this post.

1
  • 1
    @Adrian, yep, apparently the Windows for Go does not completely remove C:\Go like it should. I had to manually delete the directory after running the uninstaller. Thanks!
    – Sean W.
    Dec 30, 2019 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.