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

x/vgo: fails to build CockroachDB #23958

Closed
benesch opened this issue Feb 20, 2018 · 5 comments
Closed

x/vgo: fails to build CockroachDB #23958

benesch opened this issue Feb 20, 2018 · 5 comments
Milestone

Comments

@benesch
Copy link
Contributor

benesch commented Feb 20, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.10 darwin/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/benesch/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/benesch/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.10/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.10/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/2m/klw683vj1575nyyymnc0mr280000gn/T/go-build940687427=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

cd go/src/github.com/cockroachdb/cockroach
echo >go.mod
$ vgo build
vgo: resolving import "github.com/cockroachdb/cockroach/pkg/ccl"
vgo: finding github.com/cockroachdb/cockroach (latest)
vgo: adding github.com/cockroachdb/cockroach v1.1.5
vgo: finding github.com/cockroachdb/cockroach v1.1.5
vgo: finding github.com/cockroachdb/cockroach v1.1.5
vgo: parsing downloaded go.mod: go.mod:35: invalid module: github.com/dgrijalva/jwt-go should be v1, not v3 (v3.0.0)

What did you expect to see?

A built binary.

What did you see instead?

An error message.

Very happy to help debug this further, but I'm at a loss. What package had a go.mod? Where did it get downloaded? Doesn't seem to be in my GOPATH or GOCACHE:

$ find ~/go/src -name 'go.mod'
/Users/benesch/go/src/github.com/cockroachdb/cockroach/go.mod
$ find $(go env GOCACHE) -name 'go.mod'
# No files.

Excited about this, though!

/cc @rsc

@gopherbot gopherbot added this to the Unreleased milestone Feb 20, 2018
@kardianos
Copy link
Contributor

I suspect that if you updated your import paths to read: github.com/dgrijalva/jwt-go/v3 it would get past that error.

@bradfitz bradfitz modified the milestones: Unreleased, vgo Feb 21, 2018
@chrj
Copy link

chrj commented Feb 21, 2018

Looks like a duplicate of #23977

@benesch
Copy link
Contributor Author

benesch commented Feb 21, 2018

With the pending patch for #23977 applied, we get a little bit further before vgo bails out:

$ vgo build
vgo: resolving import "github.com/cockroachdb/cockroach/pkg/ccl"
vgo: finding github.com/cockroachdb/cockroach (latest)
vgo: adding github.com/cockroachdb/cockroach v1.1.5
vgo: finding gopkg.in/square/go-jose.v1/json v0.0.0-20160329203311-40d457b43924
vgo: gopkg.in/square/go-jose.v1/json v0.0.0-20160329203311-40d457b43924: missing go.mod
vgo: finding gopkg.in/square/go-jose.v1/cipher v0.0.0-20160329203311-40d457b43924
vgo: gopkg.in/square/go-jose.v1/cipher v0.0.0-20160329203311-40d457b43924: missing go.mod
vgo: finding gopkg.in/square/go-jose.v1/cipher v0.0.0-20160329203311-40d457b43924
vgo: gopkg.in/square/go-jose.v1/cipher v0.0.0-20160329203311-40d457b43924: missing go.mod
vgo: missing go.mod

@while-loop
Copy link

I'm also getting your output on my patch in #23977.

I haven't gone much into where go.mod files are created, but I could try to dig deeper later (I have been rate-limited with my GitHub token).

@rsc
Copy link
Contributor

rsc commented Apr 2, 2018

The original report is a duplicate of #24056.

@rsc rsc closed this as completed Apr 2, 2018
@golang golang locked and limited conversation to collaborators Apr 2, 2019
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

7 participants