First create an artful lxc container, it's old enough we can use it to quickly cross-build mono for the older glibc available on Evercades.
sudo lxc launch ubuntu:a/armhf armhf-artful
sudo lxc exec armhf-artful bashNow let's fix artful's repo situation, this release is outside of the usual repositories due to being too old. We'll then install the packages.
sed -i 's$http://ports.ubuntu.com/ubuntu-ports$http://old-releases.ubuntu.com/ubuntu$' /etc/apt/sources.list
apt update && apt-get install git autoconf libtool automake build-essential gettext cmake python3 curlNow let's fetch, build and package mono.
wget https://download.mono-project.com/sources/mono/preview/mono-6.12.0.205.tar.xz
tar xf mono-6.12.0.205.tar.xz
cd mono-6.12.0.205
./autogen.sh --with-ikvm-native=no --with-csc=mcs --disable-llvm --disable-dependency-tracking --with-mcs-build --prefix=$(pwd)/built
make -j$(( $(nproc) + 1 )) install Notable built fragments:
bin/mono-sgen,lib/libmono-native.soandlib/libMonoPosixHelper.so: Basic building blocks to run applications.- DLLs in
lib/mono: Can be used to override incompatible versions,mscorlib.dllandmscorlib.dll.sogo together.- You can easily take a bunch of DLLs automatically with the following hacky script:
#!/bin/bash
gac="mono-6.12.0.205/built/lib/mono/4.5"
FILES=(
"Mono.Posix.dll"
"Mono.Security.dll"
"System.Configuration.dll"
"System.Core.dll"
"System.Data.dll"
"System.Drawing.dll"
"System.Runtime.Serialization.dll"
"System.Security.dll"
"System.Xml.Linq.dll"
"System.Xml.dll"
"System.dll"
"mscorlib.dll"
)
mkdir -p dlls-copy/
for i in "${FILES[@]}"; do
LINK=$(
find "$gac" -name "$i" | while read dlllink
do
echo $(realpath "$dlllink")
break
done
)
if [ "x$LINK" == "x" ]; then
echo "Skipping $LINK"
continue
fi
FILE=$(readlink -f "$LINK")
echo "Copying $FILE"
cp $FILE dlls-copy/
doneAn example of application being deployed successfully can be seen here: https://github.com/JohnnyonFlame/FNAPatches/releases/tag/shipwreck