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

runtime: TestCgoDLLImports fails with "fatal error: pthread.h: No such file or directory" #20666

Closed
alexbrainman opened this issue Jun 14, 2017 · 5 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@alexbrainman
Copy link
Member

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

go version devel +2f7fbf8851e Wed Jun 14 02:54:44 2017 +0000 windows/amd64

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

set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=d:\a
set GORACE=
set GOROOT=d:\a\go
set GOTOOLDIR=d:\a\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\brainman\AppData\Local\Temp\1\go-build204410399=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1
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

What did you do?

I run go test -run=TestCgoDLLImports runtime command.

What did you expect to see?

PASS

What did you see instead?

--- FAIL: TestCgoDLLImports (5.50s)
        crash_test.go:70: building testprogcgo []: exit status 2
                # _/d_/a/go/src/runtime/testdata/testprogcgo
                .\numgoroutine.go:9:21: fatal error: pthread.h: No such file or directory
                 #include <pthread.h>
                                     ^
                compilation terminated.

FAIL
FAIL    runtime 5.792s

I, obviously, do not have pthread.h file. But others might be in the same situation.

We could replace pthread_create with _beginthreadex, but I do not know what replace pthread_join with. We could disable the test, but it is, obviously, working on some systems (our builders). Not sure what to do.

Alex

@mvdan mvdan added the Testing An issue that has been verified to require only test changes, not just a test failure. label Jun 14, 2017
@bradfitz
Copy link
Contributor

Please include more details.

Is this a recent regression? When did it start failing?

@bradfitz bradfitz added this to the Go1.9Maybe milestone Jun 14, 2017
@bradfitz
Copy link
Contributor

/cc @ianlancetaylor

@bradfitz bradfitz added the NeedsFix The path to resolution is known, but the work has not been done. label Jun 14, 2017
@ianlancetaylor
Copy link
Contributor

This was introduced by @aclements in https://golang.org/cl/45030. I'll send a fix.

@gopherbot
Copy link

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

@alexbrainman
Copy link
Member Author

Is this a recent regression? When did it start failing?

What Ian said.

Thank you for fixing this, Ian. Looks all good here.

Alex

@golang golang locked and limited conversation to collaborators Jun 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

5 participants