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

compile error for v2.0.0-alpha.7 when cargo install #5958

Closed
manxiaqu opened this issue May 8, 2020 · 3 comments
Closed

compile error for v2.0.0-alpha.7 when cargo install #5958

manxiaqu opened this issue May 8, 2020 · 3 comments

Comments

@manxiaqu
Copy link

manxiaqu commented May 8, 2020

I got the following error on Ubuntu 16.04 when running cargo install node-cli --git https://github.com/paritytech/substrate.git --tag v2.0.0-alpha.7 --force

 error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
  --> client/executor/wasmtime/src/instance_wrapper/globals_snapshot.rs:41:16
   |
41 |         let handle = instance_wrapper.instance.handle().clone();
   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
   |
   = note: consult the function's documentation for information on how to avoid undefined behavior

error: aborting due to previous error

For more information about this error, try `rustc --explain E0133`.
error: could not compile `sc-executor-wasmtime`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `node-cli v2.0.0-alpha.7 (https://github.com/paritytech/substrate.git?tag=v2.0.0-alpha.7#83a6f1ad)`, intermediate artifacts can be found at `/tmp/cargo-installw8jYhT`

Caused by:
  build failed

and

  Compiling sp-arithmetic v2.0.0-alpha.6 (/home/ubuntu/.cargo/git/checkouts/substrate-7e08433d4c370a21/67f354f/primitives/arithmetic)
error: this operation will panic at runtime
   --> /home/ubuntu/.cargo/git/checkouts/substrate-7e08433d4c370a21/67f354f/primitives/arithmetic/src/fixed64.rs:155:32
    |
155 |             return Fixed64::from_parts( self.0 / zero);
    |                                         ^^^^^^^^^^^^^ attempt to divide by zero
    |
    = note: `#[deny(unconditional_panic)]` on by default

error: aborting due to previous error

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: failed to compile `node-cli v2.0.0-alpha.6 (https://github.com/paritytech/substrate.git?tag=v2.0.0-alpha.6#67f354f5)`, intermediate artifacts can be found at `/tmp/cargo-installcq1Q8V`

Caused by:
  build failed

by runningcargo install node-cli --git https://github.com/paritytech/substrate.git --tag v2.0.0-alpha.6 --force

The error in v2.0.0-alpha.6 is fixed by #5844 somehow.

env:

rustup 1.21.1 (7832b2ebe 2019-12-20)
rustc 1.43.1 (8d69840ab 2020-05-04)
cargo 1.43.0 (2cbe9048e 2020-05-03)
Linux ubuntu-XPS-13-9360 4.15.0-46-generic #49~16.04.1-Ubuntu SMP Tue Feb 12 17:45:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
@araa47
Copy link

araa47 commented May 11, 2020

I get the same error on my mac, have tried rusts c 1.43.1 and also 1.42.0

active toolchain
----------------

1.42.0-x86_64-apple-darwin (default)
rustc 1.42.0 (b8cedc004 2020-03-09)

@arseneeth
Copy link

Having the same issue, got here from the substrate-contracts-workshop tutorial and the previous build issue: #5837

env:

rustup 1.21.1 (7832b2ebe 2019-12-20)
rustc 1.43.1 (8d69840ab 2020-05-04)
cargo 1.43.0 (2cbe9048e 2020-05-03)
elementary OS 5.1.2 Hera

@bkchr
Copy link
Member

bkchr commented May 13, 2020

Both errors require a new alpha. We already have fixes for the stuff in master. Sorry!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants