pkg-config fails to find libsystemd for some docker base-images
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.7k
- Forks
- 338
- PR merge metrics
- No merged PRs in 30d
Description
When attempting to compile an application that depends on go-systemd, I get error messages from pkg-config failing to find lsystemd. I've produced this on images derived from golang:1.5 and ubuntu:14.04 with dockerfiles along these lines:
FROM golang:1.5
RUN apt-get update
RUN apt-get -y install build-essentials pkg-config libsystemd-journal-dev
# compile go application here
I've gotten a range of different errors by playing with the combination of the many transitional libsystemd packages that I install:
# pkg-config --cflags libsystemd
Package libsystemd was not found in the pkg-config search path.
Perhaps you should add the directory containing `libsystemd.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libsystemd' found
pkg-config: exit status 1
# pkg-config --cflags libsystemd-journal
Package libsystemd-journal was not found in the pkg-config search path.
Perhaps you should add the directory containing `libsystemd-journal.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libsystemd-journal' found
pkg-config: exit status 1
# github.com/coreos-inc/quay-builder
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: cannot find -lsystemd
collect2: error: ld returned 1 exit status
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with Dockerfiles based on golang:1.5 and ubuntu:14.04, then run the shown pkg-config commands and compile the Go application. Done means the relevant libsystemd package is discoverable and the application links successfully on the affected base images.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go, linux, ubuntu
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100