Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error for cln-grpc on rustc 1.80.0+ #7642

Open
sr-gi opened this issue Sep 5, 2024 · 0 comments
Open

Compilation error for cln-grpc on rustc 1.80.0+ #7642

sr-gi opened this issue Sep 5, 2024 · 0 comments
Assignees
Labels
rust Issue related to rust
Milestone

Comments

@sr-gi
Copy link
Contributor

sr-gi commented Sep 5, 2024

Trying to compile cln-grpc (which happens as part of the node installation) on a rust compiler >= 1.80.0 fails due to the time crate:

error[E0282]: type annotations needed for `Box<_>`
  --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.29/src/format_description/parse/mod.rs:83:9
   |
83 |     let items = format_items
   |         ^^^^^
...
86 |     Ok(items.into())
   |              ---- type must be known at this point
   |
help: consider giving `items` an explicit type, where the placeholders `_` are specified
   |
83 |     let items: Box<_> = format_items
   |

This is related to time-rs/time#693 and can be solved by updating time to 0.3.36, which can be done via cargo update -p time. However, that is just a workaround, it'd be best if the dependency is updated itself in the corresponding Cargo.toml.

CLN does not directly import time thought, it is a dependency tree of the following crates used by cln-grpc:

  • rcgen 0.10.0 (time 0.3.6)
  • x509-parser 0.14.0 (time 0.3.7)
  • asn1-rs 0.5.2 (time 0.3)
  • yasna 0.5.2 (time 0.3.1)

I've been doing some digging but none of them require the specific version that CLN is installing (0.3.29), so I'm not sure which needs to be updated. The least restrictive one seems to be asn1-rs, which only has a restriction on the minor revision, not the patch, but that does not explain why 0.3.29 is picked.

@vincenzopalazzo vincenzopalazzo added the rust Issue related to rust label Sep 15, 2024
@vincenzopalazzo vincenzopalazzo self-assigned this Sep 15, 2024
@vincenzopalazzo vincenzopalazzo added this to the v24.11 milestone Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Issue related to rust
Projects
None yet
Development

No branches or pull requests

2 participants