2

I had a fully functioning node that was built about 4 day ago and I was using it. Today I've decided to rebuild it with cargo build -r and for some reason if failed to build with absolutely weird error message saying:

   Compiling libp2p-floodsub v0.31.0
   Compiling libp2p-relay v0.4.0
   Compiling libp2p-rendezvous v0.1.0
   Compiling libp2p-noise v0.33.0
   Compiling soketto v0.7.1
   Compiling sc-network v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea)
   Compiling librocksdb-sys v0.6.1+6.28.2
   Compiling multihash v0.14.0
error[E0603]: module `group` is private
   --> /home/creestl/.cargo/git/checkouts/substrate-7e08433d4c370a21/174735e/frame/support/procedural/tools/src/syn_ext.rs:50:53
    |
50  |                 let syn::group::$name { token, content } = syn::group::$parse(input)?;
    |                                                                 ^^^^^ private module
    |
note: the module `group` is defined here
   --> /home/creestl/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.98/src/lib.rs:304:1
    |
304 | mod group;
    | ^^^^^^^^^^

error[E0603]: module `group` is private
   --> /home/creestl/.cargo/git/checkouts/substrate-7e08433d4c370a21/174735e/frame/support/procedural/tools/src/syn_ext.rs:50:14
    |
50  |                 let syn::group::$name { token, content } = syn::group::$parse(input)?;
    |                          ^^^^^ private module
    |
note: the module `group` is defined here
   --> /home/creestl/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.98/src/lib.rs:304:1
    |
304 | mod group;
    | ^^^^^^^^^^

For more information about this error, try `rustc --explain E0603`.
error: could not compile `frame-support-procedural-tools` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed

Once again, I did not modify anything in the code. I did not update cargo or rustup.
I've tried building on the other computer and the result is the same.
I've tried to checkout one of the previous commits that was 100% working and the build failed again Also I'm explicitly specifying branch = "polkadot-v0.9.19" in my .toml files to keep all versions the same.

I literally have no idea why that could happen. For several months everything was fine.

You can try to reproduce the error using my code

What might be the reason for such an error?

1 Answer 1

1

See this issue
That was fixed in this PR

For easy fix just add

syn = { version = "=1.0.82" }

to your runtime's Cargo.toml and rebuild

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.