Yggdrasil icon indicating copy to clipboard operation
Yggdrasil copied to clipboard

WIP: [kubectl] Build from source to support more platforms

Open omus opened this issue 4 years ago • 3 comments

Note that Kubernetes 1.20.5 is actually the latest but I'll save that for another PR where I add support for experimental platforms.

omus avatar Apr 08 '21 15:04 omus

Looks like there's some additional work to be done to support other platforms

omus avatar Apr 08 '21 15:04 omus

I did some investigation into the hack/run-in-gopath.sh: line 34: go2make: command not found and this is what I found.

The go2make file is installed by the Kubernetes Makefile and the reason it's failing to find it in a cross-compilation environment is because it's expected to be installed in ./_output/local/go/bin/ but due to us setting GOOS and GOARCH the executable is installed in ./_output/local/go/bin/$(go env GOOS)_$(go env GOARCH)/ (there is a note on this in go help install). Additionally, Kubernetes is intending to run go2make in the cross-compilation environment which, even if it found the executable, would fail due to it being compiled for a different os/arch.

There are some notes on cross-compiling Kubernetes but I haven't had luck yet.

I'm going to put this work on hold for now.

omus avatar Apr 08 '21 16:04 omus

By using the host tool chain I managed to build the tools required and then switch back to cross compilation. The script isn't pretty but it does seem to be functional. There's a bit more work to be done to get Windows working but hopefully that's not too bad

omus avatar May 27 '21 14:05 omus