-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Add early support for Apple Silicon (M1) build #5086
base: master
Are you sure you want to change the base?
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update our CHANGELOG.md based on your changes. |
Hey, I'm building on my 2020 13 inch M1 MacBook Pro on macOS 12.3.1
I got around this error by using the auto-installer at https://www.mono-project.com/docs/about-mono/supported-platforms/macos/ I was able to build and install the UE4 branch by downgrading from Xcode 13.3 to 13.2.1 'make LibCarla' succeeded without issue,
'make check' fails with three copies of the following error
Any help or advice would be greatly appreciated, thanks! :) |
Hi, not sure why you are getting this problem with mono, but it seems like you found an alternative. Conda might be giving problems if you are using an x86 version (or building Python for x86), so make sure all the python builds are in arm64 mode. To do this follow the documentation here (at the bottom) where I discuss how to build LibCarla in x86 and arm64 mode. |
Hey, I tried to install again, starting with another system wipe and os reinstall. I was able to fix the issue when building the PythonAPI, and I'm pretty sure the issue is with the version of I double and triple checked that I built everything in the correct architecture, and that wasn't the problem. Rather embarrassingly, I missed point 5 under the BUILD CARLA section of the doc. I installed the built module with I would recommend adding a comment in the docs after the Once again, thanks for an amazing patch, your work is greatly appreciated and very helpful :) |
brew install --build-from-source mono failed :
mono: mono-6.12.0.122 I post a comment here: mono/mono#10016 (comment) |
Hi Gustavo, Ive tried to build with your patches both in Carla and Unreal. I'm running on MacBook Pro x86 |
First off, these patches are specifically for getting carla to build on the m1/m2 devices (Apple silicon) but as long as you followed the directions to build PythonAPI/CarlaUE4 for x86-64 (as if it were running through rosetta) then I guess this works. Anyways, make sure to check your CPU utilization when the Editor is stuck at 95%, it is normal for on the first build this utilization to be high as UE4 will be compiling shaders and cooking assets prior to opening the scene. So TL;DR: just wait it out, it shouldn't take longer than 30m and its only on the first time you open Carla (building caches) Another thing you can try to test otherwise is |
yes you are right, after finishing my lunch the editor works but is still building |
Intel processor. Changes should be compatible with apple M1. - Tested in a MacBook pro 2019 with Intel and AMD Radeon dedicated graphic card. - fixed broken URL for the `XERCESC_REPO` variable in Util/BuildTools/Setup.sh script. - Added comments to the Mac compilation document.
Fixed issues compiling with Xcode 14 in MacOSX Ventura and Intel processor.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Description
There are several reasons why one might want to build CARLA on the M1 devices, not least of which is the incredible performance they house in a tiny form-factor. Here I present some changes that I needed to build CARLA on my M1 MAX machine.
.sh
scripts asUnix
build scriptsmake LibCarla && make launch && make package
inx86_64
Apple (Run on rosetta)make LibCarla && make PythonAPI && make check
inarm64
(runs natively)Fixes #150 (but specifically for M1 devices)
Where has this been tested?
Possible Drawbacks
x86_64
mode-ljpeg
and-ltiff
for nowmake LibCarla
twice, once inx86
mode and once inarm64
modeThis change is