-Wdeprecated-builtins Error when trying to build UE4 on Xcode 15.0.1

Hey guys,

We have been trying to create a mac build for our project that’s currently using UE4 Version: 4.25.4 and have been facing the following error.

/Users/Shared/Epic Games/UE_4.25/Engine/Source/Runtime/Core/Public/Templates/IsTriviallyDestructible.h:18:18: builtin has_trivial_destructor is deprecated; use is_trivially_destructible instead [-Werror,-Wdeprecated-builtins]

I have tried to suppress the warning without much luck. Has anyone else been able to get their ue4 project to build on the latest Xcode?

Would it be possible to suppress the warning or would we have to upgrade to a certain version of UE4 or UE5?

Thank you!

Hello !
Same issue on my end. No news about a potential fix ?
I am currently using UE4.27.2 on macOS Sonoma and I am getting the same errors.
What about downgrading the version of Xcode to 14.X (where X is a minor version of the 14th) ? Hopefully this version is still supported on macOS Sonoma and does not have this deprecation message.

You can find older versions of Xcode on the dev portal I believe.
Tell me if it helped !
Good luck !

Hello, it’s me again :slight_smile:
I have fixed the error @fugratwhistle. It is actually some kind of work around but seems to be functional. To disable those warnings, download from Apple’s developer download center Xcode 13.4.1. Extract the .xip file into the downloads folder.

When the extract is complete, you will probably see a prohibited symbol on Xcode’s icon. Don’t run directly Xcode from the .app directly but navigate through the package and launch the file « Xcode » located inside « Contents/MacOS/Xcode ». The older version of Xcode should be now launching.

From there, follow up the instructions to install desired packages (Should be macOS and iOS for compilation support for those target architectures). If the app suddenly exits, reopen it from the directory mentioned above until you see the home page where you can create a new project.

If you have reached this point, the main process is almost done. One step remains :
Open Terminal.app and type in the following command

sudo xcode-select --switch-version <appPath of your Xcode 13 installation>

Note : sudo mode is required to use xcode-select command while changing the selected version of the command line tools.

WARNING the path you need to enter here is the full path to the .app file where Xcode 13 is located. For example, if Xcode 13 is installed in the downloads folder, the path should be : “…/downloads/Xcode.app” only.

If the command executed successfully after you entered your administrator password, you can close the Terminal.

Now launch again your Unreal Engine project, and everything should be fine !
Note : don’t worry about new shader compilation because they need to be compiled with the new command line tools.

When those shaders has been built, package your project for macOS and all the warnings should have been gone !

I hope this will help you, because it definitely solved my issue.
Have a nice day.

Hi, thanks for this, even if I went through with the Xcode 13, AppStore requirements are with Xcode 15…

I opened a thread about build with the new update Xcode 15 requirements.

If anyone has any other ideas, would be grateful: UE4 Xcode 15 remote build fails due to many warnings

Thanks!

I was able to get the UE4.25 editor running on Sonoma using Xcode 15!

Resolving -Werror and -Wdeprecated-builtins Errors

Xcode’s suppressions and compiler flags won’t work here; it turns out they need to be added in your project’s target.cs files.

I added this to both my [projectname]Editor.Target.cs and [projectname].Target.cs (Not sure if the latter is needed, but I did it just to be safe.)

if (Target.Platform == UnrealTargetPlatform.Mac)
{
	bOverrideBuildEnvironment = true;
	AdditionalCompilerArguments = "-Wno-error -Wno-deprecated-builtins";
}

So, for instance, my [projectname]Editor.Target.cs looks like this:

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.Collections.Generic;

public class ProjectNameEditorTarget : TargetRules
{
	public ProjectNameEditorTarget(TargetInfo Target) : base(Target)
	{
		if (Target.Platform == UnrealTargetPlatform.Mac)
		{
			bOverrideBuildEnvironment = true;
			AdditionalCompilerArguments = "-Wno-error -Wno-deprecated-builtins";
		}
		Type = TargetType.Editor;
		ExtraModuleNames.Add("ProjectName");
	}
}

You can get away with only adding the “-Wno-error” flag (which prevents warnings from generating errors) but your console will be flooded with “deprecated builtin” warnings, so I added both to make my console cleaner.

Missing MultitouchSupport Framework Error

If you get an error along the lines of clang: error: no such file or directory: '/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/Current/MultitouchSupport', you can resolve it by doing a little tweak to the engine’s .cs files.

This was fixed in UE4.26(?). If you’re not experiencing this error then ignore this section.

First, go to your engine’s install (e.g. /Users/Shared/Epic Games/UE_4.25/), and then open Engine/Source/Runtime/ApplicationCore/ApplicationCore.Build.cs. Look for the line:

PublicAdditionalLibraries.Add("/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/Current/MultitouchSupport");

and replace it with:

string SDKROOT = Utils.RunLocalProcessAndReturnStdOut("/usr/bin/xcrun", "--sdk macosx --show-sdk-path");
PublicAdditionalLibraries.Add(SDKROOT + "/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/Current/MultitouchSupport.tbd");

And then save. You may get prompted that these files are locked or something. Go ahead and overwrite it/unlock it.

Next, open Engine/Source/Runtime/Core/Core.Build.cs, find the line:

PublicAdditionalLibraries.Add("/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/Current/MultitouchSupport");

and replace it with:

string SDKROOT = Utils.RunLocalProcessAndReturnStdOut("/usr/bin/xcrun", "--sdk macosx --show-sdk-path");
PublicAdditionalLibraries.Add(SDKROOT + "/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/Current/MultitouchSupport.tbd");

And save. Once again, overwrite/unlock it.

“Log messages may be missing. If this issue persists, try setting IDEPreferLogStreaming=YES”

You may get this error when trying to launch the editor through Xcode.

To resolve this,

  1. Go to the top of Xcode
  2. Click Product>Scheme>Edit Scheme
  3. Under the “Run” scheme, click “Arguments”
  4. Go to “Environment Variables”
  5. Click the “+” button and add IDEPreferLogStreaming and set the value to YES.

This will allow UE4 to print to the console while it’s launching, and can help you see what’s going on during the eternal “Initializing” screen where it’s building shaders.

“PCH was compiled with module cache path” Error

After all this, my editor was crashing during the Initializing screen. It would happen after it finished compiling shaders at 18%.

I’m not entirely sure what steps I did to resolve this, but I’d recommend trying the following:

  • Delete the ModuleCache folder listed in the error (Located somewhere in /var/folders)
  • Delete your DerivedData folder (If you’re unsure where this is, go to Xcode>Settings>Locations and it should be listed there)
  • Go to your engine config folder (e.g. /Users/Shared/Epic Games/UE_4.25/Engine/Config), open up ConsoleVariables.ini and uncomment r.ShaderDevelopmentMode=1, r.Shaders.Optimize=0, and r.Shaders.KeepDebugInfo=1 (this may or may not have done anything)

You can also try deleting your project’s Build and Intermediate folders along with re-generating your project’s xcode workspace file. I had also tried reinstalled xcode, but that didn’t seem to do anything.

Only deleting the ModuleCache folder resulted in an error about missing a metal_types pcm file. I was able to fix this by deleting the DerivedData folder and relaunching Xcode.

Hope this helps!

1 Like

Thanks. Your post save me some headache while migrating to xcode 15 for my UE 5.1.1 app due to iOS SDK 17 requirement from app store.

1 Like

Thanks! Samething here!

1 Like