mohanson / gameboy

Full featured Cross-platform GameBoy emulator by Rust. Forever boys!.
MIT License
1.36k stars 79 forks source link

在M1芯片的macOS下编译报错 #32

Open heropoo opened 3 years ago

heropoo commented 3 years ago

cargo run --release -- "./res/boxes.gb"

Compiling coreaudio-sys v0.2.2
error: failed to run custom build command for `coreaudio-sys v0.2.2`

Caused by:
  process didn't exit successfully: `/Users/my/Projects/gameboy/target/release/build/coreaudio-sys-8d0fefacc2d2969d/build-script-build` (exit code: 101)
  --- stdout
  cargo:rustc-link-lib=framework=AudioUnit
  cargo:rustc-link-lib=framework=CoreAudio

  --- stderr
  error: header '/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudio.h' does not exist.
  thread 'main' panicked at 'unable to generate bindings: ()', /Users/my/.cargo/registry/src/github.com-1ecc6299db9ec823/coreaudio-sys-0.2.2/build.rs:144:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
mohanson commented 3 years ago

看起来应该向 coreaudio-sys 提交错误报告.

heropoo commented 3 years ago

刚去找个库的issue找了找 https://github.com/RustAudio/coreaudio-sys/issues/47#issuecomment-759854841 已经在0.2.8的版本修复了。我看Cargo.lock中coreaudio-sys版本是0.2.2 。 然后我删掉Cargo.lock,编译成功了。