I have a single pallet called ehr
, its dependencies are
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [
"derive",
] }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
frame-support = { default-features = false, version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26"}
frame-system = { default-features = false, version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
frame-benchmarking = { default-features = false, version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26", optional = true }
pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
sp-runtime = { default-features = false, version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
sp-core = { default-features = false, version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
sp-io = { default-features = false, version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
sp-std = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
sp-keystore = { version = "0.12.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
parking_lot = '0.12'
hex = "0.4.3"
jsonwebtoken = "8.1.1"
serde = "1.0.141"
querystring = "0.1.0"
libaes = "0.6.2"
[dev-dependencies]
[features]
default = ["std"]
std = [
"codec/std",
"scale-info/std",
"frame-support/std",
"frame-system/std",
"pallet-sudo/std",
"sp-runtime/std",
"sp-core/std",
"sp-keystore/std",
"frame-benchmarking/std",
"sp-std/std",
"sp-io/std",
]
runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"]
try-runtime = ["frame-support/try-runtime"]
When i ran cargo check -p pallet-ehr
it compiles succesfully, but when compiling my node runtime using cargo check -p node-runtime
. it outputs
error[E0433]: failed to resolve: could not find `format` in `alloc`
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1721:31
|
1721 | let message = sp_std::alloc::format!("{}", info);
| ^^^^^^ could not find `format` in `alloc`
error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:125:1
|
125 | #[runtime_interface]
| ^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`
|
= note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:328:1
|
328 | #[runtime_interface]
| ^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`
|
= note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:506:1
|
506 | #[runtime_interface]
| ^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`
|
= note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:641:1
|
641 | #[runtime_interface]
| ^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`
|
= note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:702:1
|
702 | #[runtime_interface]
| ^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`
|
= note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1079:1
|
1079 | #[runtime_interface]
| ^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`
|
= note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1123:1
|
1123 | #[runtime_interface]
| ^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`
|
= note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1137:1
|
1137 | #[runtime_interface]
| ^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`
|
= note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1159:1
|
1159 | #[runtime_interface]
| ^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`
|
= note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1378:1
|
1378 | #[runtime_interface(wasm_only)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`
|
= note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1393:1
|
1393 | #[runtime_interface(wasm_only)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`
|
= note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1403:1
|
1403 | #[runtime_interface]
| ^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`
|
= note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1451:1
|
1451 | #[runtime_interface(wasm_only, no_tracing)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`
|
= note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1568:1
|
1568 | #[runtime_interface(wasm_only)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`
|
= note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: could not find `wasm` in `proc_macro_runtime_interface`
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1663:1
|
1663 | #[runtime_interface(wasm_only)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `wasm` in `proc_macro_runtime_interface`
|
= note: this error originates in the attribute macro `runtime_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0152]: found duplicate lang item `panic_impl`
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1720:1
|
1720 | pub fn panic(info: &core::panic::PanicInfo) -> ! {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the lang item is first defined in crate `std` (which `sp_runtime_interface` depends on)
= note: first definition in `std` loaded from /home/joshua/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libstd-a237209e92b55a70.rlib
= note: second definition in the local crate (`sp_io`)
error[E0152]: found duplicate lang item `oom`
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1736:1
|
1736 | pub fn oom(_: core::alloc::Layout) -> ! {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the lang item is first defined in crate `std` (which `sp_runtime_interface` depends on)
= note: first definition in `std` loaded from /home/joshua/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libstd-a237209e92b55a70.rlib
= note: second definition in the local crate (`sp_io`)
error[E0308]: mismatched types
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1707:4
|
1706 | unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
| ------- expected `*mut u8` because of return type
1707 | allocator::malloc(layout.size() as u32)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected *-ptr, found struct `sp_wasm_interface::Pointer`
|
= note: expected raw pointer `*mut u8`
found struct `sp_wasm_interface::Pointer<u8>`
error[E0308]: mismatched types
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1711:20
|
1711 | allocator::free(ptr)
| --------------- ^^^ expected struct `sp_wasm_interface::Pointer`, found *-ptr
| |
| arguments to this function are incorrect
|
= note: expected struct `sp_wasm_interface::Pointer<u8>`
found raw pointer `*mut u8`
note: function defined here
--> /home/joshua/.cargo/git/checkouts/substrate-7e08433d4c370a21/e8a7d16/primitives/io/src/lib.rs:1386:5
|
1386 | fn free(&mut self, ptr: Pointer<u8>) {
| ^^^^ ----------------
Some errors have detailed explanations: E0152, E0308, E0433.
For more information about an error, try `rustc --explain E0152`.
error: could not compile `sp-io` due to 20 previous errors
My runtime dependencies are :
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
getrandom = { version = "0.2.7", features = ["js"] }
pallet-aura = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
pallet-grandpa = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
pallet-randomness-collective-flip = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
frame-try-runtime = { version = "0.10.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26", optional = true }
pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
frame-executive = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
sp-block-builder = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26"}
sp-consensus-aura = { version = "0.10.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
sp-core = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26"}
sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
sp-runtime = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
sp-io = { default-features = false, version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
sp-std = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
sp-version = { version = "5.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
# Used for the node template's RPCs
frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
# Used for runtime benchmarking
frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26", optional = true }
frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26", optional = true }
hex-literal = { version = "0.3.4", optional = true }
# Local Dependencies
pallet-ehr = { version = "4.0.0-dev", default-features = false, path = "../pallets/ehr" }
[build-dependencies]
substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.26" }
[features]
default = ["std"]
std = [
"codec/std",
"scale-info/std",
"frame-executive/std",
"frame-support/std",
"frame-system-rpc-runtime-api/std",
"frame-system/std",
"pallet-aura/std",
"pallet-balances/std",
"pallet-grandpa/std",
"pallet-randomness-collective-flip/std",
"pallet-sudo/std",
"pallet-ehr/std",
"pallet-timestamp/std",
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-transaction-payment/std",
"sp-api/std",
"sp-block-builder/std",
"sp-consensus-aura/std",
"sp-core/std",
"sp-inherents/std",
"sp-offchain/std",
"sp-runtime/std",
"sp-session/std",
"sp-std/std",
"sp-transaction-pool/std",
"sp-version/std",
"sp-io/std",
]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system-benchmarking",
"frame-system/runtime-benchmarks",
"hex-literal",
"pallet-balances/runtime-benchmarks",
"pallet-grandpa/runtime-benchmarks",
"pallet-ehr/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = [
"frame-executive/try-runtime",
"frame-try-runtime",
"frame-system/try-runtime",
"pallet-aura/try-runtime",
"pallet-balances/try-runtime",
"pallet-grandpa/try-runtime",
"pallet-randomness-collective-flip/try-runtime",
"pallet-sudo/try-runtime",
"pallet-ehr/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-transaction-payment/try-runtime",
]
```.