Quantcast
Channel: Active questions tagged rustc - Solana Stack Exchange
Browsing all 37 articles
Browse latest View live
↧

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 informationCaused by: process didn't...

View Article


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 in...

View Article


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...

View Article

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 after...

View Article

Image may be NSFW.
Clik here to view.

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 compilation...

View Article


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>...

View Article

InstructionFallbackNotFound. Error Number: 101. Error Message: Fallback...

Have a question related to custom program development. I've testing this programpub mod fluxtility { use super::*; pub fn buy_ticket(ctx: Context<Initialize>, lamports: u64) ->...

View Article

update rustc that anchor uses

After running cargo build-bpf I get the following error:cargo-build-bpf child: rustup toolchain list -vcargo-build-bpf child: cargo +bpf build --target bpfel-unknown-unknown --releaseerror: package...

View Article


Unable to build a binary

Both anchor build and cargo-build-sbf throw:Warning: cargo-build-bpf is deprecated. Please, use cargo-build-sbfcargo-build-bpf child: /Users/usr1/solana/bin/cargo-build-sbf --arch bpferror: package...

View Article


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 "solana...

View Article

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 be built because it requires...

View Article

How to get Mint Address of of SPL token using associated token account?...

I can get an associated token account knowing the mint address and wallet address with spl_associated_token_account::get_associated_token_address functionBut is it possible to get a mint address, when...

View Article

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...

View Article


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...

View Article

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...

View Article


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...

View Article

Error building program with `solana-program` v1.18 and CLI v1.17

When building an on-chain 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...

View Article


error: package `solana-program v1.18.1` cannot be built because it requires...

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 testprojectOnly x86_64 / Linux distributed in NPM...

View Article

Anchor build says "cannot be built because it requires rustc 1.68.0 or newer"...

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...

View Article

cargo build-bpf package error: `ahash v0.8.8` cannot be built because it...

I'm using a simple hello world solana program from https://moralis.io/how-to-write-a-solana-smart-contractsrc/lib.rsuse solana_program::{ account_info::AccountInfo, entrypoint,...

View Article
Browsing all 37 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>