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

Unable to build parsec 0.7.2 with rust 1.43.1. Parsec 0.6.0 builds fine. #409

Closed
ggardet opened this issue Apr 30, 2021 · 3 comments · Fixed by #410
Closed

Unable to build parsec 0.7.2 with rust 1.43.1. Parsec 0.6.0 builds fine. #409

ggardet opened this issue Apr 30, 2021 · 3 comments · Fixed by #410

Comments

@ggardet
Copy link

ggardet commented Apr 30, 2021

Unable to build parsec 0.7.2 with rust 1.43.1. Parsec 0.6.0 builds fine.

The error is:

[  678s]    Compiling cryptoki v0.1.0
[  692s] error[E0277]: the trait bound `std::vec::Vec<u8>: std::convert::From<[u8; 4]>` is not satisfied
[  692s]   --> src/providers/pkcs11/key_management.rs:30:47
[  692s]    |
[  692s] 30 |         let mut template = vec![Attribute::Id(key_id.to_be_bytes().into())];
[  692s]    |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<[u8; 4]>` is not implemented for `std::vec::Vec<u8>`
[  692s]    |
[  692s]    = help: the following implementations were found:
[  692s]              <std::vec::Vec<T> as std::convert::From<&[T]>>
[  692s]              <std::vec::Vec<T> as std::convert::From<&mut [T]>>
[  692s]              <std::vec::Vec<T> as std::convert::From<std::borrow::Cow<'a, [T]>>>
[  692s]              <std::vec::Vec<T> as std::convert::From<std::boxed::Box<[T]>>>
[  692s]            and 5 others
[  692s]    = note: required because of the requirements on the impl of `std::convert::Into<std::vec::Vec<u8>>` for `[u8; 4]`
[  692s] 
[  692s] error[E0277]: the trait bound `std::vec::Vec<u8>: std::convert::From<[u8; 4]>` is not satisfied
[  692s]    --> src/providers/pkcs11/key_management.rs:106:27
[  692s]     |
[  692s] 106 |             Attribute::Id(key_id.to_be_bytes().into()),
[  692s]     |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<[u8; 4]>` is not implemented for `std::vec::Vec<u8>`
[  692s]     |
[  692s]     = help: the following implementations were found:
[  692s]               <std::vec::Vec<T> as std::convert::From<&[T]>>
[  692s]               <std::vec::Vec<T> as std::convert::From<&mut [T]>>
[  692s]               <std::vec::Vec<T> as std::convert::From<std::borrow::Cow<'a, [T]>>>
[  692s]               <std::vec::Vec<T> as std::convert::From<std::boxed::Box<[T]>>>
[  692s]             and 5 others
[  692s]     = note: required because of the requirements on the impl of `std::convert::Into<std::vec::Vec<u8>>` for `[u8; 4]`
[  692s] 
[  692s] error[E0277]: the trait bound `std::vec::Vec<u8>: std::convert::From<[u8; 3]>` is not satisfied
[  692s]    --> src/providers/pkcs11/key_management.rs:125:61
[  692s]     |
[  692s] 125 |                 pub_template.push(Attribute::PublicExponent(utils::PUBLIC_EXPONENT.into()));
[  692s]     |                                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<[u8; 3]>` is not implemented for `std::vec::Vec<u8>`
[  692s]     |
[  692s]     = help: the following implementations were found:
[  692s]               <std::vec::Vec<T> as std::convert::From<&[T]>>
[  692s]               <std::vec::Vec<T> as std::convert::From<&mut [T]>>
[  692s]               <std::vec::Vec<T> as std::convert::From<std::borrow::Cow<'a, [T]>>>
[  692s]               <std::vec::Vec<T> as std::convert::From<std::boxed::Box<[T]>>>
[  692s]             and 5 others
[  692s]     = note: required because of the requirements on the impl of `std::convert::Into<std::vec::Vec<u8>>` for `[u8; 3]`
[  692s] 
[  692s] error[E0277]: the trait bound `std::vec::Vec<u8>: std::convert::From<[u8; 4]>` is not satisfied
[  692s]    --> src/providers/pkcs11/key_management.rs:228:37
[  692s]     |
[  692s] 228 |         template.push(Attribute::Id(key_id.to_be_bytes().into()));
[  692s]     |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<[u8; 4]>` is not implemented for `std::vec::Vec<u8>`
[  692s]     |
[  692s]     = help: the following implementations were found:
[  692s]               <std::vec::Vec<T> as std::convert::From<&[T]>>
[  692s]               <std::vec::Vec<T> as std::convert::From<&mut [T]>>
[  692s]               <std::vec::Vec<T> as std::convert::From<std::borrow::Cow<'a, [T]>>>
[  692s]               <std::vec::Vec<T> as std::convert::From<std::boxed::Box<[T]>>>
[  692s]             and 5 others
[  692s]     = note: required because of the requirements on the impl of `std::convert::Into<std::vec::Vec<u8>>` for `[u8; 4]`
[  692s] 
[  693s] error: aborting due to 4 previous errors
@hug-dev
Copy link
Member

hug-dev commented Apr 30, 2021

I tried to look which version of Rust added that but could not find it. Looks like we can use the to_vec call here instead.

We are currently looking at improving the stability of Parsec and will look at rustc version support in #408

We need to choose which versions of the Rust compiler we need to support, is 1.43.1 the latest version of Rust available in openSUSE packages?

@ggardet
Copy link
Author

ggardet commented Apr 30, 2021

We need to choose which versions of the Rust compiler we need to support, is 1.43.1 the latest version of Rust available in openSUSE packages?

openSUSE Tumbleweed (the rolling release) is at 1.51.0, but upcoming stable openSUSE Leap 15.3 and also upcoming enterprise SUSE SLE15-SP3 have 1.43.1.

@ggardet
Copy link
Author

ggardet commented Apr 30, 2021

I confirm that #410 make it build. Thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants