casbin / casbin-rs

An authorization library that supports access control models like ACL, RBAC, ABAC in Rust.
https://casbin.org
Apache License 2.0
861 stars 74 forks source link

macos m1 build error #329

Closed einsli closed 8 months ago

einsli commented 8 months ago

When I use casbin in my code import by this code

casbin = { version = "2.2.0", default-features = false, features = ["runtime-async-std", "cached", "logging"] }

I build my code with the following script

cargo build 

error occurd

rror[E0786]: found invalid metadata files for crate `hashbrown`
 --> /Users/xxx/dashmap-5.5.3/src/iter.rs:9:5
  |
9 | use hashbrown::hash_map;
  |     ^^^^^^^^^
  |
  = note: invalid metadata version found: /Users/xxxx/casbin_demo/target/debug/deps/libhashbrown-a1936faada653aca.rmeta

error[E0786]: found invalid metadata files for crate `parking_lot_core`
 --> /Users/xxxxx/dashmap-5.5.3/src/lock.rs:2:5
  |
2 | use parking_lot_core::{ParkToken, SpinWait, UnparkToken};

My OS is macos 14.2.1 (23C71)

MuZhou233 commented 8 months ago

Have you tried delete target directory and build again?

einsli commented 8 months ago

Have you tried delete target directory and build again?

yes, I delete the target file and build again, but I can still get the error

hsluoyz commented 8 months ago

@einsli you should notice that our macOS builds are passing, see: https://github.com/casbin/casbin-rs/actions/runs/7799476498/job/21270359389 . So I think Casbin-RS supports macOS well and it's your own environment's issue for not building it.

image