This tutorial was written for Ubuntu 20.04 and is based off of lmms/wiki/Compiling. It adapt well to other Ubuntu verisons or Linux distros, but the package names and sources.list entries will change.
Warning, this configuration uses ARM64 "port" versions of Ubuntu libraries which cause havoc on apt and the dependency chain. Don't do this on your main machine, or even one you slighlty care about.
sudo snap install cmake --classic
sudo ln -s /snap/bin/cmake /usr/bin/cmake
sudo dpkg --add-architecture arm64
sudo nano /etc/apt/sources.list
# aarch64
deb [arch=arm64] http://ports.ubuntu.com/ focal main multiverse universe
deb [arch=arm64] http://ports.ubuntu.com/ focal-security main multiverse universe
deb [arch=arm64] http://ports.ubuntu.com/ focal-backports main multiverse universe
deb [arch=arm64] http://ports.ubuntu.com/ focal-updates main multiverse universe
sudo apt-get update
# x86_64
sudo apt-get install build-essential git perl libxml2-utils libxml-perl g++-10-aarch64-linux-gnu gcc-10-aarch64-linux-gnu
# aarch64
sudo apt-get install libsndfile1-dev:arm64 libfftw3-dev:arm64 libvorbis-dev:arm64 libogg-dev:arm64 \
libmp3lame-dev:arm64 libasound2-dev:arm64 libjack-jackd2-dev:arm64 libsamplerate0-dev:arm64 \
libsdl2-dev:arm64 libstk0-dev:arm64 stk:arm64 libfluidsynth-dev:arm64 portaudio19-dev:arm64 \
libfltk1.3-dev:arm64 libxinerama-dev:arm64 libxft-dev:arm64 libgig-dev:arm64 \
qtbase5-dev:arm64 qtbase5-private-dev:arm64 qttools5-dev-tools:arm64 qttools5-dev:arm64 \
libqt5x11extras5-dev:arm64 libx11-xcb-dev:arm64 libxcb-keysyms1-dev:arm64 libxcb-util0-dev:arm64
# Fix broken lrelease
wget http://mirrors.kernel.org/ubuntu/pool/universe/q/qttools-opensource-src/qttools5-dev-tools_5.12.8-0ubuntu1_amd64.deb
sudo dpkg -i qttools5-dev-tools_5.12.8-0ubuntu1_amd64.deb
set(CMAKE_SYSTEM_NAME Linux)
set(TOOLCHAIN_PREFIX aarch64-linux-gnu)
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc-10)
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++-10)
set(CMAKE_STRIP ${TOOLCHAIN_PREFIX}-strip CACHE FILEPATH "" FORCE)
set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX}/)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
git clone https://github.com/lmms/lmms --recursive
mkdir lmms/build
cd build
nano ~/lmms/cmake/toolchains/Aarch64.cmake
# paste toolchain contents above
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/Aarch64.cmake