-
-
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
Apple Silicon support #928
Comments
Good to know. We might be able to work around this by using shaderc on the |
which can be done around here if someone with a new Mac wants to try (adding the arch at the same place of the iOS target is checked for, and also probably a few changes in the crate too) |
@cart 11.0 Big Sur can be added to the CI as the preview had been added but, I'm not entirely too sure if it actually is compiling to the ARM target or not. It should be able to else ARM chip Apple would've had nothing at launch haha. Would be a good idea to add that target to shaderc and trying to build an ARM example for Big Sur as a new CI much like Android. |
Update: https://blog.rust-lang.org/2020/11/27/Rustup-1.23.0.html <- M1 support just released it looks like.
Looks like you must compile with the |
I opened a pull request that enables shaderc for Apple Silicon targets. All we need besides that is a new version of winit published! rust-windowing/winit#1789 |
#1027 has merged. Now we wait for rust-windowing/winit#1793 |
Alright, this should be the last pull request needed for Apple Silicon support: #1043 |
Great work everyone! |
Dang I thought #1027 had shaderc working on m1s |
Well, I'm planning to reinstall my operating system and set up everything again tonight. Maybe this will help o_o |
@enfipy Do you get the same error? |
@frewsxcv Finally I managed to reinstall macOS and got the same error. Steps to reproduce this error on a clean M1 device:
The last time I tried to install |
What happens if you install the ARM version of |
What is the right way to install cmake for ARM? Result for
|
Do you have Homebrew installed? If so, |
Now got this error:
|
I've definitely had a Unfortunately I can't really reproduce the failure anymore, running |
@darthdeus Tested on 1.49.0 stable with and without Tried to build with rust 1.51.0 nightly but still with that error. Command cmake version 3.19.3
CMake suite maintained and supported by Kitware (kitware.com/cmake). Also, installed it with |
What does |
@bjorn3 It results in:
|
I'm on an M1 Macbook Air and trying to make sense of this. I was using the 0.4.0 bevy crate in my project, no problem. Trying to identify the cause, I added this to the .toml of my project:
This shouldn't make a difference, as I'm depending on bevy_render, which also contains this. My cmake is an universal binary:
This is the error I get from shaderc-sys:
It could be that my project was before, for some reason, running under rosetta? I'm not sure. |
Aha. My VS Code is running under arch @enfipy What terminal are you using? Could it be running under rosetta? Try the |
@ostwilkens Wow, it worked as I made |
I'm running into the exact same error as enfipy above. I'm using the arm64 version 3.19.6 of cmake installed via homebrew and I'm using the nightly version of the rust toolchain. I'm very much new to coding and am not sure where to go from here. Was wondering if I could get some help. |
i think this also works
|
I'm having problem with the audio [dependencies]
bevy = "0.5.0"
rand = "0.7.3"
|
coreaudio-sys uses rust-bindgen for generating rust bindings from the C headers. Rust-bindgen requires libclang to be available. You can use |
I have already installed llvm 12 via |
It seems like rustc and libclang are compiled for different cpu architectures. Are you using an x86_64 or AArch64 rustc installation? And did brew install an x86_64 or AArch64 version of libclang? I think you can use |
I think with M1, you need your whole build chain to be in the same architecture. If you use a terminal or an IDE to trigger your build that's not AArch64, it will try to fall back for everything on x86_64 which may fail |
Try |
Building, not sure how long it will take. Hopefully it will solve the problem |
It seems to find the system wide clang as default. How can I change it to the one I previously compiled?
|
Bevy version
01ba7c4
Operating system & version
macOS Big Sur 11.0.1
What you did
Ran
cargo run --example breakout
What you expected to happen
I expected the example to compile and run.
What actually happened
The example failed to compile with the following error
The text was updated successfully, but these errors were encountered: