Repository navigation
Building from source fails due to unstable Tokio dependency (tokio::task::Builder::new()) #443
Replies: 2 comments
|
Hi, Thanks for reporting! The How are you building? |
|
Thanks for the prompt answer Pierre, I just followed the site's quickstart build from source instructions: Before running the above on a clean Centos 9 Stream Proxmox CT, I first updated the system and installed a few dependencies:
The unstable config is set as you mentioned though: Looking at that file while typing this comment I think I may now know what the problem is: "target-cpu=x86-64-v3" I actually got stuck at the following step first time: So I tried to use the following more generic target cpu instead:
This is probably what breaks the build process. FYI this Proxmox host CPU does not support x86-64-v3 (AVX2). A x86-64-v2 support build would be needed instead. If AVX2 is really required it could be good to include it in the requirements. For example this is the reasons this particular host is running Centos 9 instead of Centos 10 which requires AVX2 processors. Anyhow, while typing this comment I tried instead to edit the Cargo.toml from target-cpu=x86-64-v3 to target-cpu=x86-64-v2. Also exported it before compiling again:
However this attempt did not work either: Thanks! |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
Building and installing from source fails due to an unsatisfied Tokio dependency (tokio::task::Builder::new()):
Compiling zerofs v1.0.8 (/root/ZeroFS/zerofs) error[E0433]: failed to resolve: could not find Builder in task --> src/task.rs:10:18 | 10 | tokio::task::Builder::new() | ^^^^^^^ could not find Builder in task | note: found an item that was configured out --> /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/task/mod.rs:324:26 | 322 | / cfg_trace! { 323 | | mod builder; 324 | | pub use builder::Builder; | | ^^^^^^^ 325 | | } | |_____- the item is gated here help: consider importing one of these structs | 1 + use std::thread::Builder; | 1 + use hyper::client::conn::http1::Builder; | 1 + use hyper::client::conn::http2::Builder; | 1 + use hyper::server::conn::http1::Builder; | = and 9 other candidates help: if you import Builder, refer to it directly | 10 - tokio::task::Builder::new() 10 + Builder::new() | error[E0433]: failed to resolve: could not find Builder in task --> src/task.rs:21:18 | 21 | tokio::task::Builder::new() | ^^^^^^^ could not find Builder in task | note: found an item that was configured out --> /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/task/mod.rs:324:26 | 322 | / cfg_trace! { 323 | | mod builder; 324 | | pub use builder::Builder; | | ^^^^^^^ 325 | | } | |_____- the item is gated here help: consider importing one of these structs | 1 + use std::thread::Builder; | 1 + use hyper::client::conn::http1::Builder; | 1 + use hyper::client::conn::http2::Builder; | 1 + use hyper::server::conn::http1::Builder; | = and 9 other candidates help: if you import Builder, refer to it directly | 21 - tokio::task::Builder::new() 21 + Builder::new() | error[E0433]: failed to resolve: could not find Builder in task --> src/task.rs:32:18 | 32 | tokio::task::Builder::new() | ^^^^^^^ could not find Builder in task | note: found an item that was configured out --> /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/task/mod.rs:324:26 | 322 | / cfg_trace! { 323 | | mod builder; 324 | | pub use builder::Builder; | | ^^^^^^^ 325 | | } | |_____- the item is gated here help: consider importing one of these structs | 1 + use std::thread::Builder; | 1 + use hyper::client::conn::http1::Builder; | 1 + use hyper::client::conn::http2::Builder; | 1 + use hyper::server::conn::http1::Builder; | = and 9 other candidates help: if you import Builder, refer to it directly | 32 - tokio::task::Builder::new() 32 + Builder::new() | For more information about this error, try rustc --explain E0433. error: could not compile zerofs (lib) due to 3 previous errors [root@zerofs zerofs]# rustc --explain E0433 An undeclared crate, module, or type was used. Erroneous code example: let map = HashMap::new(); // error: failed to resolve: use of undeclared type HashMap Please verify you didn't misspell the type/module's name or that you didn't forget to import it: use std::collections::HashMap; // HashMap has been imported. let map: HashMap<u32, u32> = HashMap::new(); // So it can be used! If you've expected to use a crate name: use ferris_wheel::BigO; // error: failed to resolve: use of undeclared module or unlinked crate Make sure the crate has been added as a dependency in Cargo.toml. To use a module from your current crate, add the crate:: prefix to the path.Thanks!
All reactions