-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Very first tutorial does not work. All new users will fail if they don't understand how to debug your codebase on an intimate level. #34991
Comments
I've just arrived here looking for a solution to this.
System info: Running cargo-build-sbf --version Some insights would be appreciated. I saw a Stack offset error on another issue where they suspected it was the test validator? Possibly a red herring. |
I met the same problem after upgrading to 1.18.0. After struggling for a couple of hours, I downgraded to 1.17.17 finally, and it works again without the # download Solana tool v1.17.17
sh -c "$(curl -sSfL https://release.solana.com/v1.17.17/install)"
# force to redownload rust toolchains
cargo-build-sbf --force-tools-install And, all the dependencies should be at "1.17.17" as well. [dependencies]
borsh = { version = "0.10.3" }
borsh-derive = { version = "0.10.3" }
chrono = "0.4.33"
solana-program = "=1.17.17"
spl-token = "4.0.0"
[dev-dependencies]
solana-program-test = "1.17.17"
solana-sdk = "1.17.17" Finally, I succeeded. 😄 ❯ cargo build-sbf
Finished release [optimized] target(s) in 0.46s |
@vebodev it tries to build 1.18.0 no matter what I do! Ugh so frustrating lol. Why has no one told us a way to just pin to the Soloana version of rustc or come up with a better way to do this install. Maybe write a script one time and never run into this problem every single time they do an update. |
Not sure what I did but.....I think it was adding in the DEVS PLEASE FOR LOVE OF GOD UPDATE THE WEBSITE FOR THE HELLO WORLD APP! (caps are because I am screaming not because I'm ignorant) 😄 Not sure how much you value your time but simple one time description of this on the website would keep it from resurfacing over and over and save me literally 20 hours and mfing you all the whole time. Please and Thank you. |
@FrackinFamous by updating the website for hello world app, do you mean https://github.com/solana-foundation/developer-content/blob/main/content/guides/getstarted/local-rust-hello-world.md ? If you have some particular things you think will be helpful for the newcomers, could you create a PR for this md file? |
@KirillLykov I will surely try the install from scratch again tomorrow and make a PR once I figure out exactly what I did. Haha. Very tired now. Yes I am in fact talking about that article. I'm not really sure what I did would be a relevant way to fix it though because I still don't know how to install the latest version. Like I said that simple extra I guess technically the problem lies in this article and the documentation: https://solana.com/developers/guides/getstarted/setup-local-development Neither of which say anything about having to pinning the solana-program crate to match the cli version you installed which is what @billythedummy was trying to tell me the whole time but I ended up finally getting it through my head after watching @vebodev do it lol. So yes the article and the docs need to have an aside about making the the solana-cli == solana-program crate. |
Congratulation! Rust world does have a lot of wired stuffs. |
@vebodev Thank you! After following your steps, I can confirm this works for me on |
More on this if you ever run into such dependencies issues in the future:
|
@billythedummy That was a wealth of info and thank you for sticking with me. Sometimes (me always) we can't understand the solution without getting in there an going through it a bit. This was fantastic info albeit a bit scary... I understand Solana are growing fast but I could see this mix matching getting out of hand without a way to tie everything together. It's like a grown up version of my own project folders when I forget version control exists. 🤣 |
Thanks for pointing this out. Definitely want to make sure the first experience working with Solana is seamless. I've added something I think may help, based on this thread. In the future, feel free to also PR changes into the documentation, to help the next person! |
Sure thing! Thanks for the addition and I apologize for the frustration. Obviously I am a bit sarcastic so nothing meant by it. I appreciate the communities quick help and feedback. I'll be sure to help out with anything I learn. |
Hello Guys, I need little favour. I am unable to locate my binary .so files and that's why unable to deploy program. This is My Cargo.toml [dependencies] |
@YatharthAndharia normally |
@YatharthAndharia We can't keep answering development/debugging questions here, but you haven't set up the
The tutorial says to do this:
|
Guys I'm going to close this since this isn't a bug, it's some dependency mismatch annoyance - which I know is not fun. If there's further issues I encourage the Stack Exchange, and if you find something with |
oh my gosh, ive been bashing my head all night ! and you were right. Well... I learned a lot regardless. I learned to match my solana cli to a compatible version of what package i use Coming from node / python i was like man i miss complied languages. haven't touched rust in a minute. I guess i gotta get used to this! Thanks everyone here and all the other places I looked, i finally got my Cheers! |
I had a similar issue which was not fixed with It would be great if anyone sees this would fix the documentation: Source: |
Problem
This is broken:
https://solana.com/developers/guides/getstarted/local-rust-hello-world
If you start with a fresh linux system and run this tutorial you will fail.
Proposed Solution
A team member recording a video going through this step by step and proving it works.
The text was updated successfully, but these errors were encountered: