Skip to content

Building 0.0.125 on i686-linux-android fails #3415

Closed
@ok300

Description

@ok300

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions