Closed
Description
What version of Go are you using (go version
)?
Tested using the docker image golang:1-alpine
(233ed4ed14bf)
/go/src/foo # go version
go version go1.11 linux/amd64
Does this issue reproduce with the latest release?
Yes go1.11
What operating system and processor architecture are you using (go env
)?
/go/src/foo # go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build067204781=/tmp/go-build -gno-record-gcc-switches"
What did you do?
Create project foo
Add file bar.go
package main
import _ "net/http"
Other imports would probably give similar results.
What did you expect to see?
/go/src/foo # go test ./...
? foo [no test files]
What did you see instead?
/go/src/foo # go test ./...
# runtime/cgo
exec: "gcc": executable file not found in $PATH
Activity
ianlancetaylor commentedon Sep 12, 2018
I'm going to close this as a dup of #27303 (as you mention), #26988 and/or #27285. Please comment if you disagree.