Bug 1417589 - Couldn't build binaries: /usr/bin/ld: cannot find -lgpgme
Summary: Couldn't build binaries: /usr/bin/ld: cannot find -lgpgme
Alias: None
Product: Fedora
Classification: Fedora
Component: docker
Version: 26
Hardware: Unspecified
OS: Linux
Target Milestone: ---
Assignee: Antonio Murdaca
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2017-01-30 11:19 UTC by Slava Semushin
Modified: 2018-05-29 11:45 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-05-29 11:45:37 UTC
Type: Bug

Attachments (Terms of Use)

Description Slava Semushin 2017-01-30 11:19:53 UTC
Description of problem:
I couldn't build docker binaries by the make binary command. It fails with linker errors:
/usr/bin/ld: cannot find -lgpgme
/usr/bin/ld: cannot find -lassuan
/usr/bin/ld: cannot find -lgpg-error

How reproducible:

Steps to Reproduce:
1. git clone the docker repository (with RH-specific commit, at least cd0ac29c316aaa01059ad9930ddaf6234e2e62c0#commitcomment-20645362 commit should be there)
2. make binary

Actual results:
---> Making bundle: binary (in bundles/1.12.6/binary)
Building: bundles/1.12.6/binary-client/docker-1.12.6
# github.com/docker/docker/cmd/docker
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: cannot find -lgpgme
/usr/bin/ld: cannot find -lassuan
/usr/bin/ld: cannot find -lgpg-error
/tmp/go-link-417318086/000003.o: In function `mygetpwnam_r':
/usr/local/go/src/os/user/lookup_unix.go:32: warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/go-link-417318086/000003.o: In function `mygetpwuid_r':
/usr/local/go/src/os/user/lookup_unix.go:27: warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned 1 exit status

Expected results:
Building process should be successful and binaries should have been build.

Additional info:
I'm using OpenShift all-in-one vagrant box.

Comment 1 Antonio Murdaca 2017-01-30 11:50:53 UTC
What you're trying to do is to build a dynamic binary _inside_ the container (using make binary). That can't really work if your host is let's say Fedora and the container Ubuntu/Debian/CentOS/RHEL.

The issue is, our docker needs to be _dynamic_ because some of our patches require C headers and such.

What you can do instead is to:

- make rpm (this creates and rpm and you can install it on your host)
- run ./hack/make.sh dynbinary directly (but this can become tricky)

Comment 2 Slava Semushin 2017-01-30 13:31:27 UTC
Thank you for a quick response!

I've tried to execute make rpm and it fails:

---> Making bundle: build-rpm (in bundles/1.12.6/build-rpm)
INFO: Waiting for daemon to start...
+++ exec dockerd --debug --host unix:///go/src/github.com/docker/docker/bundles/1.12.6/build-rpm/docker.sock --storage-driver devicemapper --pidfile bundles/1.12.6/build-rpm/docker.pid --userland-proxy=true
error: daemon at unix:///go/src/github.com/docker/docker/bundles/1.12.6/build-rpm/docker.sock fails to 'docker version':
 Version:         1.12.6
 API version:     1.24
 Package version: 
 Go version:      go1.6.4
 Git commit:      c800e9f-unsupported
 Built:           Mon Jan 30 12:08:07 2017
 OS/Arch:         linux/amd64
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
---> Making bundle: .integration-daemon-stop (in bundles/1.12.6/build-rpm)
Makefile:98: recipe for target 'rpm' failed
make: *** [rpm] Error 1

At the same time docker service is running.

Comment 3 Slava Semushin 2017-02-01 17:14:36 UTC
It doesn't work because of this error:

$ cat bundles/1.12.6/build-rpm/docker.log 
time="2017-02-01T16:16:37.442179427Z" level=fatal msg="can't create unix socket /go/src/github.com/docker/docker/bundles/1.12.6/build-rpm/docker.sock: listen unix /go/src/github.com/docker/docker/bundles/1.12.6/build-rpm/docker.sock: bind: operation not permitted"

Comment 4 Fedora End Of Life 2017-02-28 11:08:10 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 5 Fedora End Of Life 2018-05-03 07:58:50 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. 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'
of '26'.

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 26 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.

Comment 6 Fedora End Of Life 2018-05-29 11:45:37 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
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.

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