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

[BUG] go get -u and go build fail with "undefined: resolver.BuildOption" #1655

Closed
dwschulze opened this issue May 21, 2020 · 4 comments
Closed

Comments

@dwschulze
Copy link

Describe the bug

  1. What are you trying to do?
    Following this example

  2. What did you expect to happen?
    Successful build.

  3. What happens instead?
    when I run go get -u or go build main.go I get this error:

# github.com/coreos/etcd/clientv3/balancer/resolver/endpoint
../../../../../go3p/pkg/mod/github.com/coreos/etcd@v3.3.21+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:114:78: undefined: resolver.BuildOption
../../../../../go3p/pkg/mod/github.com/coreos/etcd@v3.3.21+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:182:31: undefined: resolver.ResolveNowOption
# github.com/coreos/etcd/clientv3/balancer/picker
../../../../../go3p/pkg/mod/github.com/coreos/etcd@v3.3.21+incompatible/clientv3/balancer/picker/err.go:37:44: undefined: balancer.PickOptions
../../../../../go3p/pkg/mod/github.com/coreos/etcd@v3.3.21+incompatible/clientv3/balancer/picker/roundrobin_balanced.go:55:54: undefined: balancer.PickOptions

How to reproduce the bug:

If possible, please include a minimal code snippet here.
This is my go.mod:

go 1.13

require (
github.com/coreos/etcd v3.3.21+incompatible // indirect
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/golang/protobuf v1.4.2
github.com/imdario/mergo v0.3.9 // indirect
github.com/micro/go-micro/v2 v2.7.0
github.com/miekg/dns v1.1.29 // indirect
github.com/nats-io/nats.go v1.10.0 // indirect
go.uber.org/zap v1.15.0 // indirect
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 // indirect
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2 // indirect
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 // indirect
golang.org/x/tools v0.0.0-20200521155704-91d71f6c2f04 // indirect
google.golang.org/genproto v0.0.0-20200521103424-e9a78aa275b7 // indirect
google.golang.org/grpc v1.29.1 // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
honnef.co/go/tools v0.0.1-2020.1.4 // indirect
)

Environment:
Go Version: please paste go version output here
go version go1.13.7 linux/amd64

please paste go env output here
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/dean/.cache/go-build"
GOENV="/home/dean/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY="github.com/dwschulze/"
GONOSUMDB="github.com/dwschulze/
"
GOOS="linux"
GOPATH="/home/dean/src/golang/go3p"
GOPRIVATE="github.com/dwschulze/*"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/dean/bin/go1.3.1.linux-amd64/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/dean/bin/go1.3.1.linux-amd64/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/dean/src/golang/examples/blogs.and.websites/ewan.valentine/microservices.in.go/shippy-service.consignment/go.mod"
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-build654555358=/tmp/go-build -gno-record-gcc-switches"

@asim
Copy link
Member

asim commented May 22, 2020

Please don't do go get -u. We have a specific go.mod file with versions that work.

@asim asim closed this as completed May 22, 2020
@dwschulze
Copy link
Author

Running go build main.go has the same effect.

@yezihack
Copy link

Please don't do go get -u. We have a specific go.mod file with versions that work.

how doing

@Kuri-su
Copy link
Contributor

Kuri-su commented Oct 22, 2020

@dwschulze @yezihack

maybe this issue can help you , This is a known issue between etcd and grpc
etcd-io/etcd#11563

you can replace grpc to v1.26+ or replace etcd to v3.3.4+incompatible in go.mod file, like this

// go.mod

replace google.golang.org/grpc => google.golang.org/grpc v1.26.0
// or
replace github.com/coreos/etcd => github.com/coreos/etcd v3.3.4+incompatible

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

No branches or pull requests

4 participants