metaplex-foundation / metaplex

A directory of what the Metaplex Foundation works on!
https://metaplex.com
Apache License 2.0
3.32k stars 6.26k forks source link

#[global_allocator] conflicts with global allocator in: metaplex_token_metadata #2232

Closed SkyYap closed 2 years ago

SkyYap commented 2 years ago
sky@Sky:/mnt/c/Users/sky/StakingSolanaProgram$ anchor build
BPF SDK: /home/sky/.local/share/solana/install/releases/1.10.32/solana-release/bin/sdk/bpf
cargo-build-bpf child: rustup toolchain list -v
cargo-build-bpf child: cargo +bpf build --target bpfel-unknown-unknown --release
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /mnt/c/Users/sky/StakingSolanaProgram/programs/StakingSolanaProgram/Cargo.toml
workspace: /mnt/c/Users/sky/StakingSolanaProgram/Cargo.toml
   Compiling StakingSolanaProgram v0.1.0 (/mnt/c/Users/sky/StakingSolanaProgram/programs/StakingSolanaProgram)
error: the `#[global_allocator]` in this crate conflicts with global allocator in: metaplex_token_metadata

error: could not compile `StakingSolanaProgram` due to previous error

722 Found this thread but issue above can't be fixed by adding features = [ "no-entrypoint" ]

SkyYap commented 2 years ago

I fix it by adding metaplex-token-metadata = { version = "0.0.1", features = ["no-entrypoint"] }

Doesn't know why previously it shows compile error for me.