Compiling the engine from source on Linux and getting a error of "make*** Error 6"

Hi there, I’d like to run Unreal Editor on my machine which is running Fedora 34, everything is fine when I was running ./ and ./, but after I started to run the make command, I got this error :

Performing 7 actions (8 in parallel)
[1/7] Compile Module.ShaderCompilerCommon.cpp
In file included from /home/airrinascimento/文件/Unreal Engine/UnrealEngine-ue5-early-access/Engine/Intermediate/Build/Linux/B4D820EA/ShaderCompileWorker/Development/ShaderCompilerCommon/Module.ShaderCompilerCommon.cpp:6:
In file included from /home/airrinascimento/文件/Unreal Engine/UnrealEngine-ue5-early-access/Engine/Source/Developer/ShaderCompilerCommon/Private/HlslUtils.cpp:11:
In file included from Developer/ShaderCompilerCommon/Public/ShaderCompilerCommon.h:6:
In file included from Runtime/RenderCore/Public/UniformBuffer.h:9:
In file included from Runtime/RenderCore/Public/ShaderParameterMacros.h:10:
In file included from Runtime/RenderCore/Public/ShaderParameterMetadata.h:12:
In file included from Runtime/RHI/Public/RHI.h:2390:
/home/airrinascimento/文件/Unreal Engine/UnrealEngine-ue5-early-access/Engine/Source/Runtime/RHI/Public/RHIResources.h:2910:5: error: expected class member or base class name
                , ArraySize(InArraySize)
/home/airrinascimento/文件/Unreal Engine/UnrealEngine-ue5-early-access/Engine/Source/Developer/ShaderCompilerCommon/Private/HlslLexer.cpp:13:26: note: expanded from macro 'ArraySize'
#define ArraySize(array) (sizeof(ArraySizeHelper(array)))
1 error generated.
make: *** [Makefile:763:ShaderCompileWorker] Error 6

Is there anyone who knows how to deal with this problem?
I’ve just searched google, but it doesn’t help.

1 Like

could you please try compiling some parts to see if it succeeds, thus making sure that everything is working.
make ARGS="-clean" UnrealLightmass && make UnrealLightmass
make ARGS="-clean" ShaderCompileWorker && make ShaderCompileWorker

if any of the above steps fails could you link more log with something like to pastebin.
I too have a fedora 34 setup on another ue5 branch.
Also for every cpu thread you should have around 2gb of ram.

Try these also:

  1. do you have full folder permissions the source directory
  2. change Unreal Engine to UnrealEngine
  3. redownload the sdk (here)

Hope that you are not on the ue5-main branch as this is too bleeding edge to work on linux unless you know to work in engine source.

Hi! Have you find a way to fix this bug, I just meet same bug with you. If you fixed this. Can you tell me how to do thank you!

I finally change source code of HlslLexer.cpp. because of the stupid compiler.image|568x330
The initialize function of FRHITextureCreateInfo that init “ArraySize” member.
I just wander why does this compiler will treat class member as macro.