Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: Go 1.10 Windows compile or get command fails with syscall ERROR_* messages / too many errors #23988

Closed
suglasp opened this issue Feb 21, 2018 · 3 comments

Comments

@suglasp
Copy link

suglasp commented Feb 21, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.10 windows/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

Windows 7 SP1 Pro - x64
Windows 10 Ent - x64

What did you do?

Compile a program with go build -o <files.go, ... >
Run a Go Get command to download a github repo

If i cross compile on Windows for Linux or Solaris, the project compiles. If i compile native Windows x64 or Crosscompile Windows x86, it fails.

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

What did you expect to see?

A compiled binary

What did you see instead?

I always get this error message (on two different Windows OS Flavors AND machines).
No matter if i compile or run a go get command, it fails with same error messages.

syscall

E:\Go\src\syscall\ztypes_windows.go:9:36: ERROR_FILE_NOT_FOUND redeclared in thi
s block
previous declaration at E:\Go\src\syscall\types_windows.go:9:36
E:\Go\src\syscall\ztypes_windows.go:10:36: ERROR_PATH_NOT_FOUND redeclared in th
is block
previous declaration at E:\Go\src\syscall\types_windows.go:10:36
E:\Go\src\syscall\ztypes_windows.go:11:36: ERROR_ACCESS_DENIED redeclared in thi
s block
previous declaration at E:\Go\src\syscall\types_windows.go:11:36
E:\Go\src\syscall\ztypes_windows.go:12:36: ERROR_NO_MORE_FILES redeclared in thi
s block
previous declaration at E:\Go\src\syscall\types_windows.go:12:36
E:\Go\src\syscall\ztypes_windows.go:13:36: ERROR_HANDLE_EOF redeclared in this b
lock
previous declaration at E:\Go\src\syscall\types_windows.go:13:36
E:\Go\src\syscall\ztypes_windows.go:14:36: ERROR_NETNAME_DELETED redeclared in t
his block
previous declaration at E:\Go\src\syscall\types_windows.go:14:36
E:\Go\src\syscall\ztypes_windows.go:15:36: ERROR_FILE_EXISTS redeclared in this
block
previous declaration at E:\Go\src\syscall\types_windows.go:15:36
E:\Go\src\syscall\ztypes_windows.go:16:36: ERROR_BROKEN_PIPE redeclared in this
block
previous declaration at E:\Go\src\syscall\types_windows.go:16:36
E:\Go\src\syscall\ztypes_windows.go:17:36: ERROR_BUFFER_OVERFLOW redeclared in t
his block
previous declaration at E:\Go\src\syscall\types_windows.go:17:36
E:\Go\src\syscall\ztypes_windows.go:18:36: ERROR_INSUFFICIENT_BUFFER redeclared
in this block
previous declaration at E:\Go\src\syscall\types_windows.go:18:36
E:\Go\src\syscall\ztypes_windows.go:18:36: too many errors

@suglasp
Copy link
Author

suglasp commented Feb 21, 2018

Just to note : i switched back to Go 1.9.4 so i can continue using go.

@davecheney
Copy link
Contributor

davecheney commented Feb 21, 2018

Hi. Sorry to hear you're having problems. Error reports of this kind are common if you've unpacked the .zip file of one go installation over another.

I recommend

  1. deleting E:\Go
  2. Download and unzip a fresh copy of Go 1.10 from the gaoling.org website.
  3. Unset %GOROOT%. As of Go 1.10 you no longer need to set %GOROOT% because the Go tool can figure out the correct value on its own. You can double check this by running
go env GOROOT

And double checking the value reported matched where you unpacked Go.

I'm going to close this bug as it's likely this was an installation error, not a bug in Go. If you're still having problems feel free to reopen the issue, or see https://golang.org/wiki/Questions for good places to ask questions.

@mikioh mikioh changed the title Go 1.10 Windows compile or get command fails with syscall ERROR_* messages / too many errors cmd/go: Go 1.10 Windows compile or get command fails with syscall ERROR_* messages / too many errors Feb 21, 2018
@suglasp
Copy link
Author

suglasp commented Feb 22, 2018

Removed GOROOT env var.
Redownloaded zip file, delete e:\go en place fresh copy of the go compiler fixed the problem.

@golang golang locked and limited conversation to collaborators Feb 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants