everx-labs / ever-sdk

Client Libraries in 13 languages for Everscale, TON, Venom and other TVM blockchains

Home Page:https://docs.everos.dev/ever-sdk/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation error

varnav opened this issue · comments

Fails to compile as a step of compilation of main.ton.dev

 Compiling ton_sdk v0.1.0 (https://github.com/tonlabs/TON-SDK.git#4f27347c)
error[E0599]: no associated item named `MAX` found for type `u64` in the current scope
   --> /home/ton/.cargo/git/checkouts/ton-sdk-11823a0ea1fdf592/4f27347/ton_sdk/src/transaction.rs:237:53
    |
237 |         fees.total_output = if total_output <= u64::MAX as u128 { total_output as u64 } else { 0 };
    |                                                     ^^^ associated item not found in `u64`
    |
    = help: items from traits can only be used if the trait is in scope
    = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
            `use rand::distributions::weighted::alias_method::Weight;`
help: you are looking for the module in `std`, not the primitive type
    |
237 |         fees.total_output = if total_output <= std::u64::MAX as u128 { total_output as u64 } else { 0 };
    |                                                ^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
error: could not compile `ton_sdk`.
warning: build failed, waiting for other jobs to finish...
error: build failed

Yep
I'm getting the same error on Ubuntu 18

@varnav @anvme please try rustup update. It is the feature from the latest Rust release. Need to update compiler