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
$ cd ~/go/path/to/program
$ go test ./pkg/...
# runtime/cgo
exec: "gcc": executable file not found in $PATH
FAIL path/to/program/pkg/subpkg [build failed]
Workaround
Running CGO_ENABLED=0 go test ./pkg/... works without issues
Notes
Running these same tests on go 1.10 works without issues (and I only found it when I upgraded to go 1.12). There seem to be several go 1.11 bugs filed about issues related to this.
I'm not explicitly using go modules at this point, but I do use dep + a vendor directory.
There must be something complex/subtle that is causing this error, as it's really difficult to create a minimal reproducible testcase for this. Unfortunately, the source I'm working with isn't public, and I'm having a really difficult time creating a reproducible testcase for this -- despite that it occurs without fail with my entire source tree. When I try removing large portions of the tree, it starts working, but it doesn't seem to be particularly deterministic.
Running with -x contains mostly 'mkdir $WORK/random', but one place has the following snippet which might explain why it's running into an error:
But I'm having difficulty determining why it has decided to use CGO (and not use it when it's disabled).
My hope is that even though I can't reproduce this error minimally, that someone else will find this issue and (a) be able to reproduce or at least (b) see my workaround and find it works for them.
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?Dockerfile I'm running in:
Does this issue reproduce with the latest release?
Yes (1.12.5 is latest published version).
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Workaround
CGO_ENABLED=0 go test ./pkg/...
works without issuesNotes
Running these same tests on go 1.10 works without issues (and I only found it when I upgraded to go 1.12). There seem to be several go 1.11 bugs filed about issues related to this.
I'm not explicitly using go modules at this point, but I do use dep + a vendor directory.
There must be something complex/subtle that is causing this error, as it's really difficult to create a minimal reproducible testcase for this. Unfortunately, the source I'm working with isn't public, and I'm having a really difficult time creating a reproducible testcase for this -- despite that it occurs without fail with my entire source tree. When I try removing large portions of the tree, it starts working, but it doesn't seem to be particularly deterministic.
Running with
-x
contains mostly 'mkdir $WORK/random', but one place has the following snippet which might explain why it's running into an error:But I'm having difficulty determining why it has decided to use CGO (and not use it when it's disabled).
My hope is that even though I can't reproduce this error minimally, that someone else will find this issue and (a) be able to reproduce or at least (b) see my workaround and find it works for them.
The text was updated successfully, but these errors were encountered: