Questions tagged [cargo]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

When i built my custom pallet i got this error

#! [cfg_attr(not(feature = "std"), no_std)] // Re-export pallet items so that they can be accessed from the crate namespace. pub use pallet::*; #[frame_support::pallet] pub mod pallet { use ...
Preethi M's user avatar
1 vote
1 answer
27 views

Issue with cargo test and ink! Flipper contract

cargo contract build works just fine and produces the correct outputs in the /target folder. Running cargo test however throws the following error: error: failed to run custom build command for `wasm-...
WhisperingZebra's user avatar
0 votes
1 answer
24 views

How do I cargo expand a non-compiling runtime?

cargo expand is a very useful tool to see the expanded macros that a runtime generates, but if the runtime doesn't compile then it does not output anything. Any tips?
Squirrel's user avatar
  • 3,809
3 votes
1 answer
68 views

How to "graceful terminate" a smart contract from the "rococo-contracts-rpc.polkadot.io" chain?

In theory we could use this command: cargo contract remove --execute --code-hash '******' --url 'wss://rococo-contracts-rpc.polkadot.io' --suri 'seeds' But in order to do that we have first to ...
Evil Kyle's user avatar
  • 149
3 votes
2 answers
194 views

Specialization impl does not specialize any associated items

I'm fairly new to Rust and ink! itself. I'm trying to compile and build an extremely basic PSP22 Contract. I get the following error when I compile & build: (running cargo +nightly contract build) ...
0xD1x0n's user avatar
  • 119
3 votes
1 answer
62 views

duplicate lang item in crate `ink_env` - astar-frame/astar

Trying to build Astar shibuya-runtime crate is failing after adding the ink_env dependency an astar-frame chain-extension. Here are the changes to both Astar and astar-frame. Run: cargo build --...
Snowmead's user avatar
  • 625
5 votes
1 answer
255 views

error[E0046]: not all trait items implemented, missing: `try_successful_origin`

I am seeing this compile error with the xcm-builder when building our chain w/Polkadot 0.9.38. What should I change to fix it? This issue is also discussed here https://github.com/paritytech/subport/...
Robert La Ferla's user avatar
10 votes
4 answers
2k views

ERROR: Loading of original wasm failed

I having some trouble running the Flipper example from the Ink! webpage. The cargo contract build outputs the following error log: ERROR: Loading of original wasm failed Caused by: 0: Loading of ...
statisticalanomaly's user avatar
0 votes
1 answer
36 views

Build fails when trying to create workspace from selected pallets and primitives

I want to put some pallets and primitive code in a workspace. Here is my code https://github.com/zeitgeistpm/external However this does not build, neither workspace builds nor individual components. ...
llvm_ninja's user avatar
0 votes
1 answer
195 views

ERROR: Error invoking `cargo metadata` when trying to compile INK! 4.0 smart contract

When I compile a specific INK! 4.0 smart contract i get the following error: ERROR: Error invoking `cargo metadata I have multiple INK! 4.0 smart contracts that are compiling successfully without the ...
yonatan hornstein's user avatar
0 votes
1 answer
72 views

Contract not compiling. "Failed to resolve: use of undeclared type `SecretKey`

Here are the steps i have done: cargo contract new flipper in contract code i added these lines of code: use blst::min_pk::SecretKey; after #![cfg_attr(not(feature = "std"), no_std)] &...
Nikola Bozin's user avatar
1 vote
6 answers
2k views

