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

Building 0.0.125 on i686-linux-android fails #3415

Open
ok300 opened this issue Nov 19, 2024 · 0 comments
Open

Building 0.0.125 on i686-linux-android fails #3415

ok300 opened this issue Nov 19, 2024 · 0 comments

Comments

@ok300
Copy link
Contributor

ok300 commented Nov 19, 2024

Building version 0.0.125 on 32 bit fails with

attempt to compute 184_usize - 192_usize, which would overflow

cargo ndk -t i686-linux-android build --release
...

error[E0080]: evaluation of constant value failed
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lightning-0.0.125/src/routing/scoring.rs:807:46
    |
807 | const _LIQUIDITY_MAP_SIZING_CHECK_2: usize = ::core::mem::size_of::<(u64, ChannelLiquidity)>() - 192;
    |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to compute `184_usize - 192_usize`, which would overflow

For more information about this error, try `rustc --explain E0080`.
error: could not compile `lightning` (lib) due to 1 previous error

Maybe the 32 bit usize affects the ChannelLiquidity size calculation in _LIQUIDITY_MAP_SIZING_CHECK_2?

const _LIQUIDITY_MAP_SIZING_CHECK_2: usize = ::core::mem::size_of::<(u64, ChannelLiquidity)>() - 192;

This worked fine with the previous version we used, 0.0.118.

Is this a bug, or was support for 32 bit dropped in the meantime? Thanks.

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

1 participant