Red Hat Bugzilla – Bug 1248071
Increase ELFRESERVE constant from 3072 to 3104
Last modified: 2017-08-08 08:03:27 EDT
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):
Steps to Reproduce:
1. clone etcd repository
2. set with_debug macro to 1
3. build etcd for master branch
Etcd fails to build
Etcd does not fail to build
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.
Created attachment 1057332 [details]
Increase ELFRESERVE to 3104
Though, for folks using this golang compiler to cross-compile for other platforms like FreeBSD, this change should be platform specific.
Does golang in Fedora support cross-compiling?
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.
Header of etcd's spec files starts with:
%global with_devel 1
%global with_bundled 0
%global with_debug 0
%global with_check 1
%global with_devel 0
%global with_bundled 1
%global with_debug 0
%global with_check 0
> 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.
pushed and building.
jan please validate the new builds of golang fix the issue for you.
Etcd build with debug on for f24 no longer fails on ELFRESERVE 
For f23 updates and buildroot overrides are needed from now on. F23 now installs golang-1.4.99-4.1.5beta2.fc23.x86_64 . 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'
fixed upstream https://golang.org/cl/12951
build root override is tagged.
F23 build of kubernetes with debug enabled building as well .
Thank you Vincent.
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.
More information and reason for this action is here:
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.