Unable to compile substrate template `error: failed to run custom build command for `librocksdb-sys v0.8.0+7.4.4`

First, I have looked at several previous posts regarding similar build errors but have yet to get the substrate template to build locally successfully. The exact error I encounter is: error: failed to ...
Brandon's user avatar
  • 13
0 votes
2 answers
2k views

error: linking with `cc` failed: exit status: 1 (Mac m1)

Not able to build a project because of this issue: error: linking with `cc` failed: exit status: 1 | = note: "cc" "-arch" "arm64" "/var/folders/5w/...
P.E's user avatar
  • 171
0 votes
0 answers
45 views

Error building the parachain template - 2 [duplicate]

I was compiling the runtime by cloning this source, https://github.com/szout/substrate-parachain-template, but at the moment I met this issue. I tried to solve this issue by referencing these QAs, ...
TinyDev's user avatar
  • 57
0 votes
1 answer
122 views

"cargo +nightly contract build" ERROR: no path specified, and the default `src/main.rs` was not found

I am trying to use the cargo +nightly-2022-08-15 contract build command on a cargo contract new ___, but am experiencing the error below. Finished dev [unoptimized + debuginfo] target(s) in 0.15s [2/...
kenta_desu's user avatar
0 votes
1 answer
17 views

How do I pin my tracing-core version to 0.1.26?

In the substrate-node-template, I can't see the local node identity whenever I start the node with ./target/release/node-template --dev: e.g. Apparently to fix this I need to pin my tracing-core ...
Darian Foulds's user avatar
1 vote
1 answer
1k views

failed to select a version for the requirement wasmtime

I have the same problem of this post but cargo clean and cargo check doesn’t fix it. This is my terminal output: Updating crates.io index error: failed to select a version for the requirement wasmtime ...
viac92's user avatar
  • 107
3 votes
3 answers
823 views

Error: 'tikv-jemalloc-sys' fails to build after upgrading substrate-based chain on WSL2

After upgrading our chain and its relevant dependencies to polkadot-v0.9.22 I am getting the following build error for 'tikv-jemalloc-sys v0.4.3+5.2.1-patched.2' I have also tried to add parity-util-...
chexware's user avatar
  • 325
6 votes
1 answer
1k views

Error: failed to run custom build command for `tikv-jemalloc-sys v0.4.3+5.2.1-patched.2`

I was trying to build the substrate-node-template (https://docs.substrate.io/tutorials/v3/create-your-first-substrate-chain/) for the first time. I am using WSL2 with Ubuntu 22.04 LTS. I came to the ...
gmluqa's user avatar
  • 91
3 votes
3 answers
338 views

cargo contract throws error about supplied arguments in ` #[ink(constructor)]` for version 3.0.1

In my smart contract, all the ink dependencies are set to =3.0.1 because of this issue: Cargo contract 3.0.1 When I tried to execute the cargo contract build or even cargo +nightly contract build to ...
Jitterbug's user avatar
  • 219
4 votes
2 answers
661 views

"error: failed to select a version for `parity-util-mem`"

Currently dealing with an issue building my chain where parity-util-mem is conflicting with parity-util-mem-ban duplicates and I don't know the exact way to specify a certain version for all ...
Monty Jack's user avatar
4 votes
5 answers
309 views

Cargo contract 3.0.1

Ink! 3.1.0 has been released today, and it seems that it has been automatically embed/used in the cargo-contract command. The result is that newly compiled contract are no more compatible with node ...
LaurentTrk's user avatar
1 vote
1 answer
303 views

Enabling the std feature on environmental crate

I'm trying to use the environmental crate (link: https://docs.rs/environmental/1.1.3/src/environmental/lib.rs.html#64) to work with EVM and ethereum transactions. But it seems like adding either ...
flipchan's user avatar
  • 369
3 votes
1 answer
60 views

Which toolchain should I use to build Substrate

My current toolchains and targets look like this installed toolchains -------------------- stable-x86_64-unknown-linux-gnu (default) nightly-2022-01-01-x86_64-unknown-linux-gnu nightly-x86_64-unknown-...
CREESTL's user avatar
  • 474
1 vote
1 answer
52 views

How to resolve conflicted dependency versions when import frame_support

I'm trying to pull on-chain asset data from Basilisk via subxt. The name field of this asset_details struct is a BoundedVec and I need to be able to run the into_inner() method to get the vec from ...
jakerumbles's user avatar
1 vote
0 answers
37 views

Unresolved import `sp_core::to_substrate_wasm_fn_return_value` [duplicate]

When building the runtime useing cargo build --release I'm running into this error: error[E0432]: unresolved import `sp_core::to_substrate_wasm_fn_return_value` --> /home/christian/.cargo/git/...
Christian Pavilonis's user avatar
6 votes
1 answer
202 views

Building a substrate node template with a global cargo `target` directory

I'm trying to build a substrate-node-template with the following command: cargo build I have my cargo target-dir set inside a global ~/.cargo/config.toml file: [build] target-dir = "/home/foo/....
Rtsne42's user avatar
  • 379
3 votes
1 answer
333 views

What is the difference between dependencies and dev-dependencies in Cargo.toml

My question is What is the difference between dependencies and dev-dependencies in Cargo.toml. And for developing pallet, now I have to declare crate in dependencies
Rong Nguyen's user avatar
3 votes
1 answer
348 views

Failed to get frame-benchmarking as a dependency of package

After pulling from the tutorials/solutions/add-a-pallet, The build process with cargo gives an error. cargo build --release See error Expected vs. Actual Behavior The build process is not complete. ...
Mehran Mazhar's user avatar
4 votes
3 answers
93 views

Build the Substrate Kitties Chain Tutorial Cargo Error

I was following the tutorial: https://docs.substrate.io/tutorials/v3/kitties/pt1/ and as said in the tutorial I installed kickstart using: cargo install kickstart And after that cloned a copy of the ...
Ajit's user avatar
  • 827