Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Error Compiling primitive-types v0.7.2 During Cargo Build #7466

Closed
rickyjames56 opened this issue Oct 30, 2020 · 4 comments
Closed

Error Compiling primitive-types v0.7.2 During Cargo Build #7466

rickyjames56 opened this issue Oct 30, 2020 · 4 comments
Labels
J2-unconfirmed Issue might be valid, but it’s not yet known.

Comments

@rickyjames56
Copy link

Using rustc 1.47.0 (18bf6b4f0 2020-10-07)

Failure running "cargo build --release"

I got these log lines:

Compiling primitive-types v0.7.2
error[E0282]: type annotations needed
--> /home/odroid/.cargo/registry/src/github.com-1ecc6299db9ec823/sp-arithmetic-2.0.0/src/fixed_point.rs:541:9
|
541 | let accuracy = P::ACCURACY.saturated_into();
| ^^^^^^^^ consider giving accuracy a type
...
1595 | / implement_fixed!(
1596 | | FixedI64,
1597 | | test_fixed_i64,
1598 | | i64,
... |
1601 | | "Fixed Point 64 bits signed, range = [-9223372036.854775808, 9223372036.854775807]",
1602 | | );
| |__- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0282]: type annotations needed
--> /home/odroid/.cargo/registry/src/github.com-1ecc6299db9ec823/sp-arithmetic-2.0.0/src/fixed_point.rs:541:9
|
541 | let accuracy = P::ACCURACY.saturated_into();
| ^^^^^^^^ consider giving accuracy a type
...
1604 | / implement_fixed!(
1605 | | FixedI128,
1606 | | test_fixed_i128,
1607 | | i128,
... |
1611 | | [-170141183460469231731.687303715884105728, 170141183460469231731.687303715884105727]_",
1612 | | );
| |__- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0282]: type annotations needed
--> /home/odroid/.cargo/registry/src/github.com-1ecc6299db9ec823/sp-arithmetic-2.0.0/src/fixed_point.rs:541:9
|
541 | let accuracy = P::ACCURACY.saturated_into();
| ^^^^^^^^ consider giving accuracy a type
...
1614 | / implement_fixed!(
1615 | | FixedU128,
1616 | | test_fixed_u128,
1617 | | u128,
... |
1621 | | [0.000000000000000000, 340282366920938463463.374607431768211455]_",
1622 | | );
| |__- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 3 previous errors

For more information about this error, try rustc --explain E0282.
error: could not compile sp-arithmetic

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
warning: build failed, waiting for other jobs to finish...
error: build failed

@github-actions github-actions bot added the J2-unconfirmed Issue might be valid, but it’s not yet known. label Oct 30, 2020
@rickyjames56 rickyjames56 changed the title Error Compiling finality-grandpa v0.12.3 During Cargo Build Error Compiling primitive-types v0.7.2 During Cargo Build Oct 30, 2020
@zhaoyilun
Copy link

zhaoyilun commented Oct 30, 2020

I have the same question when compiling the node-template, and when change to nightly-2020-10-06,it fixed. now I'm trying substract with the latest nightly,and got this problem. Now I'm trying to compile it with nightly-2020-10-06. I hope its useful, waiting for me.

OK,Its useful

@bkchr
Copy link
Member

bkchr commented Oct 30, 2020

Latest master compiles with latest nightly. So please update.

@sensahin
Copy link

Having same error. Any fix on this?

@bkchr
Copy link
Member

bkchr commented Nov 1, 2020

You will need to downgrade your compiler version if you want to use the 2.0.0 release: #7287 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J2-unconfirmed Issue might be valid, but it’s not yet known.
Projects
None yet
Development

No branches or pull requests

4 participants