-
Notifications
You must be signed in to change notification settings - Fork 2.6k
20 usd in crypto to whoever can help me solve this getrandom error when i run anchor build #14294
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
Comments
Please provide a detailed reproduction for the error you're encountering. Incentivization won't prioritize your issue if no MCVE provided. |
BTW cargo tree could help you find why |
You also mentioned that this problem happens with And generally, cargo user support questions are better addressed at https://users.rust-lang.org/ while this is more targeted for when behavior seems to be incorrect. |
|
program cargo.toml:
problem appears when i add anchor client as a dependency. everything else in my program are default. (i did not add any logic to my lib.rs yet) other than that the only other modificaiton i made outside this file was setting the resolver to "2" in my root cargo.toml |
@luckydog6969 Without a minimal reproducible example, this is not going to move forward. Check these issues as examples of how to provide an MRE.
To provide an MRE, you can either setup a Git repository, or send a zip file of the affected project here. |
Given this. I am going to close the issue now. If later you find it is potentially a Cargo bug, feel free to open a new one. |
Uh oh!
There was an error while loading. Please reload this page.
disclaimer im a noob so pls bear with me. anyway, when i run cargo build my program compiles successfully but when i run anchor build i get this error output.
according to the documentation of solana (this section corresponds to my error) https://solana.com/docs/programs/lang-rust#depending-on-rand. “Programs are constrained to run deterministically, so random numbers are not available. Sometimes a program may depend on a crate that depends itself on rand even if the program does not use any of the random number functionality. If a program depends on rand, the compilation will fail because there is no get-random support for Solana. “
and it said to add this to the program cargo.toml:
getrandom = { version = "0.1.14", features = ["dummy"] }
.and
getrandom = { version = "0.2.2", features = ["custom"] }
.i tried it and it did not work
givens
if you solve it drop your sol address and ill send you 20 bucks. appreciate the help!
The text was updated successfully, but these errors were encountered: