Bug 1548119
Summary: | crash: Partial injection of Fedora build flags | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Florian Weimer <fweimer> |
Component: | crash | Assignee: | Dave Anderson <anderson> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | anderson, fweimer |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-02-23 14:49:36 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1539083 |
Description
Florian Weimer
2018-02-22 18:55:46 UTC
My crash.spec %build section currently consists of just this: %build make RPMPKG="%{version}-%{release}" CFLAGS="%{optflags}" I read the referenced buildflags.md page, and tried this first: %build make RPMPKG="%{version}-%{release}" CFLAGS="%{optflags}" LDFLAGS="%{build_ldflags}" And the build fails during configuration like so: ... checking for gcc... gcc checking for C compiler default output file name... configure: error: in `/root/rpmbuild/BUILD/crash-7.2.1/gdb-7.6': configure: error: C compiler cannot create executables See `config.log' for more details. make[2]: *** No targets specified and no makefile found. Stop. crash build failed ... Checking the config.log, it shows this, where "%{build_ldflags}" is being referenced literally: ... configure:4232: checking for C compiler default output file name configure:4254: gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic %{build_ldflags} conftest.c >&5 gcc: error: %{build_ldflags}: No such file or directory ... It translates the CFLAGS="%{optflags}" OK, but not "%{build_ldflags}". I don't understand why? BTW, I did the build above on a freshly-provisioned beaker machine (Red Hat internal), where I selected the "Fedorarawhide" family. (In reply to Dave Anderson from comment #1) > Checking the config.log, it shows this, where "%{build_ldflags}" is > being referenced literally: Then the build root is too old. You need quite a recent Fedora 28 or Rawhide compose, with at least version 94 of redhat-rpm-config. It works in the Fedora buildroots, and the Fedora mirrors have this version as well (so mock should work out of the box). I don't know what happens in Beaker. I suspect it's lagging Fedora by a couple of weeks. > I don't know what happens in Beaker. I suspect it's lagging Fedora by a couple > of weeks.
Ah, OK, it's much older than that:
# rpm -qa | grep redhat-rpm-config
redhat-rpm-config-67-1.module_6faa4f4e.noarch
#
That package was built on 2017-08-15 17:23:13.
Thanks,
Dave
(In reply to Dave Anderson from comment #4) > > I don't know what happens in Beaker. I suspect it's lagging Fedora by a couple > of weeks. > > Ah, OK, it's much older than that: > > # rpm -qa | grep redhat-rpm-config > redhat-rpm-config-67-1.module_6faa4f4e.noarch > # > > That package was built on 2017-08-15 17:23:13. I recommend to install Fedora 27, make sure the installation is current with regards to updates (basically, “dnf update”), and use “mock -r fedora-rawhide-x86_64” (or your preferred architecture), instead of building on a rawhide host. Currently I'm doing a fedpkg scratch build in the master branch. That should work, right? > Currently I'm doing a fedpkg scratch build in the master branch. > That should work, right? That worked: Information for task build (rawhide, crash-7.2.1-2.fc29.src.rpm) https://koji.fedoraproject.org/koji/taskinfo?taskID=25241015 Information for build crash-7.2.1-2.fc29 https://koji.fedoraproject.org/koji/buildinfo?buildID=1049079 Thanks, confirmed as fixed. I pushed the change to Fedora 28, too. |