Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing dependencies for ARM containers on master #4404

Closed
patrick-stephens opened this issue Dec 8, 2021 · 1 comment · Fixed by #4405 or #4408
Closed

Missing dependencies for ARM containers on master #4404

patrick-stephens opened this issue Dec 8, 2021 · 1 comment · Fixed by #4405 or #4408
Assignees

Comments

@patrick-stephens
Copy link
Contributor

Bug Report

Describe the bug
Missing dependencies in the ARM32 image:
/fluent-bit/bin/fluent-bit: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory
There is a fix for it to just add the libatomic1 dependency to the runtime image so I will raise a PR for this.

Detected during the updates to add release automation and testing: #3753
It looks like this might be down to the recent update to systemd: #3177

To Reproduce

Set up multi-arch builds:

sudo apt-get install qemu binfmt-support qemu-user-static # Install the qemu packages
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

Confirm it supports an ARM 32 image:

docker run --rm -t arm64v8/ubuntu uname -m # Run an executable made for aarch64 on x86_64
WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested
aarch64

Checkout current master 3197e97
Patch in version 1.8.10 to the dockerfiles/Dockerfile.arm32v7 - otherwise it'll default to using 1.9.0 source which doesn't exist.

# Fluent Bit version
ENV FLB_MAJOR 1
ENV FLB_MINOR 8
ENV FLB_PATCH 10
ENV FLB_VERSION 1.8.10

Build the ARM 32 container image:

docker build -t arm32-test -f dockerfiles/Dockerfile.arm32v7 .

Run the ARM 32 container image:

docker run --rm -it arm32-test:latest
WARNING: The requested image's platform (linux/arm/v7) does not match the detected host platform (linux/amd64) and no specific platform was requested
/fluent-bit/bin/fluent-bit: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory

Expected behavior
No failures.

If I patch in the required dependency and rebuild then we're all good:

FROM arm32v7/debian:buster-slim

COPY --from=builder /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static

RUN echo "deb http://deb.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/backports.list && \
    apt-get update && \
    apt-get install -y --no-install-recommends \
      libssl1.1 \
      libsasl2-2 \
      pkg-config \
      libpq5 \
      libsystemd0/buster-backports \
      zlib1g \
      ca-certificates \
      libatomic1

Your Environment

  • Version used: master build of 1.8.10 source
  • Configuration: container builds of multiarch using Qemu
  • Operating System and version: Ubuntu 20.04 amd64
@patrick-stephens patrick-stephens self-assigned this Dec 8, 2021
@patrick-stephens
Copy link
Contributor Author

patrick-stephens commented Dec 8, 2021

It looks like ARM64 does not build either, using the same approach as above for ./dockerfiles/Dockerfile.arm64v8 triggers:

The following packages have unmet dependencies:
 libsystemd-dev:arm64 : Depends: libsystemd0:arm64 (= 247.3-6~bpo10+1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
The command '/bin/sh -c apt update && apt install -y --no-remove --no-install-recommends     build-essential     g++-aarch64-linux-gnu     gcc-aarch64-linux-gnu     ca-certificates     pkg-config     cmake     make     flex     bison     dpkg-dev     libssl-dev:arm64     libsasl2-dev:arm64     libsystemd-dev:arm64/buster-backports     libzstd-dev:arm64     zlib1g-dev:arm64     libpq-dev:arm64' returned a non-zero code: 100

This is much larger kettle of fish as cross-compilation is used so the dependencies are incompatible and trigger a cascade of failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment