-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
Description
What version of Go are you using (go version)?
[12:33:33 PM] D:/Code/hello-go> go version go version go1.16.5 windows/amd64 [12:34:01 PM] D:/Code/hello-go>
Does this issue reproduce with the latest release?
I just downloaded this install from https://golang.org/doc/install -- I'm not sure if there's a newer release
What operating system and processor architecture are you using (go env)?
go env Output
[12:34:01 PM] D:/Code/hello-go> go env set GO111MODULE= set GOARCH=amd64 set GOBIN= set GOCACHE=C:\Users\smcro\AppData\Local\go-build set GOENV=C:\Users\smcro\AppData\Roaming\go\env set GOEXE=.exe set GOFLAGS= set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOINSECURE= set GOMODCACHE=C:\Users\smcro\go\pkg\mod set GONOPROXY= set GONOSUMDB= set GOOS=windows set GOPATH=C:\Users\smcro\go set GOPRIVATE= set GOPROXY=https://proxy.golang.org,direct set GOROOT=D:\Software\Go set GOSUMDB=sum.golang.org set GOTMPDIR= set GOTOOLDIR=D:\Software\Go\pkg\tool\windows_amd64 set GOVCS= set GOVERSION=go1.16.5 set GCCGO=gccgo set AR=ar set CC=gcc set CXX=g++ set CGO_ENABLED=1 set GOMOD=D:\Code\hello-go\go.mod set CGO_CFLAGS=-g -O2 set CGO_CPPFLAGS= set CGO_CXXFLAGS=-g -O2 set CGO_FFLAGS=-g -O2 set CGO_LDFLAGS=-g -O2 set PKG_CONFIG=pkg-config set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\smcro\AppData\Local\Temp\go-build60325066=/tmp/go-build -gno-record-gcc-switches [12:34:49 PM] D:/Code/hello-go>
What did you do?
I'm following the steps on https://golang.org/doc/tutorial/getting-started
- Install Go
- Open a new terminal window
- Create a new directory
- Run
go mod init example.com/hello - Create
hello.go - Type
go run .
What did you expect to see?
I expect to see it saying Hello, World!
What did you see instead?
[12:33:04 PM] D:/Code> mkdir hello-go
Directory: D:\Code
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 26/6/2021 12:33 PM hello-go
[12:33:06 PM] D:/Code> cd .\hello-go\
[12:33:07 PM] D:/Code/hello-go> go mod init example.com/hello
go: creating new go.mod: module example.com/hello
[12:33:12 PM] D:/Code/hello-go> code .
[12:33:19 PM] D:/Code/hello-go> go run .
# runtime/internal/atomic
D:\Software\Go\src\runtime\internal\atomic\atomic_amd64x.go:13:6: Load redeclared in this block
previous declaration at D:\Software\Go\src\runtime\internal\atomic\atomic_amd64.go:16:24
D:\Software\Go\src\runtime\internal\atomic\atomic_amd64x.go:19:6: Loadp redeclared in this block
previous declaration at D:\Software\Go\src\runtime\internal\atomic\atomic_amd64.go:22:32
D:\Software\Go\src\runtime\internal\atomic\atomic_amd64x.go:25:6: Load64 redeclared in this block
previous declaration at D:\Software\Go\src\runtime\internal\atomic\atomic_amd64.go:28:26
D:\Software\Go\src\runtime\internal\atomic\atomic_amd64x.go:30:6: Xadd redeclared in this block
previous declaration at D:\Software\Go\src\runtime\internal\atomic\atomic_amd64.go:51:37
D:\Software\Go\src\runtime\internal\atomic\atomic_amd64x.go:33:6: Xadd64 redeclared in this block
previous declaration at D:\Software\Go\src\runtime\internal\atomic\atomic_amd64.go:54:39
D:\Software\Go\src\runtime\internal\atomic\atomic_amd64x.go:36:6: Xadduintptr redeclared in this block
previous declaration at D:\Software\Go\src\runtime\internal\atomic\atomic_amd64.go:57:47
D:\Software\Go\src\runtime\internal\atomic\atomic_amd64x.go:39:6: Xchg redeclared in this block
previous declaration at D:\Software\Go\src\runtime\internal\atomic\atomic_amd64.go:60:36
D:\Software\Go\src\runtime\internal\atomic\atomic_amd64x.go:42:6: Xchg64 redeclared in this block
previous declaration at D:\Software\Go\src\runtime\internal\atomic\atomic_amd64.go:63:38
D:\Software\Go\src\runtime\internal\atomic\atomic_amd64x.go:45:6: Xchguintptr redeclared in this block
previous declaration at D:\Software\Go\src\runtime\internal\atomic\atomic_amd64.go:66:45
D:\Software\Go\src\runtime\internal\atomic\atomic_amd64x.go:48:6: And8 redeclared in this block
previous declaration at D:\Software\Go\src\runtime\internal\atomic\atomic_amd64.go:75:27
D:\Software\Go\src\runtime\internal\atomic\atomic_amd64x.go:48:6: too many errors
[12:34:49 PM] D:/Code/hello-go> Get-Command go
CommandType Name Version Source
----------- ---- ------- ------
Application go.exe 0.0.0.0 D:\Software\Go\bin\go.exe
[12:39:40 PM] D:/Code/hello-go> more .\hello.go
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
[12:39:46 PM] D:/Code/hello-go>
Most online forums seem to indicate this is a problem with the install, however this is a fresh install. I don't know that I'm doing anything incorrect with the installation steps. The error also is not very helpful, and should probably be improved.