michel@homebox ~/go/src/github.com/docker/swarmkit $ make binaries
馃惓 bin/swarmd
# github.com/docker/swarmkit/vendor/github.com/docker/docker/client/transport
vendor/github.com/docker/docker/client/transport/tlsconfig_clone.go:10: c.Clone undefined (type *tls.Config has no field or method Clone)
# github.com/docker/swarmkit/api
api/dispatcher.pb.go:1574: p.cluster undefined (type *raftProxyDispatcherServer has no field or method cluster)
api/dispatcher.pb.go:1581: p.connSelector.Conn undefined (type raftselector.ConnProvider has no field or method Conn)
api/dispatcher.pb.go:1593: p.connSelector.Reset undefined (type raftselector.ConnProvider has no field or method Reset)
Makefile:89: recipe for target 'bin/swarmd' failed
make: *** [bin/swarmd] Error 2
michel@homebox ~/go/src/github.com/docker/swarmkit $ go version
go version go1.6.3 linux/amd64
I believe this was recently fixed in the transport package, and revendoring it will fix compilation with Go 1.6.x.
got it. this is here:
https://github.com/docker/docker/commit/128cefc3bdfc458ac84ae6602d6484c79f479795
@aaronlehmann i found there is bug. the vendor is not update for the fixed patch on upstream docker/docker
Clone bug is fixed with revendor the docker/docker/client/transport .
now here is another error:
# github.com/docker/swarmkit/api
api/dispatcher.pb.go:1574: p.cluster undefined (type *raftProxyDispatcherServer has no field or method cluster)
api/dispatcher.pb.go:1581: p.connSelector.Conn undefined (type raftselector.ConnProvider has no field or method Conn)
api/dispatcher.pb.go:1593: p.connSelector.Reset undefined (type raftselector.ConnProvider has no field or method Reset)
make: *** [bin/swarmd] Error 2
i guess the protobuf's version is not corrent. it should be 3.0
in macos, brew upgrade --devel protobuf to install 3.0 beta protobuf
Env: go 1.6.3
let me recap the actions to resolve the problem:
gvt fetch github.com/docker/docker/client/transport
brew upgrade --devel protobuf
make generate
make all
When https://github.com/docker/docker/pull/26436 is merged, we'll revendor the relevant packages and this should no longer be an issue.
cc @stevvooe
Thanks @aaronlehmann and @xiaods
The issue was split into two parts. The first part was the missing revendoring.
The second part was the protobuf which was still version 2.5. It might make sense to add this package to the build requirements list?
@xiaods
brew upgrade --devel protobuf
Actually, proto 3 is now stable so you don't need the development version anymore.brew upgrade protobuf(without--devel) should install3.0.2now.
@michelvocks
The second part was the protobuf which was still version 2.5. It might make sense to add this package to the build requirements list?
Yes it definitely makes sense - I think we shouldn't put OS specific details (e.g. brew install etc) but rather just say that it requires protobuf 3.x and link to the protobuf instructions.
Most helpful comment
@xiaods
@michelvocks
Yes it definitely makes sense - I think we shouldn't put OS specific details (e.g.
brew installetc) but rather just say that it requires protobuf 3.x and link to the protobuf instructions.