UE 5.6 doesn't compile with Xcode 15.4 on macOS

We have a bunch of modifications but I check this on the release branch in GitHub as well.

The docs for 5.6 say that Xcode 15.2 is the minimum supported version and 15.4 or newer is the recommended version, however the editor doesn’t compile with 15.4.

Are the docs out of date or should the engine build for 15.2 and up?

Some examples from my current build

`In file included from ../Intermediate/Build/Mac/arm64/UnrealEditor/Development/AutoRTFM/Module.AutoRTFM.cpp:3:
In file included from ./Runtime/AutoRTFM/Private/API.cpp:8:
In file included from /Applications/Xcode-15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/random:1689:
… cut to fit character limit …
In file included from /Applications/Xcode-15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__string/char_traits.h:25:
/Applications/Xcode-15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstdio:104:5: error: tried including <stdio.h> but didn’t find libc++'s <stdio.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.

error tried including <stdio.h> but didn’t find libc++'s <stdio.h> header. \

^

/Users/cam/Documents/git/UnrealEngine/Engine/Source/Editor/UnrealEd/Private/Cooker/CookImportsChecker.cpp:125:64: error: declaration shadows a field of ‘FEDLCookChecker’ [-Werror,-Wshadow]
(uint32 Hash, const TArrayFEDLCookChecker::FEDLNodeData& Nodes, FEDLCookChecker::FEDLNodeID ParentNodeID,
^
/Users/cam/Documents/git/UnrealEngine/Engine/Source/Editor/UnrealEd/Private/Cooker/CookImportsChecker.h:240:23: note: previous declaration is here
TArray Nodes;
^
1 error generated.

In file included from ../Intermediate/Build/Mac/arm64/UnrealEditor/Development/UnrealEd/Module.UnrealEd.24.cpp:14:
/Users/cam/Documents/git/UnrealEngine/Engine/Source/Editor/UnrealEd/Private/Cooker/CookImportsChecker.cpp:125:64: error: declaration shadows a field of ‘FEDLCookChecker’ [-Werror,-W
shadow]
(uint32 Hash, const TArrayFEDLCookChecker::FEDLNodeData& Nodes, FEDLCookChecker::FEDLNodeID ParentNodeID,
^
/Users/cam/Documents/git/UnrealEngine/Engine/Source/Editor/UnrealEd/Private/Cooker/CookImportsChecker.h:240:23: note: previous declaration is here
TArray Nodes;
^
1 error generated.`

Steps to Reproduce
I’m using macOS Sonoma.

I’m using xcodes to install 15.4:

  1. Install homebrew from https://brew.sh
  2. Install xcodes using `brew install xcodesorg/made/xcodes`
  3. Install Xcode 15.4.0 using `xcodes install 15.4.0`
  4. Make sure it’s selected `sudo xcode-select -s /Applications/Xcode-15.4.0.app`

To build I’m doing:

  1. Check out the release stream from GitHub, currently 5.6.0-release
  2. `source Engine/Extras/ushell/ushell.sh`
  3. `.build editor`

This seems like a macOS sdk path issue, can you try just compile any c++ code in a brand new xcode project? (No UE involved)

We recommend installing past xcode versions through Apple official site:

Thanks, we are planning on discontinue Xcode 15 support for the next UE release, so PR is probably not necessary at this point. I will contact the doc team to update the min supported Xcode version. Thank you for the report!

Hi Chris,

I uninstalled Xcode 15.4 via xcodes with `xcodes uninstall 15.4`, emptied the trash and then installed it via the .xip file from developer.apple.com link above. I installed into `/Applications/Xcode-15.4` as I also have 16.2 installed to `/Applications/Xcode` and selected 15.4 using `sudo xcodeselect -s /Applications/Xcode-15.4`. However I get pretty much the same build errors as before.

Can you confirm that you are able to build the 5.6 release with Xcode 15.4?

I’ve attached the full build log and my installed sdk versions (not sure if I can have 2 attachments though)

I’ve fixed all of the issues locally. Most of the code that didn’t compile is using parenthesized initialization of aggregates (i.e. structs) which is not supported until Xcode 16. I can make a GitHub PR if it’s desired.