kubernetes: Kubernetes-master build failing with golang-master
Hi,
I am trying to build kubernetes-master with golang-master and I am getting this error:
# make all
+++ [0610 08:44:31] Building go targets for linux/amd64:
./vendor/k8s.io/code-generator/cmd/deepcopy-gen
go: finding k8s.io/kubernetes/vendor/k8s.io/code-generator/cmd latest
go: finding k8s.io/kubernetes/vendor/k8s.io latest
go: finding k8s.io/kubernetes/vendor/k8s.io/code-generator latest
go: finding k8s.io/kubernetes/vendor latest
go: finding k8s.io/kubernetes/vendor/k8s.io/code-generator/cmd/deepcopy-gen latest
can't load package: package k8s.io/kubernetes/vendor/k8s.io/code-generator/cmd/deepcopy-gen: unknown import path "k8s.io/kubernetes/vendor/k8s.io/code-generator/cmd/deepcopy-gen": no matching versions for query "latest"
!!! [0610 08:44:56] Call tree:
!!! [0610 08:44:56] 1: /go/src/k8s.io/kubernetes/hack/lib/golang.sh:715 kube::golang::build_some_binaries(...)
!!! [0610 08:44:56] 2: /go/src/k8s.io/kubernetes/hack/lib/golang.sh:854 kube::golang::build_binaries_for_platform(...)
!!! [0610 08:44:56] 3: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [0610 08:44:56] Call tree:
!!! [0610 08:44:56] 1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [0610 08:44:56] Call tree:
!!! [0610 08:44:56] 1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
Makefile.generated_files:200: recipe for target '_output/bin/deepcopy-gen' failed
make[1]: *** [_output/bin/deepcopy-gen] Error 1
Makefile:557: recipe for target 'generated_files' failed
make: *** [generated_files] Error 2
Here is the golang version:
# go version
go version devel +323212b Sun Jun 9 16:23:11 2019 +0000 linux/amd64
Any tips on what could be the issue here? Or how to debug it? TIA.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (18 by maintainers)
the branch at https://github.com/liggitt/kubernetes/commits/go-1.13 allows
make all
to work using go1.13 (but not go1.12).It fixes:
It does not resolve lots of assumptions in our code generation scripts about finding things via GOPATH, so
make update
doesn’t regenerate properly yet@mm4tt updated, though it looks like building takes waaaaaay longer with latest go devel… I’m sure some of our generation scripts are making go ast or list or build calls that were reasonable under gopath mode and are unreasonable in go modules mode
@liggitt https://github.com/kubernetes-sigs/kind/blob/f03d85409082ae9b06410c716640005b555da722/hack/update/generated.sh has some hacks to use the code generators with a modules based repo without requiring the repo be in GOPATH, FWIW. might be useful 😃