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/compile: Go 1.8.3 function redeclared #20798

Closed
jeffguorg opened this issue Jun 26, 2017 · 2 comments
Closed

cmd/compile: Go 1.8.3 function redeclared #20798

jeffguorg opened this issue Jun 26, 2017 · 2 comments

Comments

@jeffguorg
Copy link

jeffguorg commented Jun 26, 2017

Please answer these questions before submitting your issue. Thanks!

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

go version go1.8.3 windows/amd64

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

go env

set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows

Windows build:
Win10 Pro Insider Preview 1703(16215.1000)

What did you do?

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

Tried to run a hello world after installing go.

What did you expect to see?

A compiled executable binary program

What did you see instead?

I installed Go on my Win today. I found it weird that VS Code cannot install packages correctly so I tried to write a simplest hello world. But the problem is still there. And this is the compiler's output:

# runtime
D:\Go\src\runtime\lfstack_amd64.go:16: lfstackPack redeclared in this block
	previous declaration at D:\Go\src\runtime\lfstack_64bit.go:37
D:\Go\src\runtime\lfstack_amd64.go:20: lfstackUnpack redeclared in this block
	previous declaration at D:\Go\src\runtime\lfstack_64bit.go:41
D:\Go\src\runtime\os_windows.go:14: _NSIG redeclared in this block
	previous declaration at D:\Go\src\runtime\os2_windows.go:18
D:\Go\src\runtime\os_windows.go:96: _AddVectoredExceptionHandler redeclared in this block
	previous declaration at D:\Go\src\runtime\os1_windows.go:92
D:\Go\src\runtime\os_windows.go:96: _CloseHandle redeclared in this block
	previous declaration at D:\Go\src\runtime\os1_windows.go:92
D:\Go\src\runtime\os_windows.go:96: _CreateEventA redeclared in this block
	previous declaration at D:\Go\src\runtime\os1_windows.go:92
D:\Go\src\runtime\os_windows.go:96: _CreateIoCompletionPort redeclared in this block
	previous declaration at D:\Go\src\runtime\os1_windows.go:92
D:\Go\src\runtime\os_windows.go:96: _CreateThread redeclared in this block
	previous declaration at D:\Go\src\runtime\os1_windows.go:92
D:\Go\src\runtime\os_windows.go:96: _CreateWaitableTimerA redeclared in this block
	previous declaration at D:\Go\src\runtime\os1_windows.go:92
D:\Go\src\runtime\os_windows.go:96: _DuplicateHandle redeclared in this block
	previous declaration at D:\Go\src\runtime\os1_windows.go:92
D:\Go\src\runtime\os_windows.go:96: too many errors
github.com/nsf/gocode (download)
runtime
@ALTree
Copy link
Member

ALTree commented Jun 26, 2017

This usually happens when you have borked your go installation by mixing toolchains with different versions. Please try to remove all the toolchains and pkg folders you have and reinstall go from scratch.

If you are upgrading from an older version of Go you must first remove the existing version.
To remove an existing Go installation from your system delete the go directory. This is usually /usr/local/go under Linux, Mac OS X, and FreeBSD or c:\Go under Windows.

@ianlancetaylor
Copy link
Contributor

The file runtime/lfstack_amd64.go existed in Go 1.6 but was removed in Go 1.7 and Go 1.8. Something has gone wrong with your source tree.

Closing because there is nothing we can do to fix this.

@mikioh mikioh changed the title Go 1.8.3 function redeclared cmd/compile: Go 1.8.3 function redeclared Aug 2, 2017
@golang golang locked and limited conversation to collaborators Aug 3, 2018
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

4 participants