From 32d347aa25b7630cc3865c64ec1bcb1faa48a761 Mon Sep 17 00:00:00 2001 From: Suraj Deshmukh Date: Tue, 15 Aug 2023 21:51:29 +0000 Subject: [PATCH] tools/static-checks: Install clang Without this library the builds are failing with the following error: ``` ... error: failed to run custom build command for `devicemapper-sys v0.1.5` Caused by: process didn't exit successfully: `/kata-containers/src/agent/target/release/build/devicemapper-sys-d8eae524a127e049/build-script-build` (exit status: 101) --- stderr thread 'main' panicked at 'Unable to find libclang: "couldn't find any valid shared libraries matching: ['libclang.so', 'libclang-*.so', 'libclang.so.*', 'libclang-*.so.*'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.63.0/./lib.rs:2338:31 ``` Fixes: #7580 Signed-off-by: Suraj Deshmukh --- .github/workflows/static-checks.yaml | 3 ++- tools/osbuilder/rootfs-builder/ubuntu/Dockerfile.in | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/static-checks.yaml b/.github/workflows/static-checks.yaml index 67b1cd180f..ebca255625 100644 --- a/.github/workflows/static-checks.yaml +++ b/.github/workflows/static-checks.yaml @@ -42,7 +42,8 @@ jobs: sudo apt-get install -y --no-install-recommends \ build-essential \ haveged \ - libdevmapper-dev + libdevmapper-dev \ + clang - name: Install Go uses: actions/setup-go@v3 with: diff --git a/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile.in b/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile.in index ea653877ef..c028c1e192 100644 --- a/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile.in +++ b/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile.in @@ -47,7 +47,8 @@ RUN apt-get update && \ protobuf-compiler \ gettext-base \ umoci \ - kmod + kmod \ + clang # aarch64 requires this name -- link for all RUN ln -s /usr/bin/musl-gcc "/usr/bin/$(uname -m)-linux-musl-gcc"