Anchor build completes without error, but no .so file
Anchor build completes without error, but no .so file
Loading saved threads...
MidesColin · External communityPost link
External question — Solana Stack Exchange
Author: MidesColin
Original post: https://solana.stackexchange.com/questions/16749
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I'm trying to build Raydium amm-cpi. Everything went well,
anchor build
completes without an error but there is no .so file in the
target/deploy/
dir.
target/idl/amm_cpi.json
and
target/types/amm_cpi.ts
files are created correctly.
I already tried to remove the
target
dir and did
cargo clean
before the build.
Updated
anchor-cli
from
0.28.0
to
0.29.0
Cargo.toml
[package]
name = "amm-cpi"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]
name = "amm_cpi"
[features]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
cpi = ["no-entrypoint"]
default = []
[dependencies]
anchor-lang = "0.29.0"
anchor-spl = "0.29.0"
amm-anchor = { git = "https://github.com/raydium-io/raydium-contract-instructions", package = "amm-anchor" }
solana-program = ">=1.16, <1.18"
Anchor.toml
[toolchain]
[features] seeds = false skip-lint = false
[programs.devnet] amm_cpi = "3igNEs6GbvsAgEicsLTkduyhVFWXNkGerQobX1fdZdf9"
[registry] url = "https://api.apr.dev"
[provider] cluster = "Devnet" wallet = "/Users/me/.config/solana/id.json"
[scripts] test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
My env:
macOS 13.3 (22E252)
anchor-cli 0.29.0
solana-cli 1.17.34 (src:b04a806c; feat:3746964731, client:SolanaLabs)
Quote
Report
Jimii · External communityPost link
External answer — Solana Stack Exchange
Author: Jimii
Original post: https://solana.stackexchange.com/a/16750
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
You are looking in the wrong directories,
The
.so
and program keypair file will be found in the
/target/deploy
directory.
Quote
Report
Louis · External communityPost link
External answer — Solana Stack Exchange
Author: Louis
Original post: https://solana.stackexchange.com/a/20931
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
cargo build-sbf --manifest-path=./Cargo.toml --sbf-out-dir=target/deploy
can generate .so file
Quote
Report
Whiteseal · External communityPost link
External answer — Solana Stack Exchange
Author: Whiteseal
Original post: https://solana.stackexchange.com/a/21544
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
You may need to add the mainnet id to your anchor.toml:
[programs.mainnet]
your_program = "MainnetKey"
It may also be an issue with the amm-anchor dep, you may need to use it with the "no entrypoint" feature. Try removing it to see if you get the .so
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External answer — Solana Stack Exchange Author: Jimii Source score (net votes, not local likes): 0 Original post: https://solana.stackexchange.com/a/16750 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. You are looking in the wrong directories, The .so and program keypair file will be found in the /target/deploy directory.
Checking account access…