Skip to content

Facing this error while installing the substrate-contracts-node #151

@aabdullah29

Description

@aabdullah29

Question
I am installing the substrate-contracts-node package using this command

cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --force --locked

and I get the following error.

   Compiling substrate-wasm-builder v5.0.0-dev (https://github.com/paritytech/substrate#021f7126)
   Compiling sp-runtime-interface v6.0.0 (https://github.com/paritytech/substrate#021f7126)
   Compiling sp-core v6.0.0 (https://github.com/paritytech/substrate#021f7126)
   Compiling contracts-node-runtime v0.20.0 (/home/abdullah/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/8d76d04/runtime)
   Compiling sp-trie v6.0.0 (https://github.com/paritytech/substrate#021f7126)
   Compiling sp-state-machine v0.12.0 (https://github.com/paritytech/substrate#021f7126)
error: `sp_trie::recorder::Recorder<H>::as_trie_recorder::{opaque#0}<'_>` does not live long enough
   --> /home/abdullah/.cargo/git/checkouts/substrate-7e08433d4c370a21/021f712/primitives/state-machine/src/trie_backend_essence.rs:181:44
    |
181 |         let recorder = recorder.as_mut().map(|r| r as _);
    |                                                  ^

error: `sp_trie::recorder::Recorder<H>::as_trie_recorder::{opaque#0}<'_>` does not live long enough
   --> /home/abdullah/.cargo/git/checkouts/substrate-7e08433d4c370a21/021f712/primitives/state-machine/src/trie_backend_essence.rs:219:44
    |
219 |         let recorder = recorder.as_mut().map(|r| r as _);
    |                                                  ^

   Compiling sp-keystore v0.12.0 (https://github.com/paritytech/substrate#021f7126)
error: could not compile `sp-state-machine` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
The following warnings were emitted during compilation:

warning: Could not find `Cargo.lock` for `/home/abdullah/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/8d76d04/runtime/Cargo.toml`, while searching from `/tmp/cargo-installVBvBya/release/build/contracts-node-runtime-1f8f251f7295364d/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.
warning: Could not find `Cargo.lock` for `/home/abdullah/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/8d76d04/runtime/Cargo.toml`, while searching from `/tmp/cargo-installVBvBya/release/build/contracts-node-runtime-1f8f251f7295364d/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.

error: failed to run custom build command for `contracts-node-runtime v0.20.0 (/home/abdullah/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/8d76d04/runtime)`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installVBvBya/release/build/contracts-node-runtime-734fc1545578109a/build-script-build` (exit status: 1)
  --- stdout
  cargo:warning=Could not find `Cargo.lock` for `/home/abdullah/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/8d76d04/runtime/Cargo.toml`, while searching from `/tmp/cargo-installVBvBya/release/build/contracts-node-runtime-1f8f251f7295364d/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.
  cargo:warning=Could not find `Cargo.lock` for `/home/abdullah/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/8d76d04/runtime/Cargo.toml`, while searching from `/tmp/cargo-installVBvBya/release/build/contracts-node-runtime-1f8f251f7295364d/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.
  Information that should be included in a bug report.
  Executing build command: "/home/abdullah/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo" "rustc" "--target=wasm32-unknown-unknown" "--manifest-path=/tmp/cargo-installVBvBya/release/wbuild/contracts-node-runtime/Cargo.toml" "--color=always" "--profile" "release"
  Using rustc version: rustc 1.66.0-nightly (f83e0266c 2022-10-03)


  --- stderr
      Updating crates.io index
      Updating git repository `https://github.com/paritytech/substrate`
  error: no matching package named `pallet-contracts-rpc-runtime-api` found
  location searched: https://github.com/paritytech/substrate
  required by package `contracts-node-runtime v0.20.0 (/home/abdullah/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/8d76d04/runtime)`
      ... which satisfies path dependency `wasm-project` of package `contracts-node-runtime-wasm v1.0.0 (/tmp/cargo-installVBvBya/release/wbuild/contracts-node-runtime)`
    Building [=====================>   ] 868/951: librocksdb-sys(build)                                                                                                       
error: failed to compile `contracts-node v0.20.0 (https://github.com/paritytech/substrate-contracts-node.git#8d76d04f)`, intermediate artifacts can be found at `/tmp/cargo-installVBvBya`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions