go: x/playground: exec: "gcc": executable file not found in $PATH

I’m getting errors looking for gcc (!?) on the playground:

https://play.golang.org/p/5GlPtcESJm

# net
exec: "gcc": executable file not found in $PATH
Go vet exited.
screen shot 2018-07-09 at 7 32 22 pm

/cc @andybons

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (15 by maintainers)

Most upvoted comments

In the execution of cmd/compile, CGO_ENABLED=1 is being passed because MkEnv in cmd/go/internal/envcmd/env.go is seeing that cfg.BuildContext.CgoEnabled is true. The setting there gets put into the environment by code in cmd/go/main.go. cfg.BuildContext is initialized from build.Default in the go/build package. build.Default is set from defaultContext in go/build/build.go. There you can see that CgoEnabled is set from the value in zcgo.go which should reflect the setting of CGO_ENABLED at the time that the package was built.