https://bugzilla.redhat.com/show_bug.cgi?id=1248071
Bug ID: 1248071 Summary: Increase ELFRESERVE constant from 3072 to 3104 Product: Fedora Version: rawhide Component: golang Assignee: vbatts@redhat.com Reporter: jchaloup@redhat.com QA Contact: extras-qa@fedoraproject.org CC: admiller@redhat.com, golang@lists.fedoraproject.org, lemenkov@gmail.com, renich@woralelandia.com, s@shk.io, vbatts@redhat.com
Description of problem: Etcd and kubernetes built in rawhide with debugging info support fails with the following error:
ELFRESERVE too small: 3104 > 3072
Version-Release number of selected component (if applicable): golang-1.4.99-4.1.5beta2.fc24.x86_64
How reproducible: Always
Steps to Reproduce: 1. clone etcd repository 2. set with_debug macro to 1 3. build etcd for master branch
Actual results: Etcd fails to build
Expected results: Etcd does not fail to build
Additional info: To support debugging info, each build is hacked by adding -B flag in -ldflags string: -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')
This increases header for 32bytes which is exactly difference between 3104 and 3072.
Setting the constant to 3104 fixes this issue.
https://bugzilla.redhat.com/show_bug.cgi?id=1248071
--- Comment #1 from Jan Chaloupka jchaloup@redhat.com --- Created attachment 1057332 --> https://bugzilla.redhat.com/attachment.cgi?id=1057332&action=edit Increase ELFRESERVE to 3104
https://bugzilla.redhat.com/show_bug.cgi?id=1248071
Jan Chaloupka jchaloup@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|unspecified |medium CC| |fpokorny@redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=1248071
--- Comment #2 from Vincent Batts vbatts@redhat.com --- https://github.com/golang/go/blob/master/src/cmd/link/internal/ld/elf.go#L71...
Though, for folks using this golang compiler to cross-compile for other platforms like FreeBSD, this change should be platform specific.
https://bugzilla.redhat.com/show_bug.cgi?id=1248071
--- Comment #3 from Jan Chaloupka jchaloup@redhat.com --- Does golang in Fedora support cross-compiling?
https://bugzilla.redhat.com/show_bug.cgi?id=1248071
--- Comment #4 from Vincent Batts vbatts@redhat.com --- yes. `GOOS=freebsd go build <source>` will produce a binary for freebsd.
Also, what and where is this `with_debug` that you are setting? Do you mean `%_enable_debug_packages` rpm macros?
I'm trying to reproduce your steps.
https://bugzilla.redhat.com/show_bug.cgi?id=1248071
--- Comment #5 from Jan Chaloupka jchaloup@redhat.com --- Header of etcd's spec files starts with:
%if 0%{?fedora} %global with_devel 1 %global with_bundled 0 %global with_debug 0 %global with_check 1 %else %global with_devel 0 %global with_bundled 1 %global with_debug 0 %global with_check 0 %endif
yes. `GOOS=freebsd go build <source>` will produce a binary for freebsd.
In that case, what about to add Fedora specific option --increase-header-for-debug or shorter name that I will set when building on Fedora with debuginfo? I can prepare a patch if you agree with the hack? This will not break cross-compiling.
Or instead of option set environment variable INCREASE_HEADER_FOR_DEBUG (which is four-line hack).
At the moment there is not debuginfo for etcd and kubernetes due to this.
https://bugzilla.redhat.com/show_bug.cgi?id=1248071
--- Comment #6 from Vincent Batts vbatts@redhat.com --- pushed and building. http://koji.fedoraproject.org/koji/taskinfo?taskID=10543122 http://koji.fedoraproject.org/koji/taskinfo?taskID=10543126
https://bugzilla.redhat.com/show_bug.cgi?id=1248071
--- Comment #7 from Vincent Batts vbatts@redhat.com --- new build: http://koji.fedoraproject.org/koji/taskinfo?taskID=10543301 http://koji.fedoraproject.org/koji/taskinfo?taskID=10543308
https://bugzilla.redhat.com/show_bug.cgi?id=1248071
Vincent Batts vbatts@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jchaloup@redhat.com Flags| |needinfo?(jchaloup@redhat.c | |om)
--- Comment #8 from Vincent Batts vbatts@redhat.com --- jan please validate the new builds of golang fix the issue for you.
https://bugzilla.redhat.com/show_bug.cgi?id=1248071
Jan Chaloupka jchaloup@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(jchaloup@redhat.c | |om) |
--- Comment #9 from Jan Chaloupka jchaloup@redhat.com --- Etcd build with debug on for f24 no longer fails on ELFRESERVE [1] For f23 updates and buildroot overrides are needed from now on. F23 now installs golang-1.4.99-4.1.5beta2.fc23.x86_64 [2]. Can you override it? Command:
bodhi --buildroot-override=golang-1.5-0.8.beta3.fc23 for f23-candidate --duration=20 --notes='temp non-stable dependecy waiting for stable'
[1] http://koji.fedoraproject.org/koji/taskinfo?taskID=10547345 [2] https://kojipkgs.fedoraproject.org//work/tasks/7368/10547368/root.log
https://bugzilla.redhat.com/show_bug.cgi?id=1248071
--- Comment #10 from Vincent Batts vbatts@redhat.com --- fixed upstream https://golang.org/cl/12951
https://bugzilla.redhat.com/show_bug.cgi?id=1248071
Vincent Batts vbatts@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED
--- Comment #11 from Vincent Batts vbatts@redhat.com --- build root override is tagged.
https://bugzilla.redhat.com/show_bug.cgi?id=1248071
Jan Chaloupka jchaloup@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |VERIFIED
--- Comment #12 from Jan Chaloupka jchaloup@redhat.com --- F23 build of kubernetes with debug enabled building as well [1].
[1] http://koji.fedoraproject.org/koji/taskinfo?taskID=10571611
Thank you Vincent.
golang@lists.fedoraproject.org