Description
I'm sorry that I've never known rust and wasm before, but honestly speaking I love your paper concerning Spectre, Wasm and some interesting protection methods, so I can't wait to implement these methods and get some knowledge of Wasm-Spectre Poc on my machine. I've read the manual of rustup and cargo but still can't figure out how can I fix this problem.
Basically I've setup an environment of Ubuntu 20.04.2 LTS in a fresh VM and machine as mentioned in README.md, and I ran the command in README.md. However I got the following problem when I was running "make build".
In Makefile I notice we use cargo +rust-cet build to lanuch the project:
out/rust_build/bin/rustc:
mkdir -p out/rust_build
cd ./rustc-cet && ./x.py build && ./x.py install
rustup toolchain link rust-cet ./out/rust_build
build_rustc:
# force rebuild
mkdir -p out/rust_build
cd ./rustc-cet && ./x.py build && ./x.py install
rustup toolchain link rust-cet ./out/rust_build
build_lucet_nocet: rust_libloading_aslr
cd lucet-spectre && cargo build
cd lucet-spectre && cargo build --release
build_lucet: out/rust_build/bin/rustc build_lucet_nocet
cd lucet-spectre && \
CFLAGS="-fcf-protection=full" \
CXXFLAGS="-fcf-protection=full" \
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER="$(CURR_DIR)/rustc-cet/rust_cet_linker" \
CARGO_TARGET_DIR="${CURR_DIR}/lucet-spectre/target-cet" \
cargo +rust-cet build
cd lucet-spectre && \
CFLAGS="-fcf-protection=full" \
CXXFLAGS="-fcf-protection=full" \
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER="$(CURR_DIR)/rustc-cet/rust_cet_linker" \
CARGO_TARGET_DIR="${CURR_DIR}/lucet-spectre/target-cet" \
cargo +rust-cet build --release
the result is shown below:
error: 'cargo' is not installed for the toolchain 'rust-cet'
note: this is a custom toolchain, which cannot use `rustup component add`
help: if you built this toolchain from source, and used `rustup toolchain link`, then you may be able to build the component with `x.py`
I've checked the rustup show command and find that the toolchain of "rust-cet" has already been installed:
Default host: x86_64-unknown-linux-gnu
rustup home: /home/link/.rustup
installed toolchains
--------------------
nightly-2020-05-15-x86_64-unknown-linux-gnu (default)
rust-cet
1.43.1-x86_64-unknown-linux-gnu
installed targets for active toolchain
--------------------------------------
wasm32-wasi
x86_64-unknown-linux-gnu
active toolchain
----------------
nightly-2020-05-15-x86_64-unknown-linux-gnu (default)
rustc 1.45.0-nightly (a74d1862d 2020-05-14)
Based on some manuals about "cargo build" , I've tried simply delete "+rust-cet" in "cargo +rust-cet build" since rust-cet seemed to be installed beforehand, but I got new fault shown below:
error: could not compile `cranelift-codegen`.
Caused by:
process didn't exit successfully:
.......(signal: 9, SIGKILL: kill)
make: *** [Makefile:307: build_lucet] Error 101
I'm looking forward to your reply,