Build aarch64 Docker images in CI
#124
Labels
ci-cd
CI/CD-related (GitHub Actions, GitLab CI, ...)
docker
Docker-related
help wanted
Extra attention is needed
Ideally we could just build an aarch64 image too (under QEMU user-mode emulation) by using
in
.github/workflows/docker.yml.While this works for most build steps, this unfortunately fails with obscure 'invalid manifest' errors when building D2 with the Swift Package Manager under QEMU. Further investigation revealed that these crashes occur due to
SIGTRAPs sent toswift-driverwhile fetching/checking out D2's dependencies. This can be reproduced by building the image up to the step beforeswift build -c releaseand then manually running the Swift build e.g. in a shell within such a container. The errors will occur and QEMU will place a core dump (*.core) in the working directory (which can be inspected usinglldb /usr/bin/swift-driver --core <path/to/dump.core>and the commandbt all).This bug also seems to be tracked here:
arm64rvolosatovs/docker-protobuf#89Possible ways to resolve this issue:
on running QEMU under user-mode emulation when building multiarch images
seems to deal with a similar problem.
Using machine emulationin https://wiki.ubuntu.com/ARM/RootfsFromScratch/QemuDebootstrap might be helpfularm64#125 tracks the current implementation of thisdepending on how well the Swift Package Manager supports cross-compiling from x86_64 Linux hosts to
aarch64 Linux.
is a guide that explains how to do this (in general)
The text was updated successfully, but these errors were encountered: