Closed
Description
x/tools/go/packages is using -compiled
flags when running go list
, a flag that's not supported in go1.10
What version of Go are you using (go version
)?
$ go version go version go1.10 linux/amd64
Does this issue reproduce with the latest release?
no
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env GOARCH="amd64" GOBIN="" GOCACHE="/tmp/.gocache" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/go" GORACE="" GOROOT="/usr/local/go" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" 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-build297327963=/tmp/go-build -gno-record-gcc-switches"
What did you do?
- Install go1.10
go get -u golang.org/x/tools/...
go run main.go
main.go:
package main
import (
"fmt"
"golang.org/x/tools/go/packages"
)
func main() {
var conf packages.Config
_, err := packages.Load(&conf, "file=main.go")
if err != nil {
fmt.Println(err)
}
}
What did you expect to see?
no output
What did you see instead?
bash-4.2$ go run main.go
unsupported version of go: exit status 2: flag provided but not defined: -compiled
usage: list [-e] [-f format] [-json] [build flags] [packages]
Run 'go help list' for details.