Skip to content

Dependency openbook v2 problem #958

@Panda404NotFound

Description

@Panda404NotFound

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions