wose / satnogs-monitor

Terminal UI monitor for your SatNOGS ground station.
GNU General Public License v3.0
78 stars 6 forks source link

Error compiling - "lexical-core" #31

Closed arc12 closed 2 years ago

arc12 commented 2 years ago

I have a 32 bit intel Debian Buster (actually the one distributed by the RPi foundation), so was attempting a build following the instructions to use Rust.

I needed to install libssl-dev but then things seemed OK until I got a lot of error messages ending with "error: could not compile lexical-core due to 27 previous errors"

Errors are like:

error[E0277]: cannot mod `usize` by `u32`
    --> /home/pi/.cargo/registry/src/github.com-1285ae84e5963aae/lexical-core-0.6.2/src/atof/algorithm/math.rs:1259:17
     |
1259 |     let rem = n % bits;
     |                 ^ no implementation for `usize % u32`
     |
     = help: the trait `Rem<u32>` is not implemented for `usize`

error[E0308]: mismatched types
    --> /home/pi/.cargo/registry/src/github.com-1285ae84e5963aae/lexical-core-0.6.2/src/atof/algorithm/math.rs:1260:19
     |
1260 |     let div = n / bits;
     |                   ^^^^ expected `usize`, found `u32`

error[E0277]: cannot divide `usize` by `u32`
    --> /home/pi/.cargo/registry/src/github.com-1285ae84e5963aae/lexical-core-0.6.2/src/atof/algorithm/math.rs:1260:17
     |
1260 |     let div = n / bits;
     |                 ^ no implementation for `usize / u32`
     |
     = help: the trait `Div<u32>` is not implemented for `usize`

I have no idea how to proceed. Is this a deep issue arising from my CPU being 32 bit?

arc12 commented 2 years ago

I got lucky! solved - "Compiling lexical-core v0.6.8" succeeded after cargo update -p lexical-core

(see https://github.com/rust-lang/rust/issues/81654)