Bug 1392922 - Fedora - Unable to build Kubernetes with golang-1.7.3-1.fc26
Summary: Fedora - Unable to build Kubernetes with golang-1.7.3-1.fc26
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: golang
Version: rawhide
Hardware: ppc64le
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Čajka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Reopened
Depends On:
Blocks: PPCTracker
TreeView+ depends on / blocked
 
Reported: 2016-11-08 13:43 UTC by Jan Chaloupka
Modified: 2017-01-02 19:50 UTC (History)
11 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2017-01-02 19:50:42 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
IBM Linux Technology Center 149128 None None None 2016-11-28 12:40 UTC

Description Jan Chaloupka 2016-11-08 13:43:16 UTC
Following errors pop up each time the Kubernetes is built with golang-1.7.3-1.fc26 on ppc64le:

+++ [1108 13:24:10] +++ Warning: stdlib pkg with cgo flag not found.
+++ [1108 13:24:10] +++ Warning: stdlib pkg cannot be rebuilt since /usr/lib/golang/pkg is not writable by mockbuild
+++ [1108 13:24:10] +++ Warning: Make /usr/lib/golang/pkg writable for mockbuild for a one-time stdlib install, Or
+++ [1108 13:24:10] +++ Warning: Rebuild stdlib using the command 'CGO_ENABLED=0 go install -a -installsuffix cgo std'
+++ [1108 13:24:10] +++ Falling back to go build, which is slower
    # k8s.io/kubernetes/cmd/kube-apiserver
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.ServiceProxyOptions: relocation for runtime.strhash+92 is too big: -33556804
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.NodeSpec: relocation for runtime.strhash+48 is too big: -33558176
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.NodeSpec: relocation for runtime.strhash+92 is too big: -33558220
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.NodeSpec: relocation for runtime.strhash+136 is too big: -33558264
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.NodeCondition: relocation for runtime.strhash+48 is too big: -33559208
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.NodeCondition: relocation for runtime.strhash+92 is too big: -33559252
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.NodeCondition: relocation for runtime.strhash+224 is too big: -33559384
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.NodeCondition: relocation for runtime.strhash+268 is too big: -33559428
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.NodeSystemInfo: relocation for runtime.strhash+48 is too big: -33560232
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.NodeSystemInfo: relocation for runtime.strhash+92 is too big: -33560276
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.NodeSystemInfo: relocation for runtime.strhash+136 is too big: -33560320
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.NodeSystemInfo: relocation for runtime.strhash+180 is too big: -33560364
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.NodeSystemInfo: relocation for runtime.strhash+224 is too big: -33560408
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.NodeSystemInfo: relocation for runtime.strhash+268 is too big: -33560452
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.NodeSystemInfo: relocation for runtime.strhash+312 is too big: -33560496
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.NodeSystemInfo: relocation for runtime.strhash+356 is too big: -33560540
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.NodeSystemInfo: relocation for runtime.strhash+400 is too big: -33560584
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.NodeSystemInfo: relocation for runtime.strhash+444 is too big: -33560628
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.AttachedVolume: relocation for runtime.strhash+48 is too big: -33562144
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.AttachedVolume: relocation for runtime.strhash+92 is too big: -33562188
type..hash.k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/pkg/api.NodeProxyOptions: relocation for runtime.strhash+92 is too big: -33566100
/usr/lib/golang/pkg/tool/linux_ppc64le/link: too many errors

Comment 1 IBM Bug Proxy 2016-11-29 08:20:21 UTC
------- Comment From hannsj_uhl@de.ibm.com 2016-11-29 03:10 EDT-------
Comment from  Lynn A. Boger 2016-11-28 14:24:30 CST

This problem is due to a golang linker issue that happens when binaries get too big on RISC platforms like ppc64le and arm.  With golang, linking can be done externally (i.e., system linker) or internally (golang linker), which means fixes are needed for both types of linking.

The patch that had been provided for go 1.7 ppc64le fixes the external linking case.
I currently do not have a patch for use with internal linking in go 1.7.
The golang community did not accept a backport of these patches because they were considered too risky.

Fixes for this problem for both internal and external linking are upstream and will be in go 1.8 when released in Feb. 2017.

As a workaround with go 1.7.3-1.fc26, the setting of
GOLDFLAGS='-linkmode=external'
when doing the build could be used to force all binaries
to be built with external linking, and that avoids the link error.

Comment 2 Dan Horák 2016-11-30 09:18:04 UTC
Thanks, Lynn, with

diff --git a/kubernetes.spec b/kubernetes.spec
index 82e0b1e..ea9aed0 100644
--- a/kubernetes.spec
+++ b/kubernetes.spec
@@ -43,11 +43,11 @@
 
 Name:          kubernetes
 Version:       %{kube_version}
-Release:       3%{?dist}
+Release:       3%{?dist}.2
 Summary:        Container cluster management
 License:        ASL 2.0
 URL:            %{import_path}
-ExclusiveArch:  x86_64 aarch64
+ExclusiveArch:  x86_64 aarch64 ppc64le
 Source0:        https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
 Source1:        https://%{con_provider_prefix}/archive/%{con_commit}/%{con_repo}-%{con_shortcommit}.tar.gz
 Source3:        kubernetes-accounting.conf
@@ -880,6 +880,10 @@ export KUBE_GIT_COMMIT=%{commit}
 export KUBE_GIT_VERSION=%{kube_git_version}
 export KUBE_EXTRA_GOPATH=$(pwd)/Godeps/_workspace
 
+# https://bugzilla.redhat.com/show_bug.cgi?id=1392922#c1
+%ifarch ppc64le
+export GOLDFLAGS='-linkmode=external'
+%endif
 make WHAT="--use_go_build cmd/hyperkube cmd/kube-apiserver"
 
 # convert md to man

I get a successful build - http://koji.fedoraproject.org/koji/taskinfo?taskID=16679287

Comment 3 Jan Chaloupka 2016-12-12 14:43:44 UTC
Thanks Lynn. kubernetes-1.4.7-1.fc26 for ppc64le is ready for testing.

Comment 4 Fedora Update System 2016-12-19 12:36:16 UTC
kubernetes-1.4.7-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-baff05c06d

Comment 5 Fedora Update System 2016-12-20 09:23:27 UTC
kubernetes-1.4.7-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-baff05c06d

Comment 6 Fedora Update System 2017-01-02 19:50:42 UTC
kubernetes-1.4.7-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.