[Rpm-maint] [rpm-software-management/rpm] Missing build id, Generating build-id links failed (#367)
Tzafrir Cohen
tzafrir at cohens.org.il
Sun Dec 10 08:34:25 UTC 2017
On Fri, Dec 08, 2017 at 12:35:44AM +0100, Mark Wielaard wrote:
> Hi Eli,
>
> On Thu, Dec 07, 2017 at 03:20:01PM -0800, Eli Uriegas wrote:
> > ```
> > error: Missing build-id in /root/rpmbuild/BUILDROOT/docker-ce-17.12.0.ce-0.1.rc1.fc27.x86_64/usr/bin/docker-containerd-shim
> > error: Generating build-id links failed
> > Missing build-id in /root/rpmbuild/BUILDROOT/docker-ce-17.12.0.ce-0.1.rc1.fc27.x86_64/usr/bin/docker-containerd-shim
> > Generating build-id links failed
> > ```
>
> That probably means the compiler/linker of that binary didn't generate a proper
> build-id for that binary. The golang toolchain didn't in the past.
>
> > I believe it may have something to do with this commit: https://github.com/rpm-software-management/rpm/commit/5e82c7e8a8fc05195cdf622d0a120b9e70a9371b
>
> Why do you believe that? That commit should only fix issues for noarch packages.
> Real binaries must have build-ids.
>
> At least the Fedora go toolchain should be able to generate proper build-ids these days.
> If not, see these (old) notes:
> https://fedoraproject.org/wiki/PackagingDrafts/Go#Build_ID
So is the official answer to use gccgo?
I recently ran into this issue and found no good answer. I ended up
using the following Makefile snippet:
BUILD_ID=$(shell head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')
BUILD_ID_OPT=-B 0x$(BUILD_ID)
BUILD_ARGS=-ldflags "-X main.version=$(VERSION) -X main.commit=$(COMMIT) -X main.buildtime=$(BUILD_TIME) $(BUILD_ID_OPT)"
(Yes, not a reproducible build if I use buildtime, but useful so far)
--
Tzafrir Cohen | tzafrir at jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir at cohens.org.il | | best
tzafrir at debian.org | | friend
More information about the Rpm-maint
mailing list