Questions tagged [rustc]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
4 views

can't connect to my local when doing hello world on rustc

solana program deploy C:\Users\kamba\OneDrive\"Рабочий стол"\blockchain_assignment_2\solana-hello-world-local Error: RPC request error: cluster version query failed: error sending request ...
Kuanysh's user avatar
2 votes
0 answers
14 views

Anchor Test fails with version error [duplicate]

Issue: I installed everything needed to start developing on Solana. I am trying to test a simple contract but when i run: anchor test, it errors out the following: error: package `solana-program v1.18....
Dutch's user avatar
  • 21
5 votes
2 answers
33 views

What's the benefit of using platform-tools compared to Rust's upstream bpfel-unknown-none target?

The fact that Solana's CLI installer shipped (and still ships) with a nearly year-long outdated version of platform-tools has been a pain point with the previous Solana team I've worked with. platform-...
ARitz Cracker's user avatar
1 vote
1 answer
141 views

"package solana-program v1.18.7 cannot be built" error [duplicate]

I have a new Rust project that gives the following error when I compile it. package `solana-program v1.18.7` cannot be built because it requires rustc 1.72.0 or newer, while the currently active rustc ...
mezzosoprano's user avatar
1 vote
1 answer
54 views

Cannot compile `solana-program` crate with new `sqlx` versions

For some reason when trying to compile a project having both sqlx and solana-program I get an error on package version mismatches, which is strange, because those should come from different crates and ...
RowanStone's user avatar
0 votes
0 answers
81 views

cargo build-bpf package error: `ahash v0.8.8` cannot be built because it requires rustc 1.72.0 or newer

I'm using a simple hello world solana program from https://moralis.io/how-to-write-a-solana-smart-contract src/lib.rs use solana_program::{ account_info::AccountInfo, entrypoint, ...
A. K.'s user avatar
  • 175
3 votes
1 answer
1k views

error: package `solana-program v1.18.1` cannot be built because it requires rustc 1.72.0 or newer [duplicate]

I tried setting up an Anchor project on my MacBook with an ARM processor, but I encountered an error. Here is step by step that i took % anchor init testproject Only x86_64 / Linux distributed in NPM ...
Quoc Le's user avatar
  • 31
5 votes
1 answer
659 views

How do I fix "package solana-program v1.18.0 cannot be built because it requires rustc 1.72.0 or newer"?

When building an onchain program with cargo build-sbf using solana-program v1.18, I get the following error: error: package solana-program v1.18.0 cannot be built because it requires rustc 1.72.0 or ...
Jon C's user avatar
  • 12.6k
3 votes
4 answers
261 views

Anchor compatibility issues

Whenever I try to run anchor build, I am greeted with a package incompatibility error, saying that my rustc toolchain version is too low (1.62.0-dev) but my toolchain is set to 1.75.0. Here's the ...
Morgandril's user avatar
0 votes
3 answers
636 views

Is it possible to have reflection tokens like safemoon on solona?

A reminder on how reflection tokens like safemoon work is every ones balance is simply an equation instead of a fixed number. That way everyone's balance can be instantly updated with no gas needed ...
OPP's user avatar
  • 11
1 vote
1 answer
113 views

Can anyone use SolGSN: Solana Gas Station?

I want to use SolGSN, where the user can't pay the gas fee like transferring the NFT. The admin has to pay the fee. However, this repository is outdated, and I've encountered several errors due to ...
Maidi's user avatar
  • 444
3 votes
1 answer
129 views

How to get Mint Address of of SPL token using associated token account? without rpc call

I can get an associated token account knowing the mint address and wallet address with spl_associated_token_account::get_associated_token_address function But is it possible to get a mint address, ...
Scott's user avatar
  • 33
2 votes
1 answer
244 views

solana play ground - too much SOL for initial deployment and RPC error

I'm trying to deploy some program locally with solana playground, when trying to deploy the program on dev-net the initial deployment costs 4.40 SOL, and when requesting more than 1 SOL(with "...
OrHaifler's user avatar
2 votes
2 answers
536 views

cargo build-bpf rustc version

I'm trying to use "cargo build-bpf" on a simple rust file, I'm using the "solana_program" dependency and the next error occurs: "error: package solana-program v1.16.5 cannot ...
OrHaifler's user avatar
4 votes
3 answers
133 views

Unable to build a binary

Both anchor build and cargo-build-sbf throw: Warning: cargo-build-bpf is deprecated. Please, use cargo-build-sbf cargo-build-bpf child: /Users/usr1/solana/bin/cargo-build-sbf --arch bpf error: package ...
mega_creamery's user avatar
9 votes
4 answers
4k views

Anchor build says "cannot be built because it requires rustc 1.68.0 or newer" but I have a newer rustc installed

When I run anchor build or anchor test: error: package `solana-program v1.16.3` cannot be built because it requires rustc 1.68.0 or newer, while the currently active rustc version is 1.62.0-dev. But ...
hoho hotstuff's user avatar
0 votes
1 answer
934 views

update rustc that anchor uses

After running cargo build-bpf I get the following error: cargo-build-bpf child: rustup toolchain list -v cargo-build-bpf child: cargo +bpf build --target bpfel-unknown-unknown --release error: package ...
user4309's user avatar
3 votes
3 answers
749 views

InstructionFallbackNotFound. Error Number: 101. Error Message: Fallback functions are not supported

Have a question related to custom program development. I've testing this program pub mod fluxtility { use super::*; pub fn buy_ticket(ctx: Context<Initialize>, lamports: u64) -> ...
Muhit Raihan's user avatar
1 vote
2 answers
124 views

How do pass Context into multiple helper functions?

sorry if this is a more rusty question. As the title suggests, how can I pass the context struct into multiple helper functions? What I'd like to do is something like this: impl<'info> BuyIn<'...
TLS's user avatar
  • 55
2 votes
1 answer
132 views

Depencencies in Cargo.toml file Solana-SDK and Solana-Client doesn't work

Hello I am trying desperately to use solana-sdk and solana-client but when I do cargo build-bpf it doesn't work. Can someone help me please? When I use only solana-client as a dependency the ...
RevOneX9's user avatar
2 votes
2 answers
1k views

Solana Helloworld example stuck on cargo build bpf without error message

I'm in the process of deploying the Solana helloworld example smart contract on Ubuntu 20.04. When running npm run build:program-rust, the package.json in the root of the repository states that this ...
Ryan Wennekes's user avatar
4 votes
1 answer
209 views

Solana Program 1 time initialization Issue

I want to add a check that once a function is called it should never be called again. I want initialization to be one-time only. Is this a good approach if I take a bool value and set it to false ...
Abdullah Qureshi's user avatar
1 vote
1 answer
230 views

Issues with installing solana on m1 mac book (macOS Monterey v12.6)

Followed guide https://dev.to/0xmuse/install-solana-on-m1-macs-without-rosetta-10m5 to install solana as I was reading about issues installing with rosetta. But after running ./scripts/cargo-install-...
user2271's user avatar
2 votes
1 answer
275 views

could not find `__client_accounts_contributor` in the crate root

Attempting to 'anchor build' a project and running into errors with the #[program] macro. Unsure exactly what could be causing these. Tried reading the compiler error index but it didnt seem to help ...
Joey Meere's user avatar
1 vote
0 answers
48 views

RUSTFLAGS="-C instrument-coverage" with solana program [closed]

Trying to add check coverage, when using RUSTFLAGS="-C instrument-coverage" cargo build-bpf I'm getting: error: failed to run `rustc` to learn about target-specific information Caused by: ...
Ohad Dahan's user avatar