-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
coreaudio-sys compile fails on MacOS due to LLVM change; cannot build bevy #10274
Comments
Damnit, this was my cargo.lock |
I had the same issue and can confirm that running |
I can't get this to work. I've run right now my [package]
name = "globe-bevy"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
bevy = "0.12.0"
coreaudio-sys = "0.2.12"
# Enable a small amount of optimization in debug mode
[profile.dev]
opt-level = 1
# Enable high optimizations for dependencies (incl. Bevy), but not for our code:
[profile.dev.package."*"]
opt-level = 3 I've also tried
Compiling coreaudio-sys v0.2.14
error: failed to run custom build command for `coreaudio-sys v0.2.14`
Caused by:
process didn't exit successfully: `/Users/casey/Dev/ezkl-work/globe-bevy/target/debug/build/coreaudio-sys-9a5602721b8610bb/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=COREAUDIO_SDK_PATH
cargo:rustc-link-lib=framework=AudioUnit
cargo:rustc-link-lib=framework=AudioToolbox
cargo:rustc-link-lib=framework=CoreAudio
cargo:rustc-link-lib=framework=OpenAL
cargo:rustc-link-lib=framework=CoreMIDI
cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS
--- stderr
thread 'main' panicked at /Users/casey/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.69.1/lib.rs:620:31:
Unable to find libclang: "the `libclang` shared library at /opt/homebrew/opt/llvm@15/lib/libclang.dylib could not be opened: dlopen(/opt/homebrew/opt/llvm@15/lib/libclang.dylib, 0x0005): tried: '/opt/homebrew/opt/llvm@15/lib/libclang.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/llvm@15/lib/libclang.dylib' (no such file), '/opt/homebrew/opt/llvm@15/lib/libclang.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/opt/homebrew/Cellar/llvm@15/15.0.7/lib/libclang.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/llvm@15/15.0.7/lib/libclang.dylib' (no such file), '/opt/homebrew/Cellar/llvm@15/15.0.7/lib/libclang.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
[toolchain]
channel = "nightly"
components = ["rustfmt", "clippy"]
targets = ["aarch64-apple-darwin"] rust-analzer output error logs:
|
Try removing the homebrew installed llvm from your path. It’s an annoyance, but I did see that suggested in one of the earliest GitHub issues about this problem. Also, I’d take a look at |
@dmlary Thanks for the response! Someone in Discord #jam-voice-1 totally bailed me out 🙌 I think there were a couple issues. One with the path, or order of stuff in my path causing llvm 15 (not 17) to be in use. and the wrong default for |
Can confirm |
Bevy version
HEAD of master branch (a830530)
Relevant system information
MacOS Ventura 13.6.1, but more importantly LLVM v15.0.0 (system version for ventura).
What you did
cargo build
What went wrong
Cannot build bevy on MacOS. Build fails on
coreaudio-sys
with the following output:The key piece is
enum_(unnamed_at_/Library/Developer/CommandLineTools/SDKs/MacOSX_sdk/usr/include/MacTypes_h_382_1)" is not a valid Ident
.This is happening because LLVM changed the output for unnamed types, as a result bindgen generates invalid code. There's an issue describing the problem, and says it is resolved in bindgen v0.62. coreaudio-sys v0.2.12 updates to bindgen v0.64 1.
Additional information
I've confirmed that coreaudio-sys v0.2.11 will not build stand-alone on my macos system. This is after removing all additional LLVM installs, removing and reinstalling xcode & xcode command-line tools.
When I update to coreaudio-sys v0.2.12 (commit ad6cac44), I am able to build the crate with a few warnings, but it works.
Footnotes
https://github.com/RustAudio/coreaudio-sys/pull/86 ↩
The text was updated successfully, but these errors were encountered: