I was wondering if anyone has experience attempting to use cebero build for multi arch in Docker ? Just on bootstrap it completely fails and hangs at cargo-c bootstrap. No error log or log past that. It could sit there for an hour doing nothing.
A simple command run to build rust.
./cerbero-uninstalled -t -c $HOME/.cerbero/localconf.cbc -c config/cross-lin-arm64.cbc -v rust fetch-bootstrap
verbose: deleted temp file: /build/src/cerbero-build/rust/rustup/tmp/_o4pnou_fk1zblip_file verbose: toolchain 'stable-x86_64-unknown-linux-gnu' installed info: default toolchain set to 'stable-x86_64-unknown-linux-gnu' 0:00:22.536866 Rust toolchain v1.77.2 installed at /build/src/cerbero-build/rust 0:00:22.615274 Fetching the following recipes using 2 async job(s): m4 autoconf gettext-m4 automake libtool meson ninja pkg-config orc zlib cargo-c 0:00:38.285449 [(10/11 @ 100%) FETCH: cargo-c]
Every single method I tried failed. I spent over 20 hours trying to get a building solution working and resorting to building my own Docker image. I think Cerbero for arm64 building is what I need and will work assuming this rust issue is figured out. I need the rust plugins built just to get to the whepsrc plugin.
I think adding Rust has over complicated things. It would have been simpler if whepsrc was in the other prebuilt plugins ? I need to build a python streamer solution for PI. And to get to that stage I need to build gstreamer from scratch to get the plugin.
Here is the docker file how I build the image. I have to pre install the apt packages for cerbero myself as it requires a flag to not install dbus which fails in Docker.
`
syntax = docker/dockerfile:1.2
FROM debian:bookworm-slim
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ENV CARGO_HTTP_DEBUG=true
ENV CARGO_LOG=cargo::ops::registry=debug
#ENV NSS_UNKNOWN_HOME=/home/user
ARG DEBIAN_FRONTEND=noninteractive
WORKDIR /build
COPY nsswitch.conf /etc/nsswitch.conf
RUN --mount=type=cache,target=/var/cache/apt
dpkg --add-architecture arm64 &&
apt update &&
apt install -y
–no-install-recommends
build-essential
libnss-unknown
libncurses5-dev
rsync
cpio
python3
unzip
bc
wget
git
nano
binutils-aarch64-linux-gnu
bison
flex
g+±aarch64-linux-gnu
gcc-aarch64-linux-gnu
libglib2.0-dev-bin
liborc-0.4-dev-bin
pkg-config
python3-setuptools
ninja-build
python3-pip
python3-venv
libssl-dev:arm64
openssl:arm64 &&
apt-get clean &&
rm -rf /var/lib/apt/lists/* &&
pip3 install
–break-system-packages
meson==1.2.3
distro
pre install extra packages from cerbero
#requires no-install-recommends to avoid a dbus package error
RUN --mount=type=cache,target=/var/cache/apt
apt update &&
dpkg --configure -a &&
apt-get -y install --no-install-recommends autotools-dev automake autoconf libtool g++ autopoint make cmake ninja-build bison flex nasm pkg-config libxv-dev libx11-dev libx11-xcb-dev libpulse-dev python3-dev gettext build-essential pkg-config libxext-dev libxi-dev x11proto-record-dev libxrender-dev libgl1-mesa-dev libxfixes-dev libxdamage-dev libxcomposite-dev libasound2-dev build-essential gperf wget libxtst-dev libxrandr-dev libglu1-mesa-dev libegl1-mesa-dev git xutils-dev ccache python3-setuptools libssl-dev gcc-aarch64-linux-gnu g+±aarch64-linux-gnu
RUN mkdir $HOME/.cerbero &&
echo “allow_parallel_build=True” > $HOME/.cerbero/cerbero.cbc &&
echo “use_ccache=True” >> $HOME/.cerbero/cerbero.cbc &&
echo “local_sources="/build/src/cerbero-sources"” > $HOME/.cerbero/localconf.cbc &&
echo “home_dir="/build/src/cerbero-build"” >> $HOME/.cerbero/localconf.cbc &&
echo “prefix="/usr/local"” >> $HOME/.cerbero/localconf.cbc
`
Here is how the image is built
docker build --tag danrossi/gstreamer/gst-build-cross:latest --file Dockerfile .
Here is how it’s launched
docker run -dit --net=host -v ${PWD}:/build:z --workdir /build danrossi/gstreamer/gst-build-cross:latest /bin/bash entrypoint.sh
Here is the entry script
`
#!/bin/sh
CERBERO_PATH=/build/src/cerbero
if [ ! -d “$CERBERO_PATH” ] ; then
echo “Cerbero does not exist at $CERBERO_PATH; cloning…”
git clone GStreamer / cerbero · GitLab $CERBERO_PATH
fi
cd src/cerbero
./cerbero-uninstalled -t -c $HOME/.cerbero/localconf.cbc -c config/cross-lin-arm64.cbc -v alsa,pulse,python,gi,optimization,rust,v412,rpi fetch-bootstrap
./cerbero-uninstalled -t -c $HOME/.cerbero/localconf.cbc -c config/cross-lin-arm64.cbc -v alsa,pulse,python,gi,optimization,rust,v412,rpi,nox11,nocdparanoia bootstrap -y
`