machine-controller-manager
machine-controller-manager copied to clipboard
`make generate` doesn't work on Linux
How to categorize this issue?
/kind bug /priority 3
What happened:
The following command fails on Linux:
$ make generate
The error:
./hack/api-reference/generate-spec-doc.sh: 2: ./gen-crd-api-reference-docs: Exec format error
The problem seems to stem from the gen-crd-api-reference-docs binary, because it's built for Mac:
$ file hack/api-reference/gen-crd-api-reference-docs
hack/api-reference/gen-crd-api-reference-docs: Mach-O 64-bit x86_64 executable
What you expected to happen:
make generate shouldn't fail.
How to reproduce it (as minimally and precisely as possible):
Run make generate on a system that does not support Mach-O.
The problem can be fixed by getting the correct binary from the official releases, but I think this can be solved more elegantly. Potentially by adding the Go module in tools.go and referencing it from there?