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

failed to "go build" #33736

Open
mrjesen opened this issue Aug 20, 2019 · 5 comments

Comments

@mrjesen
Copy link

commented Aug 20, 2019

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

$ go version
go version go1.12.7 windows/amd64

Does this issue reproduce with the latest release?

yes

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

go env Output
$ go env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Administrator\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=D:\Golang\gopath
set GOPROXY=https://mirrors.aliyun.com/goproxy/
set GORACE=
set GOROOT=D:\Golang\Go
set GOTMPDIR=
set GOTOOLDIR=D:\Golang\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
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\ADMINI~1\AppData\Local\Temp\go-build513384590=/tmp/go-build -gno-record-gcc-switches

What did you do?

sometimes I run the "go build" command,and then failed to run the new program. .

What did you expect to see?

new program created!

What did you see instead?

it is created but when i run it ,the command line gives me a tip: The program is not a 64bit program.
test.zip

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Aug 20, 2019

Please tell us exactly what you did and show us exactly what happened. Cut and paste from the terminal window. Thanks.

@mrjesen

This comment has been minimized.

Copy link
Author

commented Aug 22, 2019

2019-8-22 16:20:33 Build success! And it runs success.
2019-8-22 16:30:43 Build failed return : C:\Users\ADMINI~1\AppData\Local\Temp\go-build805579086\b001\exe\main.exe: This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.

2019-8-22 16:37:46 I have found that : When i restart my pc ,the problem will be solved. and after some time,the problem start again.

@mrjesen

This comment has been minimized.

Copy link
Author

commented Aug 22, 2019

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Aug 23, 2019

You didn't tell us exactly what you did. What exact command are you running that produces the output

2019-8-22 16:30:43 Build failed return : C:\Users\ADMINI~1\AppData\Local\Temp\go-build805579086\b001\exe\main.exe: This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.

That said, see https://golang.org/doc/faq#virus .

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Aug 23, 2019

It's also quite likely that you will get a better and faster answer in a forum. See https://golang.org/wiki/Questions .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.