Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross compilation for aarch64 report #99

Open
shrx opened this issue Sep 1, 2024 · 2 comments
Open

Cross compilation for aarch64 report #99

shrx opened this issue Sep 1, 2024 · 2 comments

Comments

@shrx
Copy link

shrx commented Sep 1, 2024

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):

  1. 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/",
]
  1. 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.

@ccgauche
Copy link
Owner

ccgauche commented Sep 2, 2024

Never tried cross for with ytermusic so I don't know if it's expected or not. But cross uses containers so it's possible there is some (a lot) of overhead. Have you tried on a x86 computer with a lot of RAM? I can try it if you want tomorrow.

@shrx
Copy link
Author

shrx commented Sep 2, 2024

I compiled on debian x86_64 with 32 GB RAM, I think the total system memory usage did not go over around 5 GB during compilation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants