ytermusic
ytermusic copied to clipboard
Cross compilation for aarch64 report
Hi, just wanted to let you know that it's possible to cross compile for aarch64 without too much effort (I managed to do it while totally unfamiliar with rust).
What I needed to do (information gathered by googling for similar problems):
- Create a Cross.toml file with the following contents (not sure if all absolutely necessary):
[build]
default-target = "aarch64-unknown-linux-gnu"
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update",
"apt-get install -y alsa-tools libasound2-dev libdbus-1-dev pkg-config",
"apt-get install -y alsa-tools:$CROSS_DEB_ARCH libasound2-dev:$CROSS_DEB_ARCH libdbus-1-dev:$CROSS_DEB_ARCH",
"cp -r /usr/lib/aarch64-linux-gnu/* /usr/aarch64-linux-gnu/lib/",
]
- build with:
cross build --target=aarch64-unknown-linux-gnu --release
I first wanted to build it on my raspberry pi directly but I ran out of RAM.