cmd/go, cmd/cgo: “ build constraints exclude all Go files“ error #39398
Labels
FrozenDueToAge
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
What version of Go are you using (
go version
)?go version go1.14.4 linux/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputGO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/lbbxsxlz/.cache/go-build"
GOENV="/home/lbbxsxlz/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/lbbxsxlz/workspace/GO"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/lbbxsxlz/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/lbbxsxlz/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build451549208=/tmp/go-build -gno-record-gcc-switches"
What did you do?
What did you expect to see?
"GOOS=linux GOARCH=arm64 go build -o elfTest_arm64 elfTest.go" build no errors
What did you see instead?
can't load package: package main: build constraints exclude all Go files in /home/lbbxsxlz/workspace/GO
"GOOS=linux GOARCH=arm64 go build -o elfTest_arm64 elfTest.go" build fail
"GOOS=linux GOARCH=arm go build -o elfTest_arm elfTest.go" build fail
The text was updated successfully, but these errors were encountered: