podman: Can't build libpod without selinux

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

seems like libpod can’t be build without libselinux.

Steps to reproduce the issue:

export GOPATH=~/Source/podman/                                                                                                                                                                                                             export PREFIX=/opt/podman                                                                                                                                                                                                                                                                                                                                                                                                                                                               LIBPOD_VERSION="v1.4.4"                                                                                                                                                                                                                     DEST="src/github.com/containers/libpod"                                                                                                                                                                                                                                                                                                                                                                                                                                                 git clone -b $LIBPOD_VERSION --single-branch --depth 1 https://github.com/containers/libpod/ $GOPATH/$DEST                                                                                                                                  cd $GOPATH/$DEST                                                                                                                                                                                                                                                                                                                                                                                                                                                                        make clean                                                                                                                                                                                                                                  make BUILDTAGS="systemd" PREFIX=$PREFIX                                                                                                                                                                                                     sudo make install PREFIX=$PREFIX

Describe the results you received: missing libsystemd

go build -gcflags 'all=-trimpath=/home/admin/Source/podman/src/github.com/containers/libpod' -asmflags 'all=-trimpath=/home/admin/Source/podman/src/github.com/containers/libpod' -ldflags ' -X github.com/containers/libpod/libpod.gitCommit=b3f10c8be229bcc58c1673b0431285fd5fce1293 -X github.com/containers/libpod/libpod.buildInfo=1563748524 -X github.com/containers/libpod/libpod.installPrefix=/opt/podman -X github.com/containers/libpod/libpod.etcDir=/etc' -tags "systemd" -o bin/podman github.com/containers/libpod/cmd/podman
# pkg-config --cflags  -- glib-2.0 gobject-2.0 ostree-1 libselinux glib-2.0 gobject-2.0 ostree-1
Package libselinux was not found in the pkg-config search path.
Perhaps you should add the directory containing `libselinux.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libselinux' found
pkg-config: exit status 1
make: *** [Makefile:145: podman] Error 2
mkdir -p "/home/admin/Source/podman/src/github.com/containers/libpod/_output/src/github.com/containers"
ln -sf "/home/admin/Source/podman/src/github.com/containers/libpod" "/home/admin/Source/podman/src/github.com/containers/libpod/_output/src/github.com/containers"
ln -sf "/home/admin/Source/podman/src/github.com/containers/libpod/vendor/github.com/varlink" "/home/admin/Source/podman/src/github.com/containers/libpod/_output/src/github.com/varlink"
touch .gopathok
install  -d -m 755 /opt/podman/bin
install  -m 755 bin/podman /opt/podman/bin/podman
install: cannot stat 'bin/podman': No such file or directory
make: *** [Makefile:288: install.bin] Error 1

Describe the results you expected: working compilation of libpod

Additional information you deem important (e.g. issue happens only occasionally): reason seems to be that libselinux is included into vendor/modules.txt unconditionally

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (10 by maintainers)

Most upvoted comments

Good catch! ostree requires libselinux.

I’ll try to fix that in our documentation. Thanks!