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

Go test complains gcc is missing when importing net/http #27639

Closed
palsivertsen opened this issue Sep 12, 2018 · 1 comment
Closed

Go test complains gcc is missing when importing net/http #27639

palsivertsen opened this issue Sep 12, 2018 · 1 comment

Comments

@palsivertsen
Copy link

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

Related issues

#27303

@ianlancetaylor
Copy link
Contributor

I'm going to close this as a dup of #27303 (as you mention), #26988 and/or #27285. Please comment if you disagree.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants