Closed anjalirai-intel closed 1 month ago
error: package
tokio v1.39.1
cannot be built because it requires rustc 1.70 or newer, while the currently active rustc version is 1.63.0 Either upgrade to rustc 1.70 or newer, or use cargo update -p tokio@1.39.1 --precise ver wherever
is the latest version oftokio
supporting rustc 1.63.0
I think the error message is clear -- updating the rust compiler or downgrading/pinning tokio to a compiler-compatible version should solve the issue. Well, we could also pin the toolchain version at the same time. But what's the expectation here?
@kailun-qin since this is a CI-Example and in the README we don't have any text saying this has been tested only on a particular distro, so the expectation would be that this example should work for all Gramine supported distros, which includes debian12.
So either we fix the example to also work on Debian12 (also would need to check the fix works on all distros) or we update the README to say this example does not work on Debian12.
https://crates.io/crates/tokio
Tokio crate has the policy of requiring MSRV (minimum supported rust version) of at least 6 months. This implies that Tokio will probably use new Rust features of compilers released ~6-9 months ago.
This clashes with OS distros policies... I think generally Rust community prefers to upgrade the Rust toolchain manually, using Rustup and not relying on the default Rust package in OS distro.
Anyway, I think in this particular example, Rust toolchain must be updated to the latest stable version on the machine.
If you want, we can add a quick "Before the build" step of "Upgrade Rust toolchain to latest stable" in the README of the Rust example.
@dimakuv could you share more details on what steps you plan to recommend for Upgrade Rust toolchain to latest stable
? Would it require testing on different distros? For ex: in this case on Debian12 by default it pulls v1.63
and we would be asking the users to upgrade to the latest stable which is v1.70
which would fix the issue for Debian12 but we don't know about other distros.
Specifically I want to understand how upgrading rust on different distros will impact the packages that we defined in Cargo.toml
and whether the versions mentioned there also would need to change.
Specifically I want to understand how upgrading rust on different distros will impact the packages that we defined in
Cargo.toml
and whether the versions mentioned there also would need to change.
No, I only talk about upgrading the Rust toolchain, basically the rustc
compiler. Crates are not affected in any way.
@dimakuv could you share more details on what steps you plan to recommend for
Upgrade Rust toolchain to latest stable
? Would it require testing on different distros? For ex: in this case on Debian12 by default it pullsv1.63
and we would be asking the users to upgrade to the latest stable which isv1.70
which would fix the issue for Debian12 but we don't know about other distros.
Yes, we'll just say in the README that this example requires latest stable release of Rust toolchain (Rust compiler). That's the policy that (at least) the Tokio crate kinda requires, so it should warn users about this. How users obtain the latest stable release of Rust compiler, is not our business, but we can point them to https://rustup.rs/
Got it. Thanks for the explanation. I am fine we changing the README.
Description of the problem
In Debian 12, rustc v1.63 can be installed from apt, but some of the packages have been upgraded and dependencies are compatible with rustc v1.70.0 and causing build failures.
Steps to reproduce
cd CI-Examples/rust make distclean && make
Expected results
make should be successful and rust workload should be able to run with gramine
Actual results
package
tokio v1.39.1
cannot be built because it requires rustc 1.70 or newerGramine commit hash
139f6423584322312fbac5f1c1d66731f8d4949e