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

Error compiling - "lexical-core" #31

Closed
arc12 opened this issue Jan 5, 2022 · 1 comment
Closed

Error compiling - "lexical-core" #31

arc12 opened this issue Jan 5, 2022 · 1 comment

Comments

@arc12
Copy link

arc12 commented Jan 5, 2022

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
Copy link
Author

arc12 commented Jan 5, 2022

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

(see rust-lang/rust#81654)

@arc12 arc12 closed this as completed Jan 5, 2022
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