Skip to content
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

Bevy doesn't build on macOS #14956

Open
lynn-lumen opened this issue Aug 28, 2024 · 3 comments
Open

Bevy doesn't build on macOS #14956

lynn-lumen opened this issue Aug 28, 2024 · 3 comments
Labels
A-Accessibility A problem that prevents users with disabilities from using Bevy A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior O-MacOS Specific to the MacOS (Apple) desktop operating system P-Compile-Failure A failure to compile Bevy apps S-Needs-Investigation This issue requires detective work to figure out what's going wrong

Comments

@lynn-lumen
Copy link
Contributor

Bevy version

latest main (#14916)

[Optional] Relevant system information

I am using cargo 1.82.0-nightly (ba8b39413 2024-08-16) on an Apple M1 running macOS Sonoma 14.2.1

What you did

Using the setup mentioned above, bevy does not compile with the following error:
error[E0308]: mismatched types
--> /Users/raphael/.cargo/registry/src/index.crates.io-6f17d22bba15001f/accesskit_macos-0.17.0/src/patch.rs:44:13
|
44 | focus_forwarder as unsafe extern "C" fn(_, _) -> _,
| ^^^^^^^^^^^^^^^ one type is more general than the other
|
= note: expected fn pointer unsafe extern "C" fn(&NSWindow, objc2::runtime::Sel) -> _
found fn pointer unsafe extern "C" for<'a> fn(&'a NSWindow, objc2::runtime::Sel) -> _

For more information about this error, try rustc --explain E0308.
error: could not compile accesskit_macos (lib) due to 1 previous error

I assume this is not bevy's fault but it prevents bevy from being built.

@lynn-lumen lynn-lumen added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Aug 28, 2024
@alice-i-cecile alice-i-cecile added S-Needs-Investigation This issue requires detective work to figure out what's going wrong A-Windowing Platform-agnostic interface layer to run your app in O-MacOS Specific to the MacOS (Apple) desktop operating system P-Compile-Failure A failure to compile Bevy apps A-Accessibility A problem that prevents users with disabilities from using Bevy and removed S-Needs-Triage This issue needs to be labelled labels Aug 28, 2024
@alice-i-cecile
Copy link
Member

I think the next step here is reproducing this on access_kit alone and filing an issue there.

@akimakinai
Copy link
Contributor

Probably this is rust-lang/rust#129285.

@zhaop
Copy link

zhaop commented Sep 12, 2024

I have the same issue on MacOS with rustc 1.82.0-nightly (4074d4902 2024-08-23).

rust-lang/rust#129285 is fixed by rust-lang/rust#129288 on Aug 26 (for rust 1.82.0, which becomes stable on Oct 17).

In the mean time I was able to get Bevy to build again by explicitly choosing rust 1.79.0 (the version in Bevy's Cargo.toml); the latest nightly (I assume any build after 2024-08-26) also works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Accessibility A problem that prevents users with disabilities from using Bevy A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior O-MacOS Specific to the MacOS (Apple) desktop operating system P-Compile-Failure A failure to compile Bevy apps S-Needs-Investigation This issue requires detective work to figure out what's going wrong
Projects
None yet
Development

No branches or pull requests

4 participants