Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

cargo test-bpf fails on M1 Mac #17

Closed
ericklind opened this issue May 23, 2021 · 4 comments
Closed

cargo test-bpf fails on M1 Mac #17

ericklind opened this issue May 23, 2021 · 4 comments

Comments

@ericklind
Copy link

I've been trying to set this up per the instructions. Once I run

cargo test-bpf

I get the foll0wing error:
failed to run custom build command for ring v0.16.12`

When I try to update to update it per the seggestion of dev of ring briansmith/ring#1163 by adding

ring = "0.16.19"

to the Cargo.tml, I get the following:

Failed to obtain package metadata: Error during execution of `cargo metadata`:     Updating crates.io index
error: failed to select a version for `cc`.
    ... required by package `ring v0.16.19`
    ... which is depended on by `bpf-program-template v0.1.0 (/Users/erick/Documents/Code/dapp-scaffold/program)`
versions that meet the requirements `^1.0.62` are: 1.0.67, 1.0.66, 1.0.65, 1.0.64, 1.0.63, 1.0.62

all possible versions conflict with previously selected packages.

  previously selected package `cc v1.0.45`
    ... which is depended on by `solana-crate-features v1.6.7`
    ... which is depended on by `solana-sdk v1.6.7`
    ... which is depended on by `bpf-program-template v0.1.0 (/Users/erick/Documents/Code/dapp-scaffold/program)`

failed to select a version for `cc` which could resolve this conflict

How do I move past this? I tied adding:
cc = "^1.0.62"

to the Cargo.toml, and it still has issues:


Failed to obtain package metadata: Error during execution of `cargo metadata`:     Updating crates.io index
error: failed to select a version for `cc`.
    ... required by package `bpf-program-template v0.1.0 (/Users/erick/Documents/Code/dapp-scaffold/program)`
versions that meet the requirements `^1.0.62` are: 1.0.67, 1.0.66, 1.0.65, 1.0.64, 1.0.63, 1.0.62

all possible versions conflict with previously selected packages.

  previously selected package `cc v1.0.45`
    ... which is depended on by `solana-crate-features v1.6.7`
    ... which is depended on by `solana-sdk v1.6.7`
    ... which is depended on by `bpf-program-template v0.1.0 (/Users/erick/Documents/Code/dapp-scaffold/program)`

failed to select a version for `cc` which could resolve this conflict

What can be done to resolve this?

@yasimba
Copy link

yasimba commented Sep 4, 2021

Any update on this?

@goldcoders
Copy link

i guess i better use my archlinux , instead of my mac m1 since this issue is still not resolve?

@chrisckwong821
Copy link

same issue... seems something daunting enough to switch to a linux box.?

@thomnico
Copy link

thomnico commented Feb 4, 2022

I have it working after upgrading to 1.9.5 in Cargo.toml
solana-program = "1.9.5"
solana-validator = { version = "1.9.5", optional = true }

On M1

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

No branches or pull requests

6 participants