You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected it to create an executable without cgo that has race detection instrumentation.
We want to be able to run the resulting executable inside a FROM scratch docker container, so any dynamic linking against C libraries is not acceptable.
What did you see instead?
go install: -race requires cgo; enable cgo by setting CGO_ENABLED=1
If I turn on cgo, I can see there are some dynamically linked libraries, so the executable is not usable.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
CGO_ENABLED=0 go install -race <cmd>
What did you expect to see?
I expected it to create an executable without cgo that has race detection instrumentation.
We want to be able to run the resulting executable inside a
FROM scratch
docker container, so any dynamic linking against C libraries is not acceptable.What did you see instead?
If I turn on cgo, I can see there are some dynamically linked libraries, so the executable is not usable.
The text was updated successfully, but these errors were encountered: