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

Some questions about sample code #202

Closed
shixiongjing opened this issue Jan 28, 2020 · 2 comments
Closed

Some questions about sample code #202

shixiongjing opened this issue Jan 28, 2020 · 2 comments

Comments

@shixiongjing
Copy link

Hi, I am new to the project, and have never used Rust before. I am sorry that this question might be naive.

I just tried to cloned the repo and followed the guide "Use simulation mode for non SGX-enabled machine (includes macOS)" in the readme to run the helloworld example in software mode. But I got several errors during 'make'. The exact errors actually seem straight forward, but I am worried that I got something wrong in the environment, because that was the example from the tutorial and it was expected to run without problems if I did everything right.

I am running docker on ubuntu 18.04 (tried both docker image 'latest' and 1804:1.0.7), and I have changed the sgx_mode in Makefile to SW. The errors are attached. Any idea on what I did wrong? Please help. Any suggestion is appreciated!

error[E0432]: unresolved import alloc_crate::collections::TryReserveError--> /root/.cargo/git/checkouts/rust-sgx-sdk-fc8771c5c45bde9a/8d9f05a/sgx_tstd/src/collections/mod.rs:35:9 | 35 | pub use alloc_crate::collections::TryReserveError; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ noTryReserveErrorincollections`

error[E0658]: The ! type is experimental
--> /root/.cargo/git/checkouts/rust-sgx-sdk-fc8771c5c45bde9a/8d9f05a/sgx_tstd/src/error.rs:185:16
|
185 | impl Error for ! {
| ^
|
= note: for more information, see rust-lang/rust#35121
= help: add #![feature(never_type)] to the crate attributes to enable

error[E0658]: non exhaustive is an experimental feature
--> /root/.cargo/git/checkouts/rust-sgx-sdk-fc8771c5c45bde9a/8d9f05a/sgx_tstd/src/io/error.rs:86:1
|
86 | #[non_exhaustive]
| ^^^^^^^^^^^^^^^^^
|
= note: for more information, see rust-lang/rust#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/rust-sgx-sdk-fc8771c5c45bde9a/8d9f05a/sgx_tstd/src/lib.rs:109:67
|
109 | pub use core::{unreachable, unimplemented, write, writeln, r#try, todo};
| ^^^^
|
= note: for more information, see rust-lang/rust#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/rust-sgx-sdk-fc8771c5c45bde9a/8d9f05a/sgx_tstd/src/panicking.rs:266:28
|
266 | let contents = mem::take(self.fill());
| ^^^^^^^^^
|
= note: for more information, see rust-lang/rust#61129
= help: add #![feature(mem_take)] to the crate attributes to enable

error[E0308]: mismatched types
--> /root/.cargo/git/checkouts/rust-sgx-sdk-fc8771c5c45bde9a/8d9f05a/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/rust-sgx-sdk-fc8771c5c45bde9a/8d9f05a/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.`

=============================

@uraj
Copy link

uraj commented Jan 28, 2020

try rustup default nightly-2019-11-25 before building the code

@uraj uraj closed this as completed Jan 28, 2020
@uraj uraj reopened this Jan 28, 2020
@shixiongjing
Copy link
Author

You are right. I tried nightly when I tried running outside docker earlier and I forgot to switch to nightly in docker...Thanks a lot.

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

No branches or pull requests

2 participants