Skip to content
Permalink
Browse files

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)
  • Loading branch information...
Kubernetes Submit Queue authored and eparis committed Sep 16, 2016
1 parent 4bf127a commit b001537c32ada0ee0942018f5e81b169bf5fb75a
@@ -18,8 +18,8 @@ FROM gcr.io/google_containers/kube-cross:KUBE_BUILD_IMAGE_CROSS_TAG
# Mark this as a kube-build container
RUN touch /kube-build-image

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

# The kubernetes source is expected to be mounted here. This will be the base
# of operations.
@@ -35,7 +35,7 @@ RUN for platform in ${KUBE_CROSSPLATFORMS}; do GOOS=${platform%/*} GOARCH=${plat

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

RUN mkdir -p /usr/local/src/protobuf \
@@ -77,3 +77,16 @@ RUN export ETCD_VERSION=v2.2.1; \
&& cd /usr/local/src/etcd \
&& curl -fsSL https://github.com/coreos/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-amd64.tar.gz | tar -xz \
&& ln -s ../src/etcd/etcd-${ETCD_VERSION}-linux-amd64/etcd /usr/local/bin/

# TODO: Remove the patched GOROOT when we have an official golang that has a working arm and ppc64le linker
ENV K8S_PATCHED_GOLANG_VERSION=1.7.1 \
K8S_PATCHED_GOROOT=/usr/local/go_k8s_patched
RUN mkdir -p ${K8S_PATCHED_GOROOT} \
&& curl -sSL https://github.com/golang/go/archive/go${K8S_PATCHED_GOLANG_VERSION}.tar.gz | tar -xz -C ${K8S_PATCHED_GOROOT} --strip-components=1

COPY golang-patches/CL28857-go1.7.1-luxas.patch ${K8S_PATCHED_GOROOT}/
RUN cd ${K8S_PATCHED_GOROOT} \
&& patch -p1 < CL28857-go1.7.1-luxas.patch \
&& cd src \
&& GOROOT_FINAL=${K8S_PATCHED_GOROOT} GOROOT_BOOTSTRAP=/usr/local/go ./make.bash \
&& for platform in linux/arm; do GOOS=${platform%/*} GOARCH=${platform##*/} GOROOT=${K8S_PATCHED_GOROOT} go install std; done
@@ -1 +1 @@
v1.6.3-6
v1.6.3-7

0 comments on commit b001537

Please sign in to comment.
You can’t perform that action at this time.