Closed hedonhermdev closed 1 month ago
If it helps, I'm also running this in a nix environment.
Works for me without nix. Can you check?
Is the AdapterInfo
output I see as expected? Am I supposed to see something in the driver output?
I am unable to compile the app when I try without Nix. I get an AudioInit/AudioInit.h
missing error.
process didn't exit successfully: `/Users/tirthjain/src/bevy/first/target/debug/build/coreaudio-sys-837c466b273fcef0/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=CoreAudio
cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS
--- stderr
/Users/tirthjain/.cargo/registry/src/index.crates.io-6f17d22bba15001f/coreaudio-sys-0.2.13/coreaudio.h:1:10: fatal error: 'AudioUnit/AudioUnit.h' file not found
thread 'main' panicked at /Users/tirthjain/.cargo/registry/src/index.crates.io-6f17d22bba15001f/coreaudio-sys-0.2.13/build.rs:150:39:
unable to generate bindings: ClangDiagnostic("/Users/tirthjain/.cargo/registry/src/index.crates.io-6f17d22bba15001f/coreaudio-sys-0.2.13/coreaudio.h:1:10: fatal error: 'AudioUnit/AudioUnit.h' file not found\n")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Hmm, tried on a fresh user profile without nix, seems to work. Will try to isolate the issue on the nix end.
I have the same problem without nix.
The problem only appears when I have
[profile.dev.package."*"]
opt-level = 3
opt-level
= 0, 1 and 2 work fine.
Also got a segfault on startup, M2 Max.
@sergeypdev's suggestion worked, but also switching from nightly to stable worked (while having opt-level = 3).
Also, not using nix, and on Sonoma 14.1. sccache.
Same here (I'm also using Nix, but not in this particular project - there's just Nix installed on my system, but no flake.nix etc. in the project's directory).
edit: works in debug mode, though!
Seems to have been reported at https://github.com/rust-lang/rust/issues/117902 - the recent working toolchain is nightly-2023-10-18
.
Edit: it looks like disabling cross-crate inlining "solves" the issue, i.e.:
RUSTFLAGS='-Zcross-crate-inline-threshold=0' cargo run --release
Running into this with dexterous_developer as well - for now lowering the optimizations on bevy, but looking forward to a resolution.
Just updated nightly: rustc 1.76.0-nightly (a96d57bdb 2023-12-15) (from rustc 1.76.0-nightly (a57770440 2023-11-16))
.. and the segfault went away when using opt-level = 3
Looks like the related issue is fixed: https://github.com/rust-lang/rust/issues/117902#issuecomment-1858840328
@alice-i-cecile should probably close this as stale, unable to reproduce, an upstream/rustc problem, solved, or some combination thereof. :)
Bevy version
bevy = "0.12.0"
Relevant system information
What you did
Tried running code from the tutiorial. I think this is the minimum version of the code that fails for me. I am not very familiar with the ecosystem but happy to help isolate the issue further.
What went wrong
Bevy app segfaults after printing a single line of tracing log.
Running with
lldb
seems to be helpful in isolating the issue towgpu_core