From 60d24c4a952ec1cd9b60b945e29b3170016bd4c6 Mon Sep 17 00:00:00 2001 From: mc256 <1913688+mc256@users.noreply.github.com> Date: Thu, 1 Oct 2020 00:52:08 -0400 Subject: [PATCH] Update BUILDING.md - add dependency libseccomp-dev I got these errors when I try to build containerd: ``` go build "-mod=vendor" "-buildmode=pie" -tags "seccomp selinux apparmor" -ldflags "-X main.gitCommit="a220b9c6cc100f71ddc67152a12fc04622313dca" -X main.version=1.0.0-rc92+dev " -o runc . Package libseccomp was not found in the pkg-config search path. Perhaps you should add the directory containing `libseccomp.pc' to the PKG_CONFIG_PATH environment variable No package 'libseccomp' found Package libseccomp was not found in the pkg-config search path. Perhaps you should add the directory containing `libseccomp.pc' to the PKG_CONFIG_PATH environment variable No package 'libseccomp' found pkg-config: exit status 1 ``` Solved this problem by installing one extra dependency `libseccomp-dev`. I am using Ubuntu 20.04 and everything works well! See also: opencontainers/runc#1032 Signed-off-by: Jun Lin Chen --- BUILDING.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 556172fde..4d90762f5 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -38,11 +38,11 @@ $ sudo unzip protoc-3.11.4-linux-x86_64.zip -d /usr/local ``` `containerd` uses [Btrfs](https://en.wikipedia.org/wiki/Btrfs) it means that you -need to satisfy this dependencies in your system: +need to satisfy these dependencies in your system: * CentOS/Fedora: `yum install btrfs-progs-devel` * Debian/Ubuntu: `apt-get install btrfs-tools` - * Debian Buster/Ubuntu 19.10: + * Debian Buster/Ubuntu 19.10/ Ubuntu 20.04: `apt-get install btrfs-progs libbtrfs-dev` At this point you are ready to build `containerd` yourself! @@ -55,6 +55,12 @@ the system, sometimes it is necessary to build runc directly when working with container runtime development. You can skip this step if you already have the correct version of `runc` installed. +`runc` requires `libseccomp`. You may need to install the missing dependencies: + +* CentOS/Fedora: `yum install libseccomp libseccomp-devel` +* Debian/Ubuntu: `apt-get install libseccomp libseccomp-dev` + + For the quick and dirty installation, you can use the following: go get github.com/opencontainers/runc