RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1411465 - etcd fails to build from source
Summary: etcd fails to build from source
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: etcd
Version: 7.3
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jan Chaloupka
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1405448
TreeView+ depends on / blocked
 
Reported: 2017-01-09 19:40 UTC by D. Marlin
Modified: 2017-01-17 13:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-17 13:22:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description D. Marlin 2017-01-09 19:40:33 UTC
Description of problem:

etcd fails to build from source with the newer (1.7.4) version of golang.  The previous build was performed with golang-1.6.2-2.  It appears that between these versions a warning became an error, which now causes the build to fail.


Version-Release number of selected component (if applicable):

etcd-3.0.15-1
golang-1.6.2-2


How reproducible:

consistently


Steps to Reproduce:
1.  curl -O http://download.eng.bos.redhat.com/brewroot/packages/etcd/3.0.15/1.el7/src/etcd-3.0.15-1.el7.src.rpm
2.  rhpkg scratch-build --target extras-rhel-7.3-candidate --srpm=etcd-3.0.15-1.el7.src.rpm


Actual results:

    :
/usr/lib/golang/pkg/tool/linux_amd64/link -o $WORK/github.com/coreos/etcd/cmd/_obj/exe/a.out -L $WORK -L /builddir/build/BUILD/etcd-fc00305a2e59b4c2d4a53c9fbb4d30741a96ea67/pkg/linux_amd64 -L /builddir/build/BUILD/etcd-fc00305a2e59b4c2d4a53c9fbb4d30741a96ea67/Godeps/_workspace/pkg/linux_amd64 -extld=gcc -buildmode=exe -buildid=3c6ef890335db7dffadd631d938520c8311f469e -X github.com/coreos/etcd/version.GitSHA fc00305 -B 0x1500b28ec30c4b53b54ffae67e16bb53d81a86d5 -B 0x024eefd6c6666277230ece69745ba0dc62de8a95 $WORK/github.com/coreos/etcd/cmd.a
# github.com/coreos/etcd/cmd
/usr/lib/golang/pkg/tool/linux_amd64/link: -X flag requires argument of the form importpath.name=value
error: Bad exit status from /var/tmp/rpm-tmp.68RBmt (%build)


Expected results:

Builds without error.


Additional info:

This was only flagged as a warning in the previous build:  

link: warning: option -X github.com/coreos/etcd/version.GitSHA fc00305 may not work in future releases; use -X github.com/coreos/etcd/version.GitSHA=fc00305

Changing the "-X" flag definition in the spec file allows the build to complete without errors, i.e., 

 %if ! 0%{?with_debug}
-export LDFLAGS="-X %{import_path}/version.GitSHA %{shortcommit}"
+export LDFLAGS="-X %{import_path}/version.GitSHA=%{shortcommit}"
 %else
-export LDFLAGS="-X %{import_path}/version.GitSHA %{shortcommit} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')"
+export LDFLAGS="-X %{import_path}/version.GitSHA=%{shortcommit} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')"
 %endif

Comment 2 Jan Chaloupka 2017-01-17 13:22:01 UTC
Just a spec file fix. No need to include the issue in errata.

Thanks for patching the spec.


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