apache / incubator-teaclave-sgx-sdk

Apache Teaclave (incubating) SGX SDK helps developers to write Intel SGX applications in the Rust programming language, and also known as Rust SGX SDK.
https://teaclave.apache.org
Apache License 2.0
1.17k stars 259 forks source link

Rust errors #14

Closed yhechaichi closed 6 years ago

yhechaichi commented 6 years ago

Hello,

I'm trying to run the sample codes examples but I have the 3 following errors :

error[E0470]: re-exported macro not found
   --> /home/.../sgx_tstd/src/lib.rs:117:18
    |
117 | #[macro_reexport(assert, assert_eq, assert_ne, debug_assert, debug_assert_eq,
    |                  ^^^^^^

error[E0412]: cannot find type `Infallible` in module `convert`
   --> /home/.../sgx_tstd/src/error.rs:236:25
    |
236 | impl Error for convert::Infallible {
    |                         ^^^^^^^^^^ not found in `convert`

error[E0277]: the trait bound `usize: core::convert::From<u64>` is not satisfied
   --> /home/.../sgx_tstd/src/io/cursor.rs:142:33
    |
142 |     let pos: usize = (*pos_mut).try_into().map_err(|_| {
    |                                 ^^^^^^^^ the trait `core::convert::From<u64>` is not implemented for `usize`
    |
    = help: the following implementations were found:
              <usize as core::convert::From<u16>>
              <usize as core::convert::From<u8>>
    = note: required because of the requirements on the impl of `core::convert::TryFrom<u64>` for `usize`
    = note: required because of the requirements on the impl of `core::convert::TryInto<usize>` for `u64`

error: aborting due to 3 previous errors

Some errors occurred: E0277, E0412, E0470.
For more information about an error, try `rustc --explain E0277`.
error: Could not compile `sgx_tstd`.

I tried to find a workaround but I'm not that experimented and I don't want to break anything. Any help would be greatly appreciated.

yhechaichi commented 6 years ago

IT WORKED ! Finally !!

I just have one thing to say : thank you so much for your time and patience, you helped me a ton and I have a much better understanding of the relationship between the different parts thanks to you now ! I can now have a look at the rusty machine for my project ! :)

Once again thank you really much and have a wonderful day !

dingelish commented 6 years ago

My pleasure :)