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

Build Failed on target wasm32-unknown-unknown #3

Closed
hackfisher opened this issue Dec 7, 2019 · 3 comments
Closed

Build Failed on target wasm32-unknown-unknown #3

hackfisher opened this issue Dec 7, 2019 · 3 comments

Comments

@hackfisher
Copy link

Failed to build ethash on target wasm32-unknown-unknown:

cargo build --release --target=wasm32-unknown-unknown
error: literal out of range for `usize`
  --> src/miller_rabin.rs:95:14
   |
95 |             (4_759_123_140, &[2, 7, 61]),
   |              ^^^^^^^^^^^^^
   |
   = note: `#[deny(overflowing_literals)]` on by default

error: literal out of range for `usize`
  --> src/miller_rabin.rs:96:14
   |
96 |             (1_112_004_669_632, &[2, 13, 23, 1662803]),
   |              ^^^^^^^^^^^^^^^^^

error: literal out of range for `usize`
  --> src/miller_rabin.rs:97:14
   |
97 |             (2_152_302_898_746, &[2, 3, 5, 7, 11]),
   |              ^^^^^^^^^^^^^^^^^

error: literal out of range for `usize`
  --> src/miller_rabin.rs:98:14
   |
98 |             (3_474_749_660_382, &[2, 3, 5, 7, 11, 13]),
   |              ^^^^^^^^^^^^^^^^^

error: literal out of range for `usize`
  --> src/miller_rabin.rs:99:14
   |
99 |             (341_550_071_728_320, &[2, 3, 5, 7, 11, 13, 17]),
   |              ^^^^^^^^^^^^^^^^^^^

error: literal out of range for usize
   --> src/miller_rabin.rs:100:14
    |
100 |             (0xFFFF_FFFF_FFFF_FFFF, &[2, 3, 5, 7, 11, 13, 17, 19, 23])
    |              ^^^^^^^^^^^^^^^^^^^^^
    |
    = note: the literal `0xFFFF_FFFF_FFFF_FFFF` (decimal `18446744073709551615`) does not fit into an `usize` and will become `4294967295usize`

error: aborting due to 6 previous errors

error: could not compile `ethash`
@k06a
Copy link
Contributor

k06a commented Jan 31, 2020

Fixed here: #7

@sorpaas
Copy link
Member

sorpaas commented Jan 31, 2020

Cheers!

@sorpaas sorpaas closed this as completed Jan 31, 2020
@k06a
Copy link
Contributor

k06a commented Jan 31, 2020

Filed new bug based on this issue, but related to the cargo: rust-lang/cargo#7850

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

3 participants