qt icon indicating copy to clipboard operation
qt copied to clipboard

Where is $(go env GOPATH)/bin?

Open juergh opened this issue 4 years ago • 0 comments

I'm running the following in a clean VM or LXD container and see some strange behavior. The first time I get:

$ GO111MODULE=off go get -v github.com/therecipe/qt/cmd/...
github.com/therecipe/qt (download)
created GOPATH=/root/go; see 'go help gopath'
github.com/therecipe/env_linux_amd64_513 (download)
github.com/sirupsen/logrus (download)
get "golang.org/x/sys/unix": found meta tag get.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at //golang.org/x/sys/unix?go-get=1
get "golang.org/x/sys/unix": verifying non-authoritative meta tag
golang.org/x/sys (download)
get "golang.org/x/tools/imports": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at //golang.org/x/tools/imports?go-get=1
get "golang.org/x/tools/imports": verifying non-authoritative meta tag
golang.org/x/tools (download)
get "golang.org/x/mod/semver": found meta tag get.metaImport{Prefix:"golang.org/x/mod", VCS:"git", RepoRoot:"https://go.googlesource.com/mod"} at //golang.org/x/mod/semver?go-get=1
get "golang.org/x/mod/semver": verifying non-authoritative meta tag
golang.org/x/mod (download)
get "golang.org/x/mod/module": found meta tag get.metaImport{Prefix:"golang.org/x/mod", VCS:"git", RepoRoot:"https://go.googlesource.com/mod"} at //golang.org/x/mod/module?go-get=1
get "golang.org/x/mod/module": verifying non-authoritative meta tag
get "golang.org/x/xerrors": found meta tag get.metaImport{Prefix:"golang.org/x/xerrors", VCS:"git", RepoRoot:"https://go.googlesource.com/xerrors"} at //golang.org/x/xerrors?go-get=1
golang.org/x/xerrors (download)
github.com/therecipe/env_linux_amd64_513
github.com/therecipe/qt/cmd/env
golang.org/x/sys/internal/unsafeheader
github.com/therecipe/qt/internal/binding/files/docs/5.12.0
golang.org/x/sys/unix
github.com/therecipe/qt/internal/binding/files/docs/5.13.0
github.com/therecipe/qt/internal/binding/files/docs
golang.org/x/mod/semver
golang.org/x/tools/internal/event/label
golang.org/x/tools/internal/event/keys
golang.org/x/tools/internal/event/core
golang.org/x/tools/internal/event
golang.org/x/tools/internal/gocommand
github.com/sirupsen/logrus
golang.org/x/xerrors/internal
golang.org/x/xerrors
golang.org/x/mod/module
golang.org/x/tools/go/ast/astutil
github.com/therecipe/qt/internal/utils
golang.org/x/tools/internal/fastwalk
github.com/therecipe/qt/internal/cmd
golang.org/x/tools/internal/gopathwalk
golang.org/x/tools/internal/imports
github.com/therecipe/qt/internal/binding/parser
golang.org/x/tools/imports
github.com/therecipe/qt/internal/binding/converter
github.com/therecipe/qt/internal/binding/templater
github.com/therecipe/qt/internal/cmd/moc
github.com/therecipe/qt/internal/cmd/rcc
github.com/therecipe/qt/internal/cmd/minimal
github.com/therecipe/qt/cmd/qtmoc
github.com/therecipe/qt/internal/cmd/deploy
github.com/therecipe/qt/cmd/qtdeploy
github.com/therecipe/qt/cmd/qtminimal
github.com/therecipe/qt/cmd/qtrcc
github.com/therecipe/qt/internal/cmd/setup
github.com/therecipe/qt/cmd/qtsetup
$ ls $(go env GOPATH)/bin/
ls: cannot access '/root/go/bin/': No such file or directory

If I run it again:

$ GO111MODULE=off go get -v github.com/therecipe/qt/cmd/...
$ ls $(go env GOPATH)/bin/
qtdeploy  qtminimal  qtmoc  qtrcc  qtsetup

The first run is orchestrated through the VM/container provisioning system (snapcraft in this case) and the second run is a manual invocation after logging in so there are environmental differences. What could possible prevent the generation of the go binaries in the first run?

Also, if I log in, clean the go cache, remove $(go env GOPATH) and rerun, I do get the binaries. So something is missing or at least significantly different during the very first orchestrated run...

juergh avatar Dec 21 '20 08:12 juergh