fortanix / rust-sgx

The Fortanix Rust Enclave Development Platform
https://edp.fortanix.com
Mozilla Public License 2.0
434 stars 98 forks source link

Compilation fails - sgxs-loaders #374

Open drasko opened 2 years ago

drasko commented 2 years ago
   Compiling sgxs-loaders v0.3.2
error[E0554]: `#![feature]` may not be used on the stable release channel
 --> /home/drasko/.cargo/registry/src/github.com-1ecc6299db9ec823/enclave-runner-0.5.0/src/lib.rs:7:12
  |
7 | #![feature(asm)]
  |            ^^^

For more information about this error, try `rustc --explain E0554`.
error: could not compile `enclave-runner` due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `fortanix-sgx-tools v0.5.0`, intermediate artifacts can be found at `/tmp/cargo-installQLxtnq`

Caused by:
  build failed
error: failed to compile `sgxs-tools v0.8.5`, intermediate artifacts can be found at `/tmp/cargo-installAgWSqX`

Caused by:
  build failed
     Summary Failed to install fortanix-sgx-tools, sgxs-tools (see error(s) above).
error: some crates failed to install
jethrogb commented 2 years ago

See #369, which we plan to merge after the new asm hits stable. Until then, please use nightly-2021-12-15 or earlier.

drasko commented 2 years ago

@jethrogb I did:

rustup toolchain install nightly-2021-12-15
rustup target add x86_64-fortanix-unknown-sgx --toolchain nightly-2021-12-15
cargo install fortanix-sgx-tools sgxs-tools

Still the same error.

quentinadam commented 2 years ago

I was running into the same issues, and I managed to get everything to compile correctly by defining nightly-2021-12-15 as the default toolchain :

rustup default nightly-2021-12-15

MaxFangX commented 2 years ago

Seeing that #369 was merged, I can confirm that installation works when referencing the repo directly:

cargo default nightly
cargo install fortanix-sgx-tools sgxs-tools --git https://github.com/fortanix/rust-sgx

It would be nice if the packages on crates.io were updated to include #369 so that users can have it work without the --git argument.