dingelish / sgx-world

The world of forked crates
Apache License 2.0
23 stars 2 forks source link

sgx更新到1.1.0编译不通过 #1

Closed 60ke closed 9 months ago

60ke commented 4 years ago

sgx更新到1.1.0编译不通过,如http_req-sgx这个,即使用v1.0.9-backup也不能编译通过,因为还有依赖包使用了sgx master的依赖(依赖指向1.1.0) 还有就是make_pub.diff路径错误需要将所有的/src去掉,才能make通过。

下面是报错信息: error[E0432]: unresolved import alloc_crate::collections::TryReserveError --> /root/.cargo/git/checkouts/teaclave-sgx-sdk-be25c2ad2f03718d/4508450/sgx_tstd/src/collections/mod.rs:35:9 | 35 | pub use alloc_crate::collections::TryReserveError; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no TryReserveError in collections

error[E0658]: The ! type is experimental --> /root/.cargo/git/checkouts/teaclave-sgx-sdk-be25c2ad2f03718d/4508450/sgx_tstd/src/error.rs:185:16 185 impl Error for ! { ^
= note: for more information, see https://github.com/rust-lang/rust/issues/35121
= help: add `#![feature(never_type)]` to the crate attributes to enable
error[E0658]: non exhaustive is an experimental feature --> /root/.cargo/git/checkouts/teaclave-sgx-sdk-be25c2ad2f03718d/4508450/sgx_tstd/src/io/error.rs:86:1 86 #[non_exhaustive] ^^^^^^^^^^^^^^^^^

= note: for more information, see https://github.com/rust-lang/rust/issues/44109 = help: add #![feature(non_exhaustive)] to the crate attributes to enable

error[E0658]: use of unstable library feature 'todo_macro' --> /root/.cargo/git/checkouts/teaclave-sgx-sdk-be25c2ad2f03718d/4508450/sgx_tstd/src/lib.rs:109:67 109 pub use core::{unreachable, unimplemented, write, writeln, r#try, todo}; ^^^^
= note: for more information, see https://github.com/rust-lang/rust/issues/59277
= help: add `#![feature(todo_macro)]` to the crate attributes to enable
error[E0658]: use of unstable library feature 'mem_take' --> /root/.cargo/git/checkouts/teaclave-sgx-sdk-be25c2ad2f03718d/4508450/sgx_tstd/src/panicking.rs:266:28 266 let contents = mem::take(self.fill()); ^^^^^^^^^
= note: for more information, see https://github.com/rust-lang/rust/issues/61129
= help: add `#![feature(mem_take)]` to the crate attributes to enable
error[E0308]: mismatched types --> /root/.cargo/git/checkouts/teaclave-sgx-sdk-be25c2ad2f03718d/4508450/sgx_tstd/src/panicking.rs:236:9 236 &location ^^^^^^^^^
expected struct core::panic::Location, found reference
help: consider removing the borrow: location
= note: expected type `core::panic::Location<'_>`
           found type `&core::panic::Location<'_>`
error[E0308]: mismatched types --> /root/.cargo/git/checkouts/teaclave-sgx-sdk-be25c2ad2f03718d/4508450/sgx_tstd/src/panicking.rs:357:13 357 &location ^^^^^^^^^
expected struct core::panic::Location, found reference
help: consider removing the borrow: location
= note: expected type `core::panic::Location<'_>`
           found type `&core::panic::Location<'_>`

error: aborting due to 7 previous errors

Some errors have detailed explanations: E0308, E0432, E0658. For more information about an error, try rustc --explain E0308. error: Could not compile sgx_tstd. warning: build failed, waiting for other jobs to finish... error: build failed Makefile:42: recipe for target 'libenclave.a' failed make[1]: [libenclave.a] Error 101 make[1]: Leaving directory '/root/sgx_test/http_req-sgx-1.0.9-backup/sgx/http_req-sgx-test/enclave' Makefile:161: recipe for target 'enclave' failed make: [enclave] Error 2

dingelish commented 4 years ago

你需要更新rust版本到nightly-2019-11-25

60ke commented 4 years ago

你需要更新rust版本到nightly-2019-11-25 嗯 可以了谢谢 。之前的版本是rustc 1.41.0-nightly (76a252ea9 2019-12-09),切换到nightly-2019-11-25就行了。sgx项目写的有toolchain之前没注意到。sgx主项目的samecode中的http_req,make会失败,因为少了lib和bin文件夹。

alanpoon commented 4 years ago

Got this issue also: error[E0658]: The ! type is experimental

rustup default -> nightly-2019-11-25-x86_64-unknown-linux-gnu (default) rustc 1.41.0-nightly (412f43ac5 2019-11-24)