Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Build fails on hex-literal 0.1.4 #3134

Closed
JoshOrndorff opened this issue Jul 16, 2019 · 5 comments · Fixed by #3141
Closed

Build fails on hex-literal 0.1.4 #3134

JoshOrndorff opened this issue Jul 16, 2019 · 5 comments · Fixed by #3141

Comments

@JoshOrndorff
Copy link
Contributor

This was brought to my attention first as an issue with v1.0 branch of substrate. Now I've realized the problem also happens on master.

In v1.0 I fixed it by changing dependencies on hex-literal from 0.1 to 0.1.3. On master the dependency seems to already be at 2.0 in most places.

Steps to reproduce

  • Clone substrate repository
  • Ensure up-to-date rust with ./scripts/init.sh
  • cargo build
   Compiling hex-literal v0.1.4
error: proc-macro derive panicked
  --> /home/joshy/.cargo/registry/src/github.com-1ecc6299db9ec823/hex-literal-0.1.4/src/lib.rs:38:1
   |
38 | / proc_macro_expr_decl! {
39 | |     /// Macro for converting hex string to byte array at compile time
40 | |     hex! => hex_impl
41 | | }
   | |_^
   |
   = help: message: assertion failed: `(left == right)`
             left: `Some("#[allow(unused,")`,
            right: `Some("#[allow(unused")`
   = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: aborting due to previous error

error: Could not compile `hex-literal`.
warning: build failed, waiting for other jobs to finish...
error: build failed
@bkchr
Copy link
Member

bkchr commented Jul 16, 2019

This is an error of the hex-literal crate and should be reported there. First I would bet that maybe you use a nightly that broke the build somehow.
Nevertheless, please report the error at the appropriate project, I will close this.

@bkchr bkchr closed this as completed Jul 16, 2019
@JoshOrndorff
Copy link
Contributor Author

Thanks @bkchr for helping me figure out that this was caused by a problem with the rust compiler nightly-2019-07-15. I reverted with rustup default nightly-2019-07-14 and everything built fine.

@soc1c
Copy link
Contributor

soc1c commented Jul 17, 2019

bumping hex-literal fixes this.

@Bitcoinera
Copy link

I don't know if the dependency is already fixed, but doing:

rustup default nightly-2019-07-14
rustup target add wasm32-unknown-unknown --toolchain nightly-2019-07-14

fixed it for me. Hope this is helpful.

@bneiluj
Copy link

bneiluj commented Aug 2, 2019

Remove the wasm runtime cargo-lock: paritytech/polkadot#335 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
5 participants