Unable to compile with Xcode, Unreal 4.26, Big sur

I am getting this error

Command /Users/Shared/Epic
Games/UE_4.26/Engine/Build/BatchFiles/Mac/XcodeBuild.sh
failed with exit code 1

Any help please?

Here is full error

Running bundled mono, version: Mono
JIT compiler version 5.16.0.220
(2018-06/bb3ae37d71a Fri Nov 16
17:12:11 EST 2018) CSC: error CS2012:
Cannot open ‘/Users/Shared/Epic
Games/UE_4.26/Engine/Source/Programs/DotNETCommon/DotNETUtilities/obj/Development/DotNETUtilities.dll’
for writing – ‘Access to the path
“/Users/Shared/Epic
Games/UE_4.26/Engine/Source/Programs/DotNETCommon/DotNETUtilities/obj/Development/DotNETUtilities.dll”
is denied.’ /Users/Shared/Epic
Games/UE_4.26/Engine/Binaries/ThirdParty/Mono/Mac/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets:
error : Access to the path
“/Users/Shared/Epic
Games/UE_4.26/Engine/Source/Programs/DotNETCommon/DotNETUtilities/obj/Development/DotNETUtilities.csproj.FilesWrittenAbsolute.txt”
is denied. at
System.IO.FileStream…ctor
(System.String path,
System.IO.FileMode mode,
System.IO.FileAccess access,
System.IO.FileShare share,
System.Int32 bufferSize,
System.Boolean anonymous,
System.IO.FileOptions options)
[0x0019e] in
<98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.FileStream…ctor
(System.String path,
System.IO.FileMode mode,
System.IO.FileAccess access,
System.IO.FileShare share,
System.Int32 bufferSize,
System.IO.FileOptions options,
System.String msgPath, System.Boolean
bFromProxy, System.Boolean
useLongPath, System.Boolean checkHost)
[0x00000] in
<98fac219bd4e453693d76fda7bd96ab0>:0
at (wrapper
remoting-invoke-with-check)
System.IO.FileStream…ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
at System.IO.StreamWriter.CreateFile
(System.String path, System.Boolean
append, System.Boolean checkHost)
[0x0001c] in
<98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.StreamWriter…ctor
(System.String path, System.Boolean
append, System.Text.Encoding encoding,
System.Int32 bufferSize,
System.Boolean checkHost) [0x00055] in
<98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.StreamWriter…ctor
(System.String path, System.Boolean
append, System.Text.Encoding encoding,
System.Int32 bufferSize) [0x00000] in
<98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.StreamWriter…ctor
(System.String path, System.Boolean
append) [0x00008] in
<98fac219bd4e453693d76fda7bd96ab0>:0
at (wrapper
remoting-invoke-with-check)
System.IO.StreamWriter…ctor(string,bool)
at
Microsoft.Build.Tasks.WriteLinesToFile.Execute
() [0x0002e] in
<1e06a39ffa2a4ecc9361f5e710a0e7cb>:0
/Users/Shared/Epic
Games/UE_4.26/Engine/Binaries/ThirdParty/Mono/Mac/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets:
error : Access to the path
“/Users/Shared/Epic
Games/UE_4.26/Engine/Source/Programs/UnrealBuildTool/obj/Development/UnrealBuildTool.csproj.FilesWrittenAbsolute.txt”
is denied. at
System.IO.FileStream…ctor
(System.String path,
System.IO.FileMode mode,
System.IO.FileAccess access,
System.IO.FileShare share,
System.Int32 bufferSize,
System.Boolean anonymous,
System.IO.FileOptions options)
[0x0019e] in
<98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.FileStream…ctor
(System.String path,
System.IO.FileMode mode,
System.IO.FileAccess access,
System.IO.FileShare share,
System.Int32 bufferSize,
System.IO.FileOptions options,
System.String msgPath, System.Boolean
bFromProxy, System.Boolean
useLongPath, System.Boolean checkHost)
[0x00000] in
<98fac219bd4e453693d76fda7bd96ab0>:0
at (wrapper
remoting-invoke-with-check)
System.IO.FileStream…ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
at System.IO.StreamWriter.CreateFile
(System.String path, System.Boolean
append, System.Boolean checkHost)
[0x0001c] in
<98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.StreamWriter…ctor
(System.String path, System.Boolean
append, System.Text.Encoding encoding,
System.Int32 bufferSize,
System.Boolean checkHost) [0x00055] in
<98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.StreamWriter…ctor
(System.String path, System.Boolean
append, System.Text.Encoding encoding,
System.Int32 bufferSize) [0x00000] in
<98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.StreamWriter…ctor
(System.String path, System.Boolean
append) [0x00008] in
<98fac219bd4e453693d76fda7bd96ab0>:0
at (wrapper
remoting-invoke-with-check)
System.IO.StreamWriter…ctor(string,bool)
at
Microsoft.Build.Tasks.WriteLinesToFile.Execute
() [0x0002e] in
<1e06a39ffa2a4ecc9361f5e710a0e7cb>:0
Failed to build to build tool
(UnrealBuildTool)

1 Like

Sorry, don’t have anything to help. But wanted to amplify this, as we’re having the exact same issue. Tried giving XCode full disk access, tried installing to the local user rather than Shared, tried reinstalling, etc… Just keeps failing with this error. :frowning:

I’ve also run into this. I filed a bug on it, Case # 00273684. I’ve tried clean installs on multiple machines with the same error, on both Big Sur and Catalina.

Edit: compiling from inside UE still works, though there’s no way to do source-level debugging.

How is the performance? I’ve got a 2019 MBP and its horrible! Apologies, nothing to do with your issue, curious as to how things perform for you.

Hi all, I moved to 4.26 as I was getting other error on Big sur and UE4.25 “/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/current/MultitouchSupport”. Temp solution for me was to moved back to 4.25 and update two Engines file ie
Engine/Source/Runtime/ApplicationCore/ApplicationCore.Build.cs and Engine/Source/Runtime/Core/Core.Build.cs. Find more here https://github.com/EpicGames/UnrealEngine/commit/1d252ee345cdf6c232b20c3b4bf14f13bb569c9d

Obviously this doesn’t fix 4.26, but this workaround did allow me to get 4.25.4 running on the new M1 Mac Mini with the latest Big Sur and XCode, and I was able to get Mac and iOS builds out the door. :slight_smile:

That github link gives me a 404 error, any chance on a corrected link? Thanks!

Link works, but it’s on the UnrealEngine repo so you just need to link your Unreal account. :slight_smile:

Same error on Catalina.

ah thanks, I’ll do that

Where did you file the bug? I can’t find it on the UE4 issues tracker.

I reported it here: Unreal Engine Community

The case # was the one they emailed me, but they didn’t send me a link to the bug itself.

On a 2017 iMac Pro I’m seeing 90-110 fps most of the time, seems good to me.

I temporarily solved changing permissions and the owner of the Engine files:

cd /Users/Shared/UnrealEngine/UE_4.26
sudo chown -R `whoami` Engine
chmod -R u+rw Engine

This also requires to delete Binaries and Intermediate folders inside your project.

It still needs a fix from Epic, if you do “verify” the Engine on the Epic Games Launcher the permissions are reset again and you need to do the fix again. However, it is useful to be able to develop and test a project on 4.26.

Well this got me further as I don’t get the permissions error, but now I’m seeing a bunch of errors in building the .cs files – “The type or namespace name ‘Tools’ could not be found (are you missing a using directive or an assembly reference?)” – any idea what that might be? Seems to be on this line of code:
using Tools.DotNETCommon;

Perhaps related: xcode auto-updated to 12.3 last night, I’m re-installing 12.2 to see if that has any impact.

I don’t think it’s related to Xcode. Mine updated last night as well but I can compile without any errors. After the steps mentioned above I was able to compile and run the project. Maybe try verifying the engine from the launcher to see if anything is corrupted. Once done you will need to repeat the commands.

Elaborating on @Lju answer, I solved with the following minimal shell commands:

chmod -R u+w '/Users/Shared/Epic Games/UE_4.26/Engine/Source/Programs/DotNETCommon/DotNETUtilities/obj/Development'
chmod -R u+w '/Users/Shared/Epic Games/UE_4.26/Engine/Source/Programs/UnrealBuildTool/obj/Development'

(depending on your system, sudo and/or different base paths could be needed)

1 Like

Interesting. Actually I tried to chmod the /Users/Shared/Epic Games/UE_4.26/Engine/Source/Programs folder first, but I still got an error. I had to chown too. After that I still receive some errors elsewhere, that’s why I chose to do it to all the engine. But I guess if that worked to you, it might work for many as well.

Just download the source code zip file from the 4.26 release on Github.
After pulling the binaries and creating the project files all seems to compile just fine.
Be sure to first do the ShaderCompilerWorker.

Just download the source code zip file from the 4.26 release on Github.
After pulling the binaries and creating the project files all seems to compile just fine.
Be sure to first do the ShaderCompilerWorker.