gplan.so: build from source using Raspbian Stretch Docker
Use balenalib/raspberry-pi-debian:stretch with legacy.raspbian.org repos. Exact match: GCC 6.3, Python 3.5, GLIBC 2.24 — identical to the Pi. First build ~25min (QEMU), subsequent builds ~1sec (cached image). Replaces the broken Bullseye approach that had GLIBC/GLIBCXX mismatches.
This commit is contained in:
@@ -1,15 +1,24 @@
|
||||
# Pre-built armv7 environment for gplan.so
|
||||
# Build once: docker build --platform linux/arm/v7 -t onefin-gplan -f .pi/Dockerfile.gplan .pi/
|
||||
# Then use: .pi/build-gplan.sh
|
||||
FROM debian:bullseye
|
||||
# Raspbian Stretch armhf build environment for gplan.so
|
||||
# Matches the Pi exactly: GCC 6.3, Python 3.5, GLIBC 2.24
|
||||
#
|
||||
# Build image: docker build -t onefin-gplan -f .pi/Dockerfile.gplan .pi/
|
||||
# Build gplan: .pi/build-gplan.sh
|
||||
FROM balenalib/raspberry-pi-debian:stretch
|
||||
|
||||
RUN apt-get update -qq && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \
|
||||
build-essential scons git ca-certificates python3-dev \
|
||||
# Fix repos to use archived Raspbian mirrors
|
||||
RUN echo "deb http://legacy.raspbian.org/raspbian/ stretch main contrib non-free rpi" \
|
||||
> /etc/apt/sources.list && \
|
||||
rm -f /etc/apt/sources.list.d/*.list
|
||||
|
||||
RUN apt-get -o Acquire::Check-Valid-Until=false \
|
||||
-o Acquire::AllowInsecureRepositories=true update && \
|
||||
apt-get -o Acquire::Check-Valid-Until=false --allow-unauthenticated \
|
||||
install -y --no-install-recommends \
|
||||
build-essential python3-dev scons git ca-certificates \
|
||||
libssl-dev libexpat1-dev libbz2-dev liblz4-dev zlib1g-dev perl file && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Clone and build cbang (static lib, ~5min under QEMU)
|
||||
# Clone and build cbang
|
||||
RUN mkdir -p /opt/cbang && cd /opt/cbang && git init -q && \
|
||||
git remote add origin https://github.com/CauldronDevelopmentLLC/cbang && \
|
||||
git fetch --depth 1 -q origin 18f1e963107ef26abe750c023355a5c40dd07853 && \
|
||||
@@ -17,7 +26,7 @@ RUN mkdir -p /opt/cbang && cd /opt/cbang && git init -q && \
|
||||
scons -j2 disable_local="re2 libevent" && \
|
||||
rm -rf .git build/dep
|
||||
|
||||
# Clone and patch camotics (source only, don't compile yet — that depends on workspace)
|
||||
# Clone, patch, and build camotics/gplan
|
||||
RUN mkdir -p /opt/camotics && cd /opt/camotics && git init -q && \
|
||||
git remote add origin https://github.com/CauldronDevelopmentLLC/camotics && \
|
||||
git fetch --depth 1 -q origin ec876c80d20fc19837133087cef0c447df5a939d && \
|
||||
@@ -31,10 +40,9 @@ RUN mkdir -p /opt/camotics && cd /opt/camotics && git init -q && \
|
||||
done && \
|
||||
rm -rf .git
|
||||
|
||||
# Pre-compile camotics objects (the slow part, ~20min under QEMU)
|
||||
ENV CBANG_HOME=/opt/cbang
|
||||
RUN cd /opt/camotics && scons -j2 gplan.so with_gui=0 with_tpl=0 && \
|
||||
rm -f gplan.so # remove the python3.9-linked one, we relink at build time
|
||||
|
||||
ENV CBANG_HOME=/opt/cbang
|
||||
# Pre-compile everything including gplan.so
|
||||
RUN cd /opt/camotics && scons -j2 gplan.so with_gui=0 with_tpl=0
|
||||
|
||||
WORKDIR /opt/camotics
|
||||
|
||||
Reference in New Issue
Block a user