bincode-org / bincode

A binary encoder / decoder implementation in Rust.
MIT License
2.69k stars 272 forks source link

Fix CI for `x86_64-linux-android` and `i686-linux-android` #624

Open VictorKoenders opened 1 year ago

VictorKoenders commented 1 year ago

The CI breaks on android with the error cannot find -lunwind.

str4d commented 5 months ago

The Android NDK used to include libgcc for unwind support (which is required by Rust among others). From NDK r23, libgcc is removed, replaced by LLVM's libunwind (https://github.com/android/ndk/issues/1230).

Rust 1.68.0 (released March 9 2023, shortly before this issue was opened) migrated to requiring NDK r25+ (the LTS at the time) for this reason.

So the cannot find -lunwind error should be avoidable as long as you're building with Rust 1.68+ and a recent NDK. The ubuntu-22.04 GitHub runner (used for ubuntu-latest) defaults to NDK r25, so it should work fine.

VictorKoenders commented 5 months ago

We're using cargo cross for this, it might be worth investigating running containers directly ourselves