Got error "linking with rust-lld failed: exit code: 1" when compiling contracts in examples

@taariq Hi, Taariq. The problem was running discovery compile, which it seems, as a final step copies the compiled wasm file to another location. And when it is named something other than contract.wasm it fails.

The limitation on the name is not with rustc or cargo but with discovery.

I am using rustc and cargo v1.38.0.

That’s right, the renaming I did only works if it was previously compiled of course, removing the target reproduces the error.

Raising an issue in discovery-cli to improve this

Thanks again Brendan.

1 Like