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

Updated version for hello-world example #646

Open
ASoldo opened this issue Mar 22, 2024 · 2 comments
Open

Updated version for hello-world example #646

ASoldo opened this issue Mar 22, 2024 · 2 comments

Comments

@ASoldo
Copy link

ASoldo commented Mar 22, 2024

Hi, can we get updated version for this repo example-helloworld since building latest throws error when running cargo build-bpf.

❯ cargo build-bpf
info: uninstalling toolchain 'solana'
info: toolchain 'solana' uninstalled
error: package `bumpalo v3.15.4` cannot be built because it requires rustc 1.73.0 or newer, while the currently active rustc version is 1.68.0-dev
Either upgrade to rustc 1.73.0 or newer, or use
cargo update -p bumpalo@3.15.4 --precise ver
where `ver` is the latest version of `bumpalo` supporting rustc 1.68.0-dev

Thank you!

@gameuser1982
Copy link

I am getting a similar error.

candid@DESKTOP-5D7VSM9:~/example-helloworld/src/program-rust$ npm run build:program-rust

> helloworld@0.0.1 build:program-rust
> cargo build-bpf --manifest-path=./src/program-rust/Cargo.toml --bpf-out-dir=dist/program

error: package `bumpalo v3.16.0` cannot be built because it requires rustc 1.73.0 or newer, while the currently active rustc version is 1.72.0-dev
Either upgrade to rustc 1.73.0 or newer, or use
cargo update -p bumpalo@3.16.0 --precise ver
where `ver` is the latest version of `bumpalo` supporting rustc 1.72.0-dev

My actual version of rust:


candid@DESKTOP-5D7VSM9:~/example-helloworld/src/program-rust$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/candid/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu (default)
solana

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.77.2 (25ef9e3d8 2024-04-09)

candid@DESKTOP-5D7VSM9:~/example-helloworld/src/program-rust$ rustc --version
rustc 1.77.2 (25ef9e3d8 2024-04-09)
candid@DESKTOP-5D7VSM9:~/example-helloworld/src/program-rust$ cargo --version
cargo 1.77.2 (e52e36006 2024-03-26)
candid@DESKTOP-5D7VSM9:~/example-helloworld/src/program-rust$ 

@ASoldo
Copy link
Author

ASoldo commented Apr 20, 2024

You need to put your solana-program as dev-dependency instead of dependencies. So when using cargo add for solana, you need to use --dev flag. So just update your cargo toml and move it from dependencies to dev-dependencies.

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