UE5 for M1 Apple Silicon

Hi, tell me please. do you know the solution to this problem? Xcode 13.4.1 Pro M1. Thanks!

I was having the same problem but it was an issues in the code. they just add new commits which seem to fix the problem for me.

-Fix build, rebuild arm64 Mac architecture for MTLPP
-Update enum used by the Metal RHI

So you could try git pull the lastest but since new code could break it again here is the commit I use to compile from code.

commit e88908fda4f8b1f2f4c401b1c2403625346ea545 (HEAD → ue5-main, origin/ue5-main)
Author: ben hoffman ben.hoffman@epicgames.com
Date: Tue Jun 28 11:47:26 2022 -0400

1 Like

Seeing as UE5 now natively supports Apple silicon, can you redo the Nanite comparison to see how it has improved?

2 Likes

I now have the Unreal Editor running as an Apple Silicon app, however the ShaderCompilerWorker is still Intel! :slight_smile: So no real speedup to compiling shaders yet.

I’m not sure all the information in this thread is correct. I downloaded the ue5-main branch last night and built from source (in 2.5h) on my M1 Max. Running the engine, the startup time was still painfully slow with multiple instances of ShaderCompiler pegging my CPU.

Looking in the Engine/Binaries/Mac folder and running file ShaderCompilerWorker shows that most of the underlying binaries of UE5 are still x86_64 not arm64. Which explains why I didn’t notice any improvement on these shader compile times.

Another bit worth noting is that Metal 3 supports shader precompilation for Apple devices which could potentially help this start up time? Though I suppose these shaders are in the Unreal shader format so maybe not.

2 Likes

I’m using a M1 Max too and normally take me about 45 minutes for UE5 build.

The ShaderCompilerWorker get actually compile for arm64 but I notice there is a bug in the build system when building the Editor, the flag for arm64 doesn’t get passed so it rebuild the ShaderCompilerWorker for x86_64.

A quick workaround is to open XcodeBuild.sh and on line: 106 replace it with this online (I just add the arm64 flag)

dotnet Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.dll ShaderCompileWorker Mac Development -architecture=arm64

I’m learning Metal so I’m kind of new to this but base on my newbie understanding precompilation is more for when you shipping the product to customers. As developer in this case Unreal Source, you have to compile them but if you shipped a game those get precompile so the end user have a fast loading experience.

6 Likes

Does your version of UE5 allow you to instal the new metahuman plugin for the Mac? Or does it still say ‘unavailable’? I can’t seem to be able to instal it and apparently it’s not ready for the mac

I’m kind of new so I’m learning the basics haven’t gotten to Metahumans yet but a quick search in the code shows that they have disabled the plugin for mac-arm for now until they figure out how to make it work.

But you can remove the plugins from the disabled list and give it a try maybe it’s working now.

Here are the file and lines:

/Engine/Source/Programs/UnrealBuildTool/Platform/Mac/UEBuildMac.cs, line: 144 and 145.

// Mac-Arm todo - Do we need to compile in two passes so we can set this differently?
			bool bCompilingForArm = Target.Architecture.IndexOf("arm", StringComparison.OrdinalIgnoreCase) >= 0;
			bool bCompilingMultipleArchitectures = Target.Architecture.Contains("+");

			if (bCompilingForArm)
			{
				Target.DisablePlugins.AddRange(new string[]
				{
					// onnx:
                    ...
					"MetaHumanAnimator",
					"MetaHumans",

Thanks so much for the info. unfortunately i’m super new too, I wouldn’t even know where to begin about downloading the code and then removing those lines.

Any thoughts on how to get the Lyra Starter Game to load with this Apple Silicon setup? I keep getting a bunch of errors when I try to open the project with the source build, though it opens fine with an installed build.

So I spend a little bit of time looking at it and I don’t think it’s related to Apple Silicon but to Version 5.1.

My best guess is that Lyra Starter Game was build way before UE5 was release and now in version 5.1 they are cleaning up the source code and a lot of the code Lyra was build on its been deprecated.

/Engine/Source/Runtime/Core/Public/Misc/CoreMiscDefines.h:232:43: note: expanded from macro 'UE_DEPRECATED'

#define UE_DEPRECATED(Version, Message) [[deprecated(Message " Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.")]]

Engine/Source/Runtime/CoreUObject/Public/AssetRegistry/AssetData.h:109:2: note: 'AssetClass' has been explicitly marked deprecated here
        UE_DEPRECATED(5.1, "Class names are now represented by path names. Please use AssetClassPath.")

They will have to update Lyra code again for 5.1

1 Like

Does there any timeline on when will official release M1 arm version?

5 Likes

I haven’t seen any official release date information or even what features are been built by version.

The little I know is because community members found it by either running the source code or reading the commit message on GitHub.

New commit message today: Add Arm64 support for Mac builds.

This updates the InstalledEngineBuild.xml file so its safe to say we’ll see an ARM64 version downloadable from the launcher when 5.1 is released!

11 Likes

I’m able to build the engine for M1, but when I launch the editor using the .app file, it says that “Plugin Iris couldn’t be found”. Do you know any workaround?

what I normally do is that I keep two clone repositories and update one of them every other day because it’s an active development branch things will start breaking real quick.

the fastest fix you can do is to check out a commit from a day or two ago. It’s faster than debugging or git pull by the end of the day, I saw some fixes they just commit for building the modules.

Well, clang is now failing on M1 Max. I guess we have to wait till the nice guys working in Epic Games fix all the issues, or get the code from a couple of days ago.
Thanks, anyway :slight_smile:
This is the issue, just in case someone cares about it:
node_attr_utils.cc.o
onnxruntime::fbs::utils::LoadAttributeOrtFormat(onnxruntime::fbs::Attribute const&, onnx::AttributeProto&, std::__1::unique_ptr<onnxruntime::Graph, std::__1::default_deleteonnxruntime::Graph >&, onnxruntime::Graph&, onnxruntime::Node&, onnxruntime::logging::Logger const&) in graph_flatbuffers_utils.cc.o
ld: symbol(s) not found for architecture arm64

this is the commit I’m using and it’s work fine in case you don’t want to wait.

just git checkout this commit and you will be able to build.

commit c545105b3ab5621b4e6ba4ff0d0833b85265d83a (HEAD -> ue5-main, origin/ue5-main)

3 Likes

I got to compile it for my macbook pro 2020 apple m1,
It took over 5 hours to compile. The framerate is still somewhere between 10-20 fps but it feels more smoothly right now.

Am really hoping for UE 5.1 ! Does there any time estimated will release?