Xcode gives "ExternalBuildToolExecution failed with nonzero exit code" when building from source on mac

Really frustrating. Doesn’t give any other feedback on what exactly is failing. When i try to run it again it says “A Conflicting instance of unrealbuildtool is already running.”
Presumably unrealbuildtool is what is failing and it fails to quit when the build fails?

3 Likes

Same issue here, tried to build for m1 mac. Did you find any solution to this?

I am facing the same issue, any fix

Had the same problem trying to build UE 5.1 on M1 Max with macOS Ventura.

I restarted the computer and when I pressed build it started where it left off and finished successful then.

Same for me : UE (5.1.0) with the release branch on a M2 with Xcode 14.1 and Monterey 12.5; I did build the ShaderCompileWorker without problem but the UE5 build process got errors :

unexpected service error: The Xcode build system has crashed. Build again to continue

After having this error message I got :

...build failed ExternalBuildToolExecution failed with a nonzero exit code

I did also reboot my computer but killing all the dotnet process in the macOS Activity Monitor before relaunch the Xcode build process should suit. I did that multiple times to compile all and now it works for me.

1 Like

I also had the exact same error. Can you explain how you fixed the issue? I’m not sure what I should do.

I am facing the same issue now, any suggestions to solve this?

I am facing the same issue…

I used this command in terminal and build was without mistakes. This has reduced memory usage.
defaults write com.apple.dt.XCode IDEIndexDisable 1

3 Likes

Thanks @Vitaliy2405 :smiley: Disabling the Xcode indexation avoids the build errors (for me with UE 5.1.1, MacBook Air M2, Xcode 14.2, Ventura 13.2.1)

3 Likes

Disabling Xcode indexation while building. This works for me

2 Likes

I noticed that this same error message will occur if you add certain plugins but do not modify the .uproject and .build.cs files. In my case, I enabled EnhancedInput in the plugins in the editor, added a UDataAsset of attempting to use InputAction.h. Turns out this error occurs without explanation during the build if the lines

,
{
“Name”: “EnhancedInput”,
“Enabled”: true
}

are not added to the .uproject file, and the “EnhancedInput” is not added to the .build.cs file plugins line.

I assume this might occur with enabling other plugins too. If a plugin was added and this error message stops your builds, look for the plugin you enabled in those two files. If not there, it would need to be added manually.

This was on 5.3.0.