incubator-teaclave-sgx-sdk icon indicating copy to clipboard operation
incubator-teaclave-sgx-sdk copied to clipboard

Request update for rust nightly version

Open KunPengRen opened this issue 3 years ago • 20 comments

The current version is Rust nightly-2020-10-25 is very old, I faced some problems compiling other libraries with rust sgx SDK project. Can you please support the more recent rust version?

KunPengRen avatar May 22 '22 10:05 KunPengRen

We're facing the same issue when upgrading to nightly-2022-02-02:

error[E0432]: unresolved import `core::prelude::v1::llvm_asm`
  --> /home/.cargo/git/checkouts/incubator-teaclave-sgx-sdk-f208006cdf70a903/08264d6/sgx_tstd/src/prelude/v1.rs:49:64
   |
49 |     format_args_nl, include, include_bytes, include_str, line, llvm_asm, log_syntax, module_path,
   |                                                                ^^^^^^^^ no `llvm_asm` in `prelude::v1`

error[E0432]: unresolved import `core::time::FromSecsError`
  --> /home/.cargo/git/checkouts/incubator-teaclave-sgx-sdk-f208006cdf70a903/08264d6/sgx_tstd/src/time.rs:61:9
   |
61 | pub use core::time::FromSecsError;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^ no `FromSecsError` in `time`

error[E0432]: unresolved import `core::llvm_asm`
   --> /home/.cargo/git/checkouts/incubator-teaclave-sgx-sdk-f208006cdf70a903/08264d6/sgx_tstd/src/lib.rs:298:88
    |
298 |     env, file, format_args, format_args_nl, include, include_bytes, include_str, line, llvm_asm,
    |                                                                                        ^^^^^^^^ no `llvm_asm` in the root

error[E0412]: cannot find type `FromSecsError` in module `core::time`
   --> /home/.cargo/git/checkouts/incubator-teaclave-sgx-sdk-f208006cdf70a903/08264d6/sgx_tstd/src/error.rs:573:28
    |
573 | impl Error for core::time::FromSecsError {}
    |                            ^^^^^^^^^^^^^ not found in `core::time`

error[E0061]: this function takes 3 arguments but 2 arguments were supplied
   --> /home/.cargo/git/checkouts/incubator-teaclave-sgx-sdk-f208006cdf70a903/08264d6/sgx_tstd/src/panicking.rs:546:29
    |
546 |             let panicinfo = PanicInfo::internal_constructor(message, location);
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -------  -------- supplied 2 arguments
    |                             |
    |                             expected 3 arguments
    |
note: associated function defined here
   --> /home/.rustup/toolchains/nightly-2022-02-02-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/panic_info.rs:45:12
    |
45  |     pub fn internal_constructor(
    |            ^^^^^^^^^^^^^^^^^^^^

error[E0061]: this function takes 3 arguments but 2 arguments were supplied
   --> /home/.cargo/git/checkouts/incubator-teaclave-sgx-sdk-f208006cdf70a903/08264d6/sgx_tstd/src/panicking.rs:552:20
    |
552 |     let mut info = PanicInfo::internal_constructor(message, location);
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -------  -------- supplied 2 arguments
    |                    |
    |                    expected 3 arguments
    |
note: associated function defined here
   --> /home/.rustup/toolchains/nightly-2022-02-02-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/panic_info.rs:45:12
    |
45  |     pub fn internal_constructor(
    |            ^^^^^^^^^^^^^^^^^^^^

haerdib avatar May 23 '22 07:05 haerdib

I will upgrade the rust version for the SDK as soon as possible.I plan to upgrade to rust-nightly-2022-02-23.

volcano0dr avatar May 24 '22 01:05 volcano0dr

This toolchain is still quite old, is there a blocker for never releases?

clangenb avatar Jun 23 '22 11:06 clangenb

Also found it necessary to upgrade to a newer version of toolchain because we are using cargo extensions which were built with a newer nightly Rust toolchain but the current SDK library is incompatible with newer toolchain (e.g., nightly-2022-08-25) :(

hiroki-chen avatar Sep 12 '22 11:09 hiroki-chen

@hiroki-chen Thank you for using teaclave-sgx-sdk. I plan to upgrade the Rust toolchain this month.

volcano0dr avatar Sep 13 '22 08:09 volcano0dr

@hiroki-chen Thank you for using teaclave-sgx-sdk. I plan to upgrade the Rust toolchain this month.

Glad to hear this! Thank you for your efforts.

hiroki-chen avatar Sep 13 '22 13:09 hiroki-chen

Is there any update on the rust-toolchain upgrade? We're also blocked because of a recently stabilized feature bool::then_some in rust 1.62 in June.

haerdib avatar Oct 12 '22 12:10 haerdib

@haerdib Hi there, I have forked teaclave-rust-sgx-sdk v2.0.0 and tried to update it to nightly-2022-08-30. Some updates may be hacky so I am not sure whether this works for you, but this suits my project well. The link is here. Perhaps you could use this version as an alternative SDK in your development environment for the time being? If it does not work, we may still need to wait for the upstream update :(

hiroki-chen avatar Oct 22 '22 05:10 hiroki-chen

@haerdib @hiroki-chen Sorry for the delay in updating rust-toolchain, because I have no more free bandwidth recently. I created the v1.1.6-testing branch, which supports rust-nightly-2022-10-22 and bump version to 1.1.6. I also updated the v2.0.0-preview branch.

volcano0dr avatar Oct 22 '22 18:10 volcano0dr

@volcano0dr Thank you for the update!

hiroki-chen avatar Oct 23 '22 02:10 hiroki-chen

Thanks a lot! Would you mind sharing the process on how you perform this update? Then we could try helping out if you lack time the next time.

clangenb avatar Oct 23 '22 06:10 clangenb

@clangenb Of course, I can share the upgrade process. Also, I would like to know if you are working on SDK v1.1.x or v2 now?

volcano0dr avatar Oct 24 '22 02:10 volcano0dr

Currently, we are working with v1.1.x, but at some point we will probably migrate. Are you planning to maintain v2 only at some point?

clangenb avatar Oct 24 '22 06:10 clangenb

I will continue to maintain v1.1.x for a while, but as the v2 version stabilizes, I will consider pushing preview-v2.0.0 as master. Migrating to v2 may take some effort. A major change in v2 is that there is no need to modify the third-party crate, which can save a lot of maintenance costs.

volcano0dr avatar Oct 24 '22 07:10 volcano0dr

Yes, I must admit I wasn't aware of the v2.0.0 branch until recently, but it sounds very tempting. :) We are going productive soonish; hence we can only afford to migrate if it is stable. However, reduced maintenance cost is definitely something we are looking forward to. :)

clangenb avatar Oct 24 '22 07:10 clangenb

Once v2 is stable, I can help you with the migration if you need it.

volcano0dr avatar Oct 24 '22 07:10 volcano0dr

As far as I know, Baidu's team has already migrated Teaclave FaaS to SDK v2. So I think v2 will be stable soon in the near future.

volcano0dr avatar Oct 24 '22 07:10 volcano0dr

Alright, we will look into this soon! Thanks!

clangenb avatar Oct 26 '22 05:10 clangenb

@clangenb Hi, there are still some missing parts to merge version 2. I would be grateful if you would help us.

mssun avatar Oct 27 '22 04:10 mssun

We haven't started to have a look at v2 yet. How would you like us to contribute?

clangenb avatar Oct 28 '22 13:10 clangenb