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

Build Issue on Windows #44782

Closed
tossp opened this issue Mar 4, 2021 · 11 comments
Closed

Build Issue on Windows #44782

tossp opened this issue Mar 4, 2021 · 11 comments
Labels
FrozenDueToAge OS-Windows WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@tossp
Copy link

tossp commented Mar 4, 2021

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

C:\Users\ts\develop\go.old\bin>go version
go version go1.15.8 windows/amd64

Does this issue reproduce with the latest release?

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

go env Output
C:\Users\ts\develop\go.old\bin>go env
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\ts\AppData\Local\go-build
set GOENV=C:\Users\ts\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\ts\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\ts\go
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,https://goproxy.io,direct
set GOROOT=C:\Users\ts\develop\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Users\ts\develop\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=NUL
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 -fmessage-length=0 -fdebug-prefix-map=C:\Users\ts\AppData\Local\Temp\go-build693598030=/tmp/go-build -gno-record-gcc-switches

What did you do?

Try to compile f21be2f

What did you expect to see?

Compiled successfully

What did you see instead?

C:\Users\ts\develop\go\src>all.bat
Building Go cmd/dist using C:\Users\ts\develop\go.old
Building Go toolchain1 using C:\Users\ts\develop\go.old
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
go install cmd/compile: copying C:\Users\ts\AppData\Local\Temp\go-build888002794\b092\exe\a.out.exe: open C:\Users\ts\develop\go\pkg\tool\windows_amd64\compile.exe: The process cannot access the file because it is being used by another process.
go tool dist: FAILED: C:\Users\ts\develop\go\pkg\tool\windows_amd64\go_bootstrap install -gcflags=all= -ldflags=all= -i cmd/asm cmd/cgo cmd/compile cmd/link: exit status 1

@AlexRouSg
Copy link
Contributor

I would suggest chcking your antivirus first.

@tossp
Copy link
Author

tossp commented Mar 4, 2021

I tried to shut down Micorsoft defender, but it still failed to compile. Previously, version 1.15. X was compiled normally.

@AlexRouSg
Copy link
Contributor

I am unable to reproduce this on windows and the error message ("The process cannot access the file because it is being used by another process.") is consistant with a antivirus interfering.

Not much can be done unless someone can reproduce this.

@seankhliao seankhliao added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Mar 4, 2021
@ALTree
Copy link
Member

ALTree commented Mar 4, 2021

Previously, version 1.15. X was compiled normally.

Often antivirus vendors incorrectly flag Go versions that were just released, while older versions work fine because their binaries were whitelisted after some week.

@tossp
Copy link
Author

tossp commented Mar 4, 2021

host system info

C:\Users\ts>systeminfo | findstr Build
OS 版本:          10.0.19041 暂缺 Build 19041

@tossp
Copy link
Author

tossp commented Mar 4, 2021

go

@ALTree
Copy link
Member

ALTree commented Mar 4, 2021

I would try - if you haven't already -, in order 1) to reboot the machine 2) to nuke the Go folder and clone the repo again. If the issue persists then it's very likely the antivirus, and the only things you can do are 1) disable it 2) wait for them to whitelist Go1.16 and update their signature database.

We've seen this issue in the past, it was never a bug in Go.

@networkimprov
Copy link

@gopherbot add OS-Windows

@tossp
Copy link
Author

tossp commented Mar 5, 2021

@ALTree Thank you very much for your help. According to your suggestion, I tried the same question again

@AlexRouSg
Copy link
Contributor

I tried turning on windows defender and it still compiled fine for me.
So you might want to look at other security software you have.

If you are using onedrive or other backup software on your user folder, it could cause this if it tries to sync at the same time you're compileing.

@tossp
Copy link
Author

tossp commented Mar 5, 2021

@AlexRouSg Thank you very much. I retested as you suggested, but I still couldn't compile. This should be a special case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge OS-Windows WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

6 participants