Cannot build on Mac Ventura with Xcode 14

With Apple’s new policy regarding their App Store submissions, I upgraded my Mac to the new Ventura OS and Xcode 14. Unfortunately I cannot get the source build for either 4.27 or 5.0 (or 5.1.1) to build at all in Xcode 14.

Has anyone been able to get it to work? I have an intel processor MacBook Pro.

I have the same project on a separate partition of my Mac running Monterey and Xcode 13 and it runs perfectly fine.

1 Like

I am having the same issue. I think my mac updated automatically over the weekend and this morning it won’t build anymore.
It has started with this error:


Saying that the sdk is not found. I’ve downloaded the 13.1 sdk from here: Release 13.1 · joseluisq/macosx-sdks · GitHub and placed it in the right place.
Now I am getting this error in multiple files:

0>/Users/john/Repos/UnrealEngine/Engine/Source/Runtime/Core/Public/UObject/NameTypes.h:541:10: Error : use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
And
0>/Users/john/Repos/UnrealEngine/Engine/Source/Runtime/Core/Public/UObject/NameTypes.h:536:10: Error : use of bitwise '&' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
I’ve tried manually fixing this for this file but it kept appearing in other files as well.

I am using MacOS 13.2.1 (22D68) with xcode 14 as well.
Does anyone know how to supress these errors?

Edit:
Adding this in Engine/Source/Programs/UnrealBuildTool/Platform/Mac/MacToolChain.cs inside the function string GetCompileArguments_Global(CppCompileEnvironment CompileEnvironment)

			if (GetClangVersion().Major >= 14)
			 {
				Result += " -Wno-error=bitwise-instead-of-logical";
				Result += " -Wno-error=deprecated-declarations";
				Result += " -Wno-error=unqualified-std-cast-call";
			 }	

Seems to get read of the compiler errors, but I’ve got a new error now.

Undefined symbols for architecture x86_64: "bool UPrimitiveComponent::ConvertRotationOverlapsToCurrentOverlaps<TInlineAllocator<3u, TSizedDefaultAllocator<32> > >(TArray<FOverlapInfo, TInlineAllocator<3u, TSizedDefaultAllocator<32> > >&, TArrayView<FOverlapInfo const, int> const&)", referenced from: TOptional<TArrayView<FOverlapInfo const, int> > FScopedMovementUpdate::GetOverlapsAtEnd<TInlineAllocator<3u, TSizedDefaultAllocator<32> > >(UPrimitiveComponent&, TArray<FOverlapInfo, TInlineAllocator<3u, TSizedDefaultAllocator<32> > >&, bool) const in Module.Engine.12_of_48.cpp.o ld: symbol(s) not found for architecture x86_64 0>clang: Error : linker command failed with exit code 1 (use -v to see invocation)

2 Likes

@JohnHotShot
Thank you for sharing your fix! It works! However, I also encountered the linker problem you mentioned. Have you found a solution to the linker problem? Thank you again!

I had the same issue.

I had the same linker problem by looking at the comments and working on it.

It was resolved by applying the fixes below.

https://github.com/EpicGames/UnrealEngine/commit/0b07894ce453d3dab72afd037b9d7fa5fe82c090

@kdang Thanks for the information. I tried to apply the changes in the commit you mentioned but had no luck. Could you elaborate on your modification details? Thank you in advance!

@mixer76
I just downloaded and applied all of the files (Mac ToolChain.cs, XcodeProject.cs) with changes applied.

https://github.com/EpicGames/UnrealEngine/blob/0b07894ce453d3dab72afd037b9d7fa5fe82c090/Engine/Source/Programs/UnrealBuildTool/Platform/Mac/MacToolChain.cs

https://github.com/EpicGames/UnrealEngine/blob/0b07894ce453d3dab72afd037b9d7fa5fe82c090/Engine/Source/Programs/UnrealBuildTool/ProjectFiles/Xcode/XcodeProject.cs

And I modified the “MactoolChain.cs” file again.
as-is :
string GetCompileArguments_Global(CppCompileEnvironment CompileEnvironment)
{
string Result = “”;

// Xcode 13.3 / Apple Clang 13.1.6 new flags
// Apple Clang binary releases are proprietary closed source different from open source clang versions
// See also ClangToolChain.cs in UE5
if (GetClangVersion() >= new Version(13, 1, 6))
{
Result += " -Wno-unused-but-set-variable";
Result += " -Wno-unused-but-set-parameter";
Result += " -Wno-ordered-compare-function-pointers";
}

to-be :
string GetCompileArguments_Global(CppCompileEnvironment CompileEnvironment)
{
string Result = “”;

if (GetClangVersion() >= new Version(13, 1, 6))
{
Result += " -Wno-unused-but-set-variable";
Result += " -Wno-unused-but-set-parameter";
Result += " -Wno-ordered-compare-function-pointers";
Result += " -Wno-error=bitwise-instead-of-logical";
}

I hope this helps.

2 Likes

@kdang Thanks a lot! It works! With the instructions you provided, I manged to compile and run UE 4.27.2 on my Macbook Pro 2023 (M2 Max) with macOS Ventura 13.3.1(a), Xcode 14.3. Thank you again!

Thanks to everyone for the support, I have managed to build it out using a number of different methods. First, thank you @kdang for your help. That absolutely worked. However, there was a bit of debugging I had to do to make it work. But that could be because I am dumb. That said, thank you again, it did work.

Another solution that I found, that ended up working too (I built out two versions on separate Macs) was to use the 4.27 plus branch on Unreal’s GitHub. Basically follow the regular instructions for the 4.27 build in the documentation using this branch and it was done.

Again, I tried both and they both worked. Hope that helps others.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.