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/link: race detector: doesn't work on OS X with CGO_ENABLED=0 #12844

Closed
Thomasdezeeuw opened this issue Oct 5, 2015 · 4 comments

Comments

Projects
None yet
4 participants
@Thomasdezeeuw
Copy link
Contributor

commented Oct 5, 2015

Following up on https://groups.google.com/forum/#!topic/golang-nuts/7ZKusMdkNz4.

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

What operating system and processor architecture are you using?
OS X 10.10.5

What did you do?
Run go run -race main.go on any valid go file.

What did you expect to see?
A running go binary with the race detector enabled.

What did you see instead?
The following error log:

go version go1.5.1 darwin/amd64
# command-line-arguments
runtime/race(__TEXT/__text): malloc: not defined
runtime/race(__TEXT/__text): malloc: not defined
runtime/race(__TEXT/__text): free: not defined
runtime/race(__TEXT/__text): free: not defined
runtime/race(__TEXT/__text): malloc: not defined
runtime/race(__TEXT/__text): malloc: not defined
runtime/race(__TEXT/__text): memcpy: not defined
runtime/race(__TEXT/__text): malloc: not defined
runtime/race(__TEXT/__text): memcpy: not defined
runtime/race(__TEXT/__text): malloc: not defined
runtime/race(__TEXT/__text): malloc: not defined
runtime/race(__TEXT/__text): memcpy: not defined
runtime/race(__TEXT/__text): malloc: not defined
runtime/race(__TEXT/__text): setrlimit: not defined
runtime/race(__TEXT/__text): getpid: not defined
runtime/race(__TEXT/__text): getpid: not defined
runtime/race(__TEXT/__text): getpid: not defined
runtime/race(__TEXT/__text): __error: not defined
runtime/race(__TEXT/__text): exit: not defined
runtime/race(__TEXT/__text): usleep: not defined
runtime/race(__TEXT/__text): sched_yield: not defined
/go/go1.5/pkg/tool/darwin_amd64/link: too many errors

@ianlancetaylor suggested that I open this issue with the request that either the race detector works with CGO_ENABLED=0, or that it prints a meaningful error message explaining that CGO_ENABLED=1 is required.

@minux

This comment has been minimized.

Copy link
Member

commented Oct 5, 2015

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Oct 5, 2015

@minux That is entirely understandable, but we need a better error message.

@ianlancetaylor ianlancetaylor changed the title runtime: race detector: doesn't work on OS X with CGO_ENABLED=0 cmd/link: race detector: doesn't work on OS X with CGO_ENABLED=0 Oct 5, 2015

@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Oct 5, 2015

@gopherbot

This comment has been minimized.

Copy link

commented Oct 6, 2015

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

@minux minux closed this in 007ee63 Oct 6, 2015

@Thomasdezeeuw

This comment has been minimized.

Copy link
Contributor Author

commented Oct 6, 2015

Thank for the quick fix.

@golang golang locked and limited conversation to collaborators Oct 9, 2016

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.