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

Dependency openbook v2 problem #958

Open
Panda404NotFound opened this issue May 5, 2024 · 1 comment
Open

Dependency openbook v2 problem #958

Panda404NotFound opened this issue May 5, 2024 · 1 comment

Comments

@Panda404NotFound
Copy link

Panda404NotFound commented May 5, 2024

Greetings, I want to use your project and I get the openbook v2 dependencies error.

workspace Cargo.toml:

[workspace]
members = [ "lib/*",
    "programs/*"
]
resolver = "2"

[workspace.dependencies]
anchor-client = "=0.28.0"
anchor-spl = "=0.28.0"
anchor-lang = "=0.28.0"

solana-address-lookup-table-program = "~1.16.7"
solana-account-decoder = "~1.16.7"
solana-client = "~1.16.7"
solana-logger = "~1.16.7"
solana-program = "~1.16.7"
solana-program-test = "~1.16.7"
solana-rpc = "~1.16.7"
solana-sdk = { version = "~1.16.7", default-features = false }
solana-transaction-status = { version = "~1.16.7" }
serum_dex = { git = "https://github.com/openbook-dex/program.git", default-features=false }

openbook-v2 = { git = "https://github.com/openbook-dex/openbook-v2.git", rev = "270b2d2d473862bd4e3aa213feb970af81f4b3e2", features = ["no-entrypoint", "cpi", "enable-gpl"] }
mango-v4 = { path = "/Users/a1111/SolProject/mango-v4/programs/mango-v4", features = ["client"] }

[profile.release]
overflow-checks = true

[patch.crates-io]
anchor-lang = { git = "https://github.com/coral-xyz/anchor", tag = "v0.28.0" }
anchor-spl = { git = "https://github.com/coral-xyz/anchor", tag = "v0.28.0" }
anchor-client = { git = "https://github.com/coral-xyz/anchor", tag = "v0.28.0" }

Programs Cargo.toml:

[package]
name = "solana-project"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
name = "solana_project"

[features]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
cpi = ["no-entrypoint"]
default = ["custom-heap"]
test-bpf = ["client"]
client = ["solana-sdk", "no-entrypoint"]
# Enables GPL-licensed parts of the code. See LICENSE file.
enable-gpl = ["openbook-v2/enable-gpl"]
custom-heap = []

[dependencies]
anchor-lang = { workspace = true }
anchor-spl = { workspace = true }

serum_dex = { workspace = true, features = ["no-entrypoint", "program"] }
solana-address-lookup-table-program = { workspace = true }
solana-program = { workspace = true }
solana-sdk = { workspace = true, default-features = false, optional = true }

openbook-v2 = { workspace = true, features = ["no-entrypoint", "cpi", "enable-gpl"] }

[dev-dependencies]
solana-sdk = { workspace = true, default-features = false }
solana-program-test = { workspace = true }
spl-token = { version = "^3.0.0", features = ["no-entrypoint"] }
spl-associated-token-account = { version = "^1.0.3", features = [
    "no-entrypoint",
] }

Problem:

Full error.docx

   Compiling openbook-v2 v0.1.0 (https://github.com/openbook-dex/openbook-v2.git?rev=270b2d2d473862bd4e3aa213feb970af81f4b3e2#270b2d2d)
error[E0119]: conflicting implementations of trait `Zeroable` for type `AnyEvent`
   --> /Users/a1111/.cargo/git/checkouts/openbook-v2-bb287b4bf73a7086/270b2d2/programs/openbook-v2/src/state/orderbook/heap.rs:220:32
@Panda404NotFound
Copy link
Author

Building your project is okay. Now i have this Cargo.toml file but still have same problems.

[workspace]
members = [ "lib/*",
    "programs/*"
]
resolver = "1"

[workspace.dependencies]
anchor-client = "=0.28.0"
anchor-spl = "=0.28.0"
anchor-lang = "=0.28.0"

solana-address-lookup-table-program = "~1.16.7"
solana-account-decoder = "~1.16.7"
solana-client = "~1.16.7"
solana-logger = "~1.16.7"
solana-program = "~1.16.7"
solana-program-test = "~1.16.7"
solana-rpc = "~1.16.7"
solana-sdk = { version = "~1.16.7", default-features = false }
solana-transaction-status = { version = "~1.16.7" }

mango-v4 = { git = "https://github.com/blockworks-foundation/mango-v4", features = ["client"] }

[profile.release]
overflow-checks = true

[patch.crates-io]
anchor-lang = { git = "https://github.com/coral-xyz/anchor", tag = "v0.28.0" }
anchor-spl = { git = "https://github.com/coral-xyz/anchor", tag = "v0.28.0" }
anchor-client = { git = "https://github.com/coral-xyz/anchor", tag = "v0.28.0" }

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

1 participant