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: bootstrap build of go fails on windows amd64 #36691
Comments
This is caused by the the gcc toolchain you are using. What is it? |
Anyone know if |
Win docs say <process.h> |
Hmmm, we already |
I don't know if this is useful, but I've seen that error in the past when trying to build from source on windows with a cygwin gcc (which anyway is not officially supported for bootstrapping Go on windows) |
See also all the related conversation in #35006. This might even be a dup. |
I agree #35006 (comment) might help. @lovettchris download http://musl.cc/x86_64-w64-mingw32-native.zip, unzip it anywhere, add bin subdirectory to your PATH, and try again. You can also set CGO_ENABLED=0 and that will build Go without any gcc installed. You won't be able to do Cgo, if you do that. Thank you. Alex |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
trying to use the go bootstrap version 1.4 (as per https://golang.org/doc/install/source) to build the latest go sources. But it fails.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Downloaded and unpacked go1.4.windows-amd64.zip to c:\go
set GOROOT_BOOTSTRAP=c:\go
set GOROOT_FINAL=d:\go
cloned the latest github.com/golang/go
cd src
all.bat
What did you expect to see?
Successful build of the new version of go.
What did you see instead?
d:\git\golang\go\src>all.bat
Building Go cmd/dist using c:\go
Building Go toolchain1 using c:\go.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
Building Go toolchain3 using go_bootstrap and Go toolchain2.
Building packages and commands for windows/amd64.
// runtime/cgo
gcc_libinit_windows.c: In function 'x_cgo_sys_thread_create':
gcc_libinit_windows.c:57:12: error: implicit declaration of function '_beginthread'; did you mean 'OpenThread'? [-Werror=implicit-function-declaration]
thandle = _beginthread(func, 0, arg);
^~~~~~~~~~~~
OpenThread
cc1: all warnings being treated as errors
go: failed to remove work dir: GetFileInformationByHandle C:\Users\Chris\AppData\Local\Temp\go-build549624342\NUL: Incorrect function.
go tool dist: FAILED: d:\git\golang\go\pkg\tool\windows_amd64\go_bootstrap install -gcflags=all= -ldflags=all= std cmd: exit status 2
The system cannot find the batch label specified - fail
go: failed to remove work dir: GetFileInformationByHandle C:\Users\Chris\AppData\Local\Temp\go-build900619142\NUL: Incorrect function.
The text was updated successfully, but these errors were encountered: