Error message:
error: failed to select a version for 'log'. ... required by package 'frame-benchmarking v4.0.0-dev (https://github.com/paritytech/substrate#580ebae1)' ... which satisfies git dependency 'frame-benchmarking' of package 'pallet-contracts v4.0.0-dev (https://github.com/paritytech/substrate#580ebae1)' ... which satisfies git dependency 'pallet-contracts' of package 'node-template-runtime v4.0.0-dev (/home/sergej/substrate-test/runtime)' ... which satisfies path dependency 'node-template-runtime' (locked to 4.0.0-dev) of package 'node-template v4.0.0-dev (/home/sergej/substrate-test/node)' versions that meet the requirements '^0.4.16' are: 0.4.16all possible versions conflict with previously selected packages.
previously selected package 'log v0.4.14' ... which satisfies dependency 'log = "^0.4"' (locked to 0.4.14) of package 'finality-grandpa v0.15.0' ... which satisfies dependency 'finality-grandpa = "^0.15.0"' (locked to 0.15.0) of package 'sc-finality-grandpa v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073)' ... which satisfies git dependency 'sc-finality-grandpa' (locked to 0.10.0-dev) of package 'node-template v4.0.0-dev (/home/sergej/substrate-test/node)'
failed to select a version for 'log' which could resolve this conflict
This happened after I added this to the Cargo.toml in the runtime directory:
pallet-contracts = { git = "https://github.com/paritytech/substrate", package = "pallet-contracts", default-features = false } pallet-contracts-primitives = { git = "https://github.com/paritytech/substrate", package = "pallet-contracts-primitives", default-features = false } pallet-contracts-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", package = "pallet-contracts-rpc-runtime-api", default-features = false }
cargo update -p sp-io
should upgrade the locked substrate version to the latest master. Hope this helps.