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: TestNoteReading fails on Windows when CGO_ENABLED=0 #13450

Closed
jayschwa opened this issue Dec 2, 2015 · 2 comments
Closed

cmd/go: TestNoteReading fails on Windows when CGO_ENABLED=0 #13450

jayschwa opened this issue Dec 2, 2015 · 2 comments
Milestone

Comments

@jayschwa
Copy link
Contributor

jayschwa commented Dec 2, 2015

I encountered a test failure while running all.bat on my Windows 10 machine. Working copy is 0ea1c1f. GOROOT_BOOTSTRAP points to an installation of Go 1.5.1. CGO_ENABLED=0 because I don't have a C toolchain installed. The failure seems cgo-related though:

--- FAIL: TestNoteReading (0.39s)
        go_test.go:257: running testgo [build -ldflags -buildid=TestNoteReading-Build-ID -o C:\Users\jaysc\AppData\Local\Temp\gotest202420732\hello.exe C:\Users\jaysc\AppData\Local\Temp\gotest202420732\hello.go]
        go_test.go:257: running testgo [build -ldflags -buildid=TestNoteReading-Build-ID -linkmode=external -o C:\Users\jaysc\AppData\Local\Temp\gotest202420732\hello.exe C:\Users\jaysc\AppData\Local\Temp\gotest202420732\hello.go]
        go_test.go:276: standard error:
        go_test.go:277: # command-line-arguments
                warning: unable to find runtime/cgo.a
                C:\Users\jaysc\Documents\GitHub\golang\go\pkg\tool\windows_amd64\link.exe: running gcc failed: exec: "gcc": executable file not found in %PATH%


        go_test.go:286: go [build -ldflags -buildid=TestNoteReading-Build-ID -linkmode=external -o C:\Users\jaysc\AppData\Local\Temp\gotest202420732\hello.exe C:\Users\jaysc\AppData\Local\Temp\gotest202420732\hello.go] failed unexpectedly: exit status 2
FAIL
FAIL    cmd/go  26.458s

I temporarily modified my working copy to skip the part that builds with -linkmode=external. All tests pass otherwise.

@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Dec 2, 2015
@alexbrainman
Copy link
Member

I can reproduce this, if I remove gcc from my PATH, and set CGO_ENABLED=0 and run all.bat. But is that expected to work? If yes, should we have builder for that combination? Is that important? Remember that Go on windows does not use cgo anywhere in standard library.

Alex

@gopherbot
Copy link

CL https://golang.org/cl/17941 mentions this issue.

@rsc rsc closed this as completed in 37f2afa Dec 17, 2015
@golang golang locked and limited conversation to collaborators Dec 29, 2016
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