substrate-contracts-node icon indicating copy to clipboard operation
substrate-contracts-node copied to clipboard

warning: [email protected]: Could not find `Cargo.lock` for `/usr/local/cargo/git/checkouts/substrate-contracts-node-....runtime/Cargo.toml`, while searching from `/tmp/cargo-installFbuv1p/release/build/contracts-parachain-runtime-../out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.

Open ltfschoen opened this issue 1 year ago • 2 comments

When I run the following here https://github.com/ltfschoen/XCMTemplate/blob/main/docker/run.sh#L103

cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag ${SUBSTRATE_CONTRACTS_NODE_VERSION} --force --locked

where i'm using versions: RUST_NIGHTLY="2024-02-17" NODE_VERSION=v20.12.0 CARGO_CONTRACT_VERSION=4.1.0 SUBSTRATE_CONTRACTS_NODE_VERSION=v0.40.0

it outputs the following error.

   Compiling rococo-runtime v10.0.0
   Compiling contracts-node-runtime v0.40.0 (/usr/local/cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/17065f3/runtime)
   Compiling contracts-parachain-runtime v0.40.0 (/usr/local/cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/17065f3/parachain-runtime)
warning: [email protected]: Could not find `Cargo.lock` for `/usr/local/cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/17065f3/runtime/Cargo.toml`, while searching from `/tmp/cargo-installFbuv1p/release/build/contracts-node-runtime-5d514765cf8d82a9/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.
   Compiling rocksdb v0.21.0
   Compiling kvdb-rocksdb v0.19.0
   Compiling sc-client-db v0.38.0
warning: [email protected]: Could not find `Cargo.lock` for `/usr/local/cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/17065f3/parachain-runtime/Cargo.toml`, while searching from `/tmp/cargo-installFbuv1p/release/build/contracts-parachain-runtime-4049840299a089fe/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.
   Compiling sc-service v0.38.0

note: it actually outputs each of those warnings three times in a row, i've just removed the duplicates from the logs

that error is the same as the one shown in this old issue https://substrate.stackexchange.com/questions/5182/failed-to-run-custom-build-command-for-contracts-node-runtime-v0-17-0

ltfschoen avatar Apr 17 '24 07:04 ltfschoen

instead of running

export SUBSTRATE_CONTRACTS_NODE_VERSION=v0.40.0
cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag ${SUBSTRATE_CONTRACTS_NODE_VERSION} --force --locked

if i change it to run the following instead it doesn't generate that error

export SUBSTRATE_CONTRACTS_NODE_VERSION=v0.40.0
git clone https://github.com/paritytech/substrate-contracts-node.git
cd substrate-contracts-node
git checkout ${SUBSTRATE_CONTRACTS_NODE_VERSION}
cargo install --path ./node --force --locked

ltfschoen avatar Apr 17 '24 07:04 ltfschoen

Hi @ltfschoen, substrate-contracts-node is published to 'crates.io', so you can just: cargo install contracts-node --version 0.40.0 --locked

smiasojed avatar Apr 17 '24 13:04 smiasojed