Skip to content

Commit 5c89b4f

Browse files
Kubernetes Submit Queueeparis
Kubernetes Submit Queue
authored andcommitted
Merge pull request kubernetes#32517 from luxas/fix_arm_ppc64le
Automatic merge from submit-queue Use a patched golang version for building linux/arm Fixes: kubernetes#29904 Right now, linux/arm is broken because of an internal limitation in Go. I've filed an issue for it here: golang/go#17028 The affected binaries of this limitation are hyperkube and kube-apiserver, which are the largest binaries. And when we now have a patched go 1.7.1 version for building "unsupported" but important architectures (ref: https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/multi-platform.md), we should also include the patch for ppc64le and start building ppc64le again. As soon as @laboger has the patch I need up on Github, I'll include ppc64le to this PR and we'll merge it TODO: - [ ] ~~Update the PR with patches for ppc64le at the same time @luxas~~ - [x] Push the new kube-cross image @ixdy - [x] Run a full `make release` before to verify nothing breaks @luxas + @ixdy - [ ] Cherrypick into the 1.4 branch @luxas + (who?) @lavalamp @smarterclayton @ixdy @rsc @davecheney @wojtek-t @jfrazelle @bradfitz @david-mcmahon @pwittrock (cherry picked from commit 9bc7e36)
1 parent 0477e39 commit 5c89b4f

File tree

6 files changed

+416
-7
lines changed

6 files changed

+416
-7
lines changed

build/build-image/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ FROM gcr.io/google_containers/kube-cross:KUBE_BUILD_IMAGE_CROSS_TAG
1818
# Mark this as a kube-build container
1919
RUN touch /kube-build-image
2020

21-
# TO run as non-root we sometimes need to rebuild go stdlib packages.
22-
RUN chmod -R a+rwx /usr/local/go/pkg
21+
# To run as non-root we sometimes need to rebuild go stdlib packages.
22+
RUN chmod -R a+rwx /usr/local/go/pkg ${K8S_PATCHED_GOROOT}/pkg
2323

2424
# The kubernetes source is expected to be mounted here. This will be the base
2525
# of operations.

build/build-image/cross/Dockerfile

+14-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ RUN for platform in ${KUBE_CROSSPLATFORMS}; do GOOS=${platform%/*} GOARCH=${plat
3535

3636
# Install g++, then download and install protoc for generating protobuf output
3737
RUN apt-get update \
38-
&& apt-get install -y g++ rsync apt-utils file \
38+
&& apt-get install -y g++ rsync apt-utils file patch \
3939
&& apt-get clean && rm -rf /var/lib/apt/lists/*
4040

4141
RUN mkdir -p /usr/local/src/protobuf \
@@ -77,3 +77,16 @@ RUN export ETCD_VERSION=v2.2.1; \
7777
&& cd /usr/local/src/etcd \
7878
&& curl -fsSL https://github.com/coreos/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-amd64.tar.gz | tar -xz \
7979
&& ln -s ../src/etcd/etcd-${ETCD_VERSION}-linux-amd64/etcd /usr/local/bin/
80+
81+
# TODO: Remove the patched GOROOT when we have an official golang that has a working arm and ppc64le linker
82+
ENV K8S_PATCHED_GOLANG_VERSION=1.7.1 \
83+
K8S_PATCHED_GOROOT=/usr/local/go_k8s_patched
84+
RUN mkdir -p ${K8S_PATCHED_GOROOT} \
85+
&& curl -sSL https://github.com/golang/go/archive/go${K8S_PATCHED_GOLANG_VERSION}.tar.gz | tar -xz -C ${K8S_PATCHED_GOROOT} --strip-components=1
86+
87+
COPY golang-patches/CL28857-go1.7.1-luxas.patch ${K8S_PATCHED_GOROOT}/
88+
RUN cd ${K8S_PATCHED_GOROOT} \
89+
&& patch -p1 < CL28857-go1.7.1-luxas.patch \
90+
&& cd src \
91+
&& GOROOT_FINAL=${K8S_PATCHED_GOROOT} GOROOT_BOOTSTRAP=/usr/local/go ./make.bash \
92+
&& for platform in linux/arm; do GOOS=${platform%/*} GOARCH=${platform##*/} GOROOT=${K8S_PATCHED_GOROOT} go install std; done

build/build-image/cross/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.6.3-6
1+
v1.6.3-7

0 commit comments

Comments
 (0)