Open cpswan opened 1 year ago
It seems that libatomic.so.1
has been removed from the debian:unstable
image for linux/riscv64 but it's still needed by dart compile exe
(testing with 3.2.0-42.1.beta).
To deal with this I've modified the Dockerfile to install libatomic1
:
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
dnsutils \
git \
libatomic1 \
openssh-client \
unzip \
; \
rm -rf /var/lib/apt/lists/*
and then added the library to the list that gets copied into runtime:
riscv64) \
TRIPLET="riscv64-linux-gnu" ; \
FILES="/lib/ld-linux-riscv64-lp64d.so.1 \
/lib/riscv64-linux-gnu/ld-linux-riscv64-lp64d.so.1 \
/usr/lib/riscv64-linux-gnu/libatomic.so.1" ;; \
Seems this isn't needed for Ubuntu 24.04.
Whilst testing container images with AOT binaries created from build images based on #140 I found that they wouldn't run:
This can be remedied by copying
/usr/lib/riscv64-linux-gnu/libatomic.so.1
into/runtime
so it's available in the container.I'm not entirely sure that this is a RISC-V specific thing, but given that many more people are likely to be testing Dart 3 betas on other platforms it's a strong possibility.
docker run atsigncompany/dartshowplatform:GHA_634
provides an example of a container without libatomic.so.1:Whilst
docker run atsigncompany/dartshowplatform:GHA_635
provides an example of a container with libatomic.so.1 in thelinux/riscv64
image:Source for the examples above is at https://github.com/atsign-company/at_dockerfiles