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

Comments

Projects
None yet
5 participants
@alexbrainman
Copy link
Member

commented Jun 14, 2017

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 label Jun 14, 2017

@bradfitz

This comment has been minimized.

Copy link
Member

commented Jun 14, 2017

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

This comment has been minimized.

Copy link
Member

commented Jun 14, 2017

@bradfitz bradfitz added the NeedsFix label Jun 14, 2017

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Jun 14, 2017

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

@gopherbot

This comment has been minimized.

Copy link

commented Jun 14, 2017

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

@gopherbot gopherbot closed this in 03a4a5c Jun 14, 2017

@alexbrainman

This comment has been minimized.

Copy link
Member Author

commented Jun 15, 2017

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.
You can’t perform that action at this time.