Error when creating architecture project in 4.25-"Failed to extract Metal compiler search directories"

Error when creating architecture project in 4.25-“Failed to extract Metal compiler search directories”

I’m simply trying to create a project and each time get the same error, detailed below. I’m incredulous that something so basic could return an error like this. No clue whatsoever for how to interpret this or work around it. Also, my search in this forum did not yield a solution.

System
Unreal 4.25.0
OSX Catalina (10.15.4)

Error summary
“Failed to extract Metal compiler search directories”

Full output

Fatal error:
[File:/Users/build/Build/++UE4+Licensee/Sync/Engine/Source/Developer/Apple/MetalShaderFormat/Private/MetalShaderCompiler.cpp]
[Line: 716] Failed to extract Metal
compiler search directories

FGenericPlatformMisc::RaiseException(unsigned
int) Address = 0x10e543a17 (filename
not found) [in UE4Editor-Core.dylib]
FMacErrorOutputDevice::Serialize(char16_t
const*, ELogVerbosity::Type, FName
const&) Address = 0x10e6dac23
(filename not found) [in
UE4Editor-Core.dylib]
FOutputDevice::LogfImpl(char16_t
const*, …) Address = 0x10e7bf689
(filename not found) [in
UE4Editor-Core.dylib] auto
SingleCompilerSetup(EAppleSDKType)::$_23::operator() char16_t
[52]>(FLogCategoryLogMetalShaderCompiler
const&, char16_t const (&) [52]) const
Address = 0x164b6b50d (filename not
found) [in
UE4Editor-MetalShaderFormat.dylib]
SingleCompilerSetup(EAppleSDKType)
Address = 0x164b6ae51 (filename not
found) [in
UE4Editor-MetalShaderFormat.dylib]
BuildMetalShaderOutput(FShaderCompilerOutput&,
FShaderCompilerInput const&, FSHAHash
const&, unsigned int, char const*,
unsigned int, unsigned int, unsigned
int, unsigned char, char16_t const*,
char16_t const*, EMetalTypeBufferMode,
TArray TSizedDefaultAllocator<32> >&,
FMetalTessellationOutputs const&,
unsigned int, unsigned int, unsigned
int, unsigned int, TArray char, TSizedDefaultAllocator<32> >
const&, bool) Address = 0x164b3d8be
(filename not found) [in
UE4Editor-MetalShaderFormat.dylib]
FMetalShaderOutputCooker::Build(TArray char, TSizedDefaultAllocator<32> >&)
Address = 0x164b24069 (filename not
found) [in
UE4Editor-MetalShaderFormat.dylib]
FDerivedDataCache::FBuildAsyncWorker::DoWork()
Address = 0x12cce637a (filename not
found) [in
UE4Editor-DerivedDataCache.dylib]
FAsyncTask::DoWork()
Address = 0x12cce49fd (filename not
found) [in
UE4Editor-DerivedDataCache.dylib]
FAsyncTask::Start(bool,
FQueuedThreadPool*) Address =
0x12cce7915 (filename not found) [in
UE4Editor-DerivedDataCache.dylib]
FDerivedDataCache::GetSynchronous(FDerivedDataPluginInterface*,
TArray TSizedDefaultAllocator<32> >&, bool*)
Address = 0x12cce1a89 (filename not
found) [in
UE4Editor-DerivedDataCache.dylib]
CompileShader_Metal(FShaderCompilerInput
const&, FShaderCompilerOutput&,
FString const&) Address = 0x164b4b734
(filename not found) [in
UE4Editor-MetalShaderFormat.dylib]
FShaderCompileUtilities::ExecuteShaderCompileJob(FShaderCommonCompileJob&)
Address = 0x1113bc69d (filename not
found) [in UE4Editor-Engine.dylib]
FShaderCompileThreadRunnable::CompileDirectlyThroughDll()
Address = 0x1113bc33d (filename not
found) [in UE4Editor-Engine.dylib]
FShaderCompileThreadRunnable::CompilingLoop()
Address = 0x1113bd3c6 (filename not
found) [in UE4Editor-Engine.dylib]
FShaderCompileThreadRunnableBase::Run()
Address = 0x1113b82c9 (filename not
found) [in UE4Editor-Engine.dylib]
FRunnableThreadPThread::Run() Address
= 0x10e5d3398 (filename not found) [in UE4Editor-Core.dylib]
FRunnableThreadPThread::_ThreadProc(void*)
Address = 0x10e572421 (filename not
found) [in UE4Editor-Core.dylib]
_pthread_start Address = 0x7fff713fa109 (filename not found)
[in libsystem_pthread.dylib]
thread_start Address = 0x7fff713f5b8b
(filename not found) [in
libsystem_pthread.dylib]

Hi! I hade the same problem today after installing Apple Xcode. After deinstallation it works fine without this error message. Let me know if it was helpful.

Hi, thanks for answering and solution. To clarify, after deinstalling Xcode, you no longer had this error?

Yep, that worked for me! Don’t know why. Let me know if it worked for you!

Did you reinstall xcode after deinstalling because it runs really slow without it? Additionally, do you think this error has anything to do with the OS?

Did you reinstall it after? because it runs really slow without xcode. Also do you think it has something to do with the OS?

Nope I didn’t and yep, it works really slow without Xcode. I was in hope to get an answer from a offical but …

Do you think its the OS?

Should I downgrade?

Hey guys, The new update 4.25.1 fixed it. Should be fine now

I just installed 4.25.1 and it crashes every time I attempt to create a new project.

Yeah mine does that too! I updated to 4.25.1 yesterday and now every time a new level is created it just crashes!

As suggested above (without explaining as to why one would), I reluctantly uninstalled Xcode. Unreal then allowed me to create a new project. However, I received the warning message…

Xcode was not detected on this Mac. Metal shader compilation will fall back to runtime compiled text shaders, which are slower. Please install latest version of Xcode for best performance and make sure it’s set as default using Xcode-select tool.

(I’ve had enough futzing around with this all afternoon (and then having issues with this site telling me I need to log in, when I’m already logged in. So I’ll try and reinstall Xcode tomorrow when I’m in a better mood, and see what happens.)

Sorry to hear that. It worked for me. Hopefully soon one of the developers will take notice of these issues.

Interesting, all of this. Thank you for the attention and for sharing solutions. I will update to 4.25.1 and see how that works and report back

You need to start Xcode at least once after installing it, because on first run it apparently installs some additional components.

I got this answer from here, and it worked (MacOS 10.14.6 and Xcode 11.3.1):