Skip to content
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

Error building pl-token-2022 into a project #7479

Open
GaloisField2718 opened this issue Nov 10, 2024 · 1 comment
Open

Error building pl-token-2022 into a project #7479

GaloisField2718 opened this issue Nov 10, 2024 · 1 comment

Comments

@GaloisField2718
Copy link

GaloisField2718 commented Nov 10, 2024

Hi,
My Cargo.toml is as follow:

   [package]
  1 name = "eclipse_token_project"
  2 version = "0.1.0"
  3 edition = "2021"
  4 
  5 [dependencies]
  6 solana-sdk = "1.10"            
  7 mpl-token-metadata = "1.2"  
  8 solana-client = "1.10"
  9 spl-token = "3.3"

When I run it (cargo run) I reach:

error[E0277]: can't compare `solana_program::pubkey::Pubkey` with `spl_memo::solana_program::pubkey::Pubkey`
 ....
...
error: could not compile `spl-token-2022` (lib) due to 4 previous errors
@buffalojoec
Copy link
Contributor

It looks like those versions of mpl-token-metadata and spl-token depend on a solana-program version of at least 1.9, however that version of solana-client has solana-sdk pinned at 1.10.0.
https://crates.io/crates/solana-client/1.10.0/dependencies

solana-client also depends on spl-token fixed at 3.2.
https://crates.io/crates/solana-account-decoder/1.10.0/dependencies

I wonder if you are pulling in two versions of spl-token, and thus two versions of solana-program? Check your lockfile.

I think you should be able to fix this by changing spl-token to 3.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants