Support non-multiarch toolchains on 32-bit ARM (#4191)

fixes https://github.com/esphome/issues/issues/3904
This commit is contained in:
Stefan Agner 2022-12-15 21:27:59 +01:00 committed by Jesse Hills
parent 84374b6b1e
commit 3f1af1690b
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

@ -12,6 +12,9 @@ FROM debian:bullseye-20221024-slim AS base-docker
FROM base-${BASEIMGTYPE} AS base
ARG TARGETARCH
ARG TARGETVARIANT
RUN \
apt-get update \
# Use pinned versions so that we get updates with build caching
@ -36,6 +39,14 @@ ENV \
# Store globally installed pio libs in /piolibs
PLATFORMIO_GLOBALLIB_DIR=/piolibs
# Support legacy binaries on Debian multiarch system. There is no "correct" way
# to do this, other than using properly built toolchains...
# See: https://unix.stackexchange.com/questions/553743/correct-way-to-add-lib-ld-linux-so-3-in-debian
RUN \
if [ "$TARGETARCH$TARGETVARIANT" = "armv7" ]; then \
ln -s /lib/arm-linux-gnueabihf/ld-linux.so.3 /lib/ld-linux.so.3; \
fi
RUN \
# Ubuntu python3-pip is missing wheel
pip3 install --no-cache-dir \