Running bundled mono, version: Mono JIT compiler version 5.16.0.220 (2018-06/bb3ae37d71a Fri Nov 16 17:12:11 EST 2018)
/Users/Shared/Epic Games/UE_4.26/Engine /Users/Shared/Epic Games/UE_4.26/Engine/Binaries/Mac
Creating makefile for FirstGameEditor (no existing makefile) @progress push 5%
Parsing headers for FirstGameEditor
Running UnrealHeaderTool “/Users/andrew/Projects/FirstGame/FirstGame.uproject” “/Users/andrew/Projects/FirstGame/Intermediate/Build/Mac/x86_64/FirstGameEditor/Development/FirstGameEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -abslog="/Users/andrew/Library/Application Support/Epic/UnrealBuildTool/Log_UHT.txt" -installed
Reflection code generated for FirstGameEditor in 4.4266458 seconds @progress pop
Building FirstGameEditor…
Performing 13 actions (12 in parallel)
[1/13] Compile SharedPCH.Engine.ShadowErrors.h
In file included from /Users/andrew/Projects/FirstGame/Intermediate/Build/Mac/x86_64/FirstGameEditor/Development/Engine/SharedPCH.Engine.ShadowErrors.h:281:
In file included from /Users/Shared/Epic Games/UE_4.26/Engine/Source/Runtime/Engine/Public/EngineSharedPCH.h:572:
/Users/Shared/Epic Games/UE_4.26/Engine/Source/Runtime/Engine/Classes/Materials/Material.h:1269:26: error: variable ‘LayerNames’ set but not used [-Werror,-Wunused-but-set-variable]
const TArray* LayerNames = &LayersExpression->GetLayerNames();
^
1 error generated.
You can open the “UnrealBuildTool.sln” project in Engine folder, with visual studio.
search “-Wall”, and remove it.
rebuild the UnrealBuildTool, and then, it will works.
For those who still need to fix it, the file is located at: “/Users/Shared/Epic Games/UE_4.27/Engine/Source/Programs/UnrealBuildTool/Platform/Mac/MacToolChain.cs” and the solution at: “/Users/Shared/Epic Games/UE_4.27/Engine/Source/Programs/UnrealBuildTool/UnrealBuildTool.csproj”
Thank you @yao_great and @valentegamedev! @sfjohnston@SimonLee I think the problem is actually the -Wall argument, I left the -Werror argument in as I was concerned removing this would cause it to ignore actual errors, too. The line in my file now reads:
Result += " -Werror";
and it worked after I rebuilt UnrealBuildTool.csproj.
I’m a novice (started learning UE/C++ last week) so I’m a little embarrassed to say I spent over an hour trying to figure out how to rebuild the project after I found this thread. In an effort to save some other novice several hours of frustration:
open /Users/Shared/Epic Games/UE_4.27/Engine/Source/Programs/UnrealBuildTool/UnrealBuildTool.csproj in Visual Studios to rebuild it. Xcode won’t build it because it’s in C# and I couldn’t figure it out through command line (tried both xcodebuild and build.sh). I had erroneously assumed Visual Studios and Xcode were PC and Mac versions of the same thing. Like I said, novice.