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

Error running Makefile - controller-gen no such file or directory #172

Open
rscafidi opened this issue Apr 26, 2022 · 2 comments
Open

Error running Makefile - controller-gen no such file or directory #172

rscafidi opened this issue Apr 26, 2022 · 2 comments
Assignees
Labels
Bug Something isn't working

Comments

@rscafidi
Copy link

Hello,

I've been trying to run the Makefile on a fresh Golang container (https://hub.docker.com/_/golang). I set up kubectl and made sure it's connected to my cluster.

When I attempt to run the make file, I'm running into an issue on line 118:
https://github.com/Apicurio/apicurio-registry-operator/blob/master/Makefile#L118
Specific error message is:

root@091959c6e7c9:/go/apicurio-registry-operator# make build docker-push deploy
go: creating new go.mod: module tmp
Downloading sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0
go: added github.com/fatih/color v1.12.0
go: added github.com/go-logr/logr v1.2.0
go: added github.com/gobuffalo/flect v0.2.3
go: added github.com/gogo/protobuf v1.3.2
go: added github.com/google/go-cmp v0.5.6
go: added github.com/google/gofuzz v1.1.0
go: added github.com/inconshreveable/mousetrap v1.0.0
go: added github.com/json-iterator/go v1.1.12
go: added github.com/mattn/go-colorable v0.1.8
go: added github.com/mattn/go-isatty v0.0.12
go: added github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: added github.com/modern-go/reflect2 v1.0.2
go: added github.com/spf13/cobra v1.2.1
go: added github.com/spf13/pflag v1.0.5
go: added golang.org/x/mod v0.4.2
go: added golang.org/x/net v0.0.0-20210825183410-e898025ed96a
go: added golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e
go: added golang.org/x/text v0.3.7
go: added golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff
go: added golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
go: added gopkg.in/inf.v0 v0.9.1
go: added gopkg.in/yaml.v2 v2.4.0
go: added gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
go: added k8s.io/api v0.23.0
go: added k8s.io/apiextensions-apiserver v0.23.0
go: added k8s.io/apimachinery v0.23.0
go: added k8s.io/klog/v2 v2.30.0
go: added k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b
go: added sigs.k8s.io/controller-tools v0.8.0
go: added sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6
go: added sigs.k8s.io/structured-merge-diff/v4 v4.1.2
go: added sigs.k8s.io/yaml v1.3.0
/go/apicurio-registry-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
bash: line 1: /go/apicurio-registry-operator/bin/controller-gen: No such file or directory
make: *** [Makefile:118: generate] Error 127

I haven't seen anyone else with this issue but I'm puzzled as to what's causing the issue, and the Makefile script is kind of hard to follow. If someone could point me in the right direction in troubleshooting this I'd appreciate it.

@EricWittmann EricWittmann added the Bug Something isn't working label Apr 27, 2022
@jsenko
Copy link
Member

jsenko commented May 16, 2022

Hi, I think this is caused by controller-tools not supporting go 1.16 anymore and breaking compatibility. I've tried using go 1.17 and it seems to work, so I'll update the requirements. See kubernetes-sigs/controller-tools#643 . Can you test if using 1.17 works for you?

@jsenko
Copy link
Member

jsenko commented May 16, 2022

Did you you use the latest tag?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants