Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildx: add add -ldflags=-linkmode=external to fix missing build-id warning #531

Closed

Conversation

thaJeztah
Copy link
Member

I noticed this warning during a build in CI on #530:

warning: Missing build-id in /root/rpmbuild/BUILDROOT/docker-ce-cli-0.0.0.20210311145359.d3c36a2-0.el8.x86_64/usr/libexec/docker/cli-plugins/docker-buildx

And looks looks like we had that issue before at some point; rpm-software-management/rpm#367 (comment)

From that thread:

OK one way is to use gccgo instead of go build, and the other way is to add -ldflags=-linkmode=external flag to go build.

Still, by default (i.e. using go build) it doesn't do that and it's a problem.

…arning

I noticed this warning during a build in CI:

    warning: Missing build-id in /root/rpmbuild/BUILDROOT/docker-ce-cli-0.0.0.20210311145359.d3c36a2-0.el8.x86_64/usr/libexec/docker/cli-plugins/docker-buildx

And looks looks like we had that issue before at some point; rpm-software-management/rpm#367 (comment)

From that thread:

> OK one way is to use gccgo instead of go build, and the other way is to add -ldflags=-linkmode=external flag to go build.
>
> Still, by default (i.e. using go build) it doesn't do that and it's a problem.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Member Author

thaJeztah commented Mar 23, 2021

First run (with test-commit to "revert" the fix); https://ci-next.docker.com/public/blue/rest/organizations/jenkins/pipelines/docker-ce-packaging/branches/PR-531/runs/1/nodes/9/log/?start=0

+ cp -pr build-docs/LICENSE /root/rpmbuild/BUILDROOT/docker-ce-cli-0.0.0.20210311145359.d3c36a2-0.el8.x86_64/usr/share/doc/docker-ce-cli
+ cp -pr build-docs/MAINTAINERS /root/rpmbuild/BUILDROOT/docker-ce-cli-0.0.0.20210311145359.d3c36a2-0.el8.x86_64/usr/share/doc/docker-ce-cli
+ cp -pr build-docs/NOTICE /root/rpmbuild/BUILDROOT/docker-ce-cli-0.0.0.20210311145359.d3c36a2-0.el8.x86_64/usr/share/doc/docker-ce-cli
+ cp -pr build-docs/README.md /root/rpmbuild/BUILDROOT/docker-ce-cli-0.0.0.20210311145359.d3c36a2-0.el8.x86_64/usr/share/doc/docker-ce-cli
+ exit 0
warning: Missing build-id in /root/rpmbuild/BUILDROOT/docker-ce-cli-0.0.0.20210311145359.d3c36a2-0.el8.x86_64/usr/libexec/docker/cli-plugins/docker-buildx
Provides: docker-ce-cli = 1:0.0.0.20210311145359.d3c36a2-0.el8 docker-ce-cli(x86-64) = 1:0.0.0.20210311145359.d3c36a2-0.el8
Requires(interp): /bin/sh
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1

@thaJeztah thaJeztah force-pushed the fix_missing_build_id_warning branch from f557814 to 1b9e75a Compare March 23, 2021 23:10
@thaJeztah
Copy link
Member Author

thaJeztah commented Mar 23, 2021

With this patch, no warning is shown; https://ci-next.docker.com/public/blue/rest/organizations/jenkins/pipelines/docker-ce-packaging/branches/PR-531/runs/2/nodes/9/log/?start=0

+ cp -pr build-docs/MAINTAINERS /root/rpmbuild/BUILDROOT/docker-ce-cli-0.0.0.20210311145359.d3c36a2-0.el8.x86_64/usr/share/doc/docker-ce-cli
+ cp -pr build-docs/NOTICE /root/rpmbuild/BUILDROOT/docker-ce-cli-0.0.0.20210311145359.d3c36a2-0.el8.x86_64/usr/share/doc/docker-ce-cli
+ cp -pr build-docs/README.md /root/rpmbuild/BUILDROOT/docker-ce-cli-0.0.0.20210311145359.d3c36a2-0.el8.x86_64/usr/share/doc/docker-ce-cli
+ exit 0
Provides: docker-ce-cli = 1:0.0.0.20210311145359.d3c36a2-0.el8 docker-ce-cli(x86-64) = 1:0.0.0.20210311145359.d3c36a2-0.el8
Requires(interp): /bin/sh
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1

@thaJeztah thaJeztah marked this pull request as ready for review March 23, 2021 23:43
@thaJeztah
Copy link
Member Author

@tonistiigi @tiborvass ptal

@thaJeztah
Copy link
Member Author

This file was removed, so this no longer applies

@thaJeztah thaJeztah closed this May 12, 2022
@thaJeztah thaJeztah deleted the fix_missing_build_id_warning branch May 12, 2022 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant