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

Add pre-built binary for Android #3014

Open
Juhan280 opened this issue Apr 19, 2024 · 5 comments
Open

Add pre-built binary for Android #3014

Juhan280 opened this issue Apr 19, 2024 · 5 comments
Labels
help wanted Contributions encouraged priority:medium

Comments

@Juhan280
Copy link

Juhan280 commented Apr 19, 2024

I was using gleam on Android using termux using the aarch64 linux pre-built binary but it was giving me dns error

Screenshot_20240420-013201_Termux

After some discussion in discord we found out that it could be solved if I build the binary from source. However it takes a lot of time to build it that way. I would love to have a pre-built binary for Android

@lpil
Copy link
Member

lpil commented Apr 20, 2024

Hello! Is this something we could do today on GitHub actions? I don't know anything about compiling for Android I'm afraid.

@lpil lpil added help wanted Contributions encouraged priority:medium labels Apr 20, 2024
@Juhan280
Copy link
Author

Juhan280 commented Apr 20, 2024

I am not that experienced in rust. But i did some research. I think we could add the android target to target and include property of release.yaml
Screenshot_20240420-230047_Termux

For reference
https://rust-lang.github.io/rustup/cross-compilation.html

My target is aarch64-linux-android btw

@Juhan280
Copy link
Author

I tried but couldn't make it work
https://github.com/Juhan280/gleam/actions

@PgBiel
Copy link
Contributor

PgBiel commented Apr 21, 2024

This article suggests it's possible with cross: https://reemus.dev/tldr/rust-cross-compilation-github-actions#heading-compiling-with-cross

I saw you tried to do so here: https://github.com/Juhan280/gleam/actions/runs/8767097805/job/24060032517

Seems like a library is missing (-lunwind from the error). I wonder whether it can be installed.

Alternatively, this stackoverflow thread had some success with cargo ndk1: https://stackoverflow.com/questions/75909583/cross-compiling-rust-crate-on-windows-for-android

We will probably need to experiment with configuring those tools until we find a suitable configuration.

Footnotes

  1. https://github.com/bbqsrc/cargo-ndk

@PgBiel
Copy link
Contributor

PgBiel commented Apr 21, 2024

Actually, seems like this is a bug with cross, to be addressed soon by upstream (apparently already fixed on cross' main branch): cross-rs/cross#1222

So we should be able to wait for a new cross release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributions encouraged priority:medium
Projects
None yet
Development

No branches or pull requests

3 participants