stellar / soroban-examples

Example Soroban Contracts
Apache License 2.0
65 stars 68 forks source link

Rust setup issues on Gitpod Startup #250

Closed Julian-dev28 closed 1 year ago

Julian-dev28 commented 1 year ago

What version are you using?

soroban-examples: 0.8.4 soroban-SDK: 0.8.4 soroban-cli: v0.7.0 (this is in the makefile. Shouldn't this be v0.7.1?)

What did you do?

Navigate to the Gitpod demo: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v0.8.4 Create a new Gitpod Workspace

Wait for Build to finish

What did you expect to see?

A finished message similar to the following:

Finished release [optimized] target(s) in 23.44s

What did you see instead?

Error regarding Cargo.toml file

error: could not find `Cargo.toml` in `/workspace/soroban-examples` or any parent directory

Error regarding rustc Version

error: package `soroban-sdk v0.8.4` cannot be built because it requires rustc 1.69 or newer, while the currently active rustc version is 1.68.2
Either upgrade to rustc 1.69 or newer, or use
cargo update -p soroban-sdk@0.8.4 --precise ver
where `ver` is the latest version of `soroban-sdk` supporting rustc 1.68.2
make[1]: *** [Makefile:9: build] Error 101
make[1]: Leaving directory '/workspace/soroban-examples/account'
make: *** [Makefile:9: build] Error 1

Notes

Was able to successfully run make

After manually running the following:

rustup self uninstall -y
rm -rf .rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

rustup update stable
rustup target add --toolchain stable wasm32-unknown-unknown
rustup component add --toolchain stable rust-src
rustup update nightly
rustup target add --toolchain nightly wasm32-unknown-unknown
rustup component add --toolchain nightly rust-src
rustup default stable

sudo apt-get update && sudo apt-get install -y binaryen
leighmcculloch commented 1 year ago

Looks like we need to change the gitpod setup to install the newer version of rust.

@Julian-dev28 What led you to installing binaryen as well?

Julian-dev28 commented 1 year ago

@leighmcculloch I just wanted to be thorough and make sure I wasn't missing a step