Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to compile shader while creating minimal image #83

Closed
galeone opened this issue May 22, 2020 · 7 comments
Closed

Unable to compile shader while creating minimal image #83

galeone opened this issue May 22, 2020 · 7 comments

Comments

@galeone
Copy link
Contributor

galeone commented May 22, 2020

ue4-docker version:         0.0.68 (latest available version is 0.0.68)
Operating system:           Linux (Arch Linux, 5.6.13-arch1-1)
Docker daemon version:      19.03.9-ce
NVIDIA Docker supported:    Yes
Maximum image size:         No limit detected
Available disk space:       3.01 TiB
Total system memory:        62.51 GiB physical, 1024 MiB virtual
Number of processors:       8 physical, 16 logical

I'm building a Linux container with unreal engine 4.25. I'm using a custom version of the engine, but the changes are really minimal and have practically nothing to do with shaders.

However, while running this line of the Dockerfile:

'/bin/sh -c ./Engine/Build/BatchFiles/RunUAT.sh BuildGraph -target="Make Installed Build Linux" -script=Engine/Build/InstalledEngineBuild.xml -set:HostPlatformOnly=true -set:WithDDC=$BUILD_DDC &&      rm -R -f /home/ue4/UnrealEngine/LocalBuilds/InstalledDDC &&     python3 /tmp/exclude-components.py /home/ue4/UnrealEngine/LocalBuilds/Engine/Linux $EXCLUDE_DEBUG $EXCLUDE_TEMPLATES && echo '' && echo 'RUN directive complete. Docker will now commit the filesystem layer to disk.' && echo 'Note that for large filesystem layers this can take quite some time.' && echo 'Performing filesystem layer commit...' && echo '''

I got these errors that make the compilation to fail.

    LogShaderCompilers: Warning: 18 Shader compiler errors compiling global shaders for platform GLSL_430:                                                                                   
    LogShaderCompilers: Warning: 18 Shader compiler errors compiling global shaders for platform GLSL_430:                                                                                   
    LogShaderCompilers: Warning: /home/ue4/UnrealEngine/LocalBuilds/InstalledDDC/Engine/Plugins/FX/Niagara/Shaders/Private/NiagaraGPURayTracingTransforms.usf(105): Shader FNiagaraGPURayTrac
ingTransformsCS, Permutation 0, VF None:                                                                                                                                                     
        error: 'TLASTransforms' undeclared                                                                                                                                                   
                                                                                                                                                                                             
    LogShaderCompilers: Warning: /home/ue4/UnrealEngine/LocalBuilds/InstalledDDC/Engine/Plugins/FX/Niagara/Shaders/Private/NiagaraGPURayTracingTransforms.usf(105): Shader FNiagaraGPURayTrac
ingTransformsCS, Permutation 0, VF None:                                                                                                                                                     
        error: 'TLASTransforms' undeclared                                                                                                                                                   
                                                                                                                                                                                             
    LogShaderCompilers: Warning: /home/ue4/UnrealEngine/LocalBuilds/InstalledDDC/Engine/Plugins/FX/Niagara/Shaders/Private/NiagaraGPURayTracingTransforms.usf(105): Shader FNiagaraGPURayTrac
ingTransformsCS, Permutation 0, VF None:                                                                                                                                                     
        error: cannot assign value of type 'vec4' to type '': no implicit conversion allowed                                                                                                 
                                                                                                                                                                                             
    LogShaderCompilers: Warning: /home/ue4/UnrealEngine/LocalBuilds/InstalledDDC/Engine/Plugins/FX/Niagara/Shaders/Private/NiagaraGPURayTracingTransforms.usf(105): Shader FNiagaraGPURayTrac
ingTransformsCS, Permutation 0, VF None:                                                                                                                                                     
        error: cannot assign value of type 'vec4' to type '': no implicit conversion allowed                                                                                                 
                                                                                                                                                                                             
    LogShaderCompilers: Warning: /home/ue4/UnrealEngine/LocalBuilds/InstalledDDC/Engine/Plugins/FX/Niagara/Shaders/Private/NiagaraGPURayTracingTransforms.usf(106): Shader FNiagaraGPURayTrac
ingTransformsCS, Permutation 0, VF None:                                                                                                                                                     
        error: 'TLASTransforms' undeclared
   
    LogShaderCompilers: Warning: /home/ue4/UnrealEngine/LocalBuilds/InstalledDDC/Engine/Plugins/FX/Niagara/Shaders/Private/NiagaraGPURayTracingTransforms.usf(106): Shader FNiagaraGPURayTrac
ingTransformsCS, Permutation 0, VF None:
        error: 'TLASTransforms' undeclared
   
    LogShaderCompilers: Warning: /home/ue4/UnrealEngine/LocalBuilds/InstalledDDC/Engine/Plugins/FX/Niagara/Shaders/Private/NiagaraGPURayTracingTransforms.usf(106): Shader FNiagaraGPURayTrac
ingTransformsCS, Permutation 0, VF None:
        error: cannot assign value of type 'vec4' to type '': no implicit conversion allowed
   
    LogShaderCompilers: Warning: /home/ue4/UnrealEngine/LocalBuilds/InstalledDDC/Engine/Plugins/FX/Niagara/Shaders/Private/NiagaraGPURayTracingTransforms.usf(106): Shader FNiagaraGPURayTrac
ingTransformsCS, Permutation 0, VF None:
        error: cannot assign value of type 'vec4' to type '': no implicit conversion allowed
   
    LogShaderCompilers: Warning: /home/ue4/UnrealEngine/LocalBuilds/InstalledDDC/Engine/Plugins/FX/Niagara/Shaders/Private/NiagaraGPURayTracingTransforms.usf(107): Shader FNiagaraGPURayTrac
ingTransformsCS, Permutation 0, VF None:
        error: 'TLASTransforms' undeclared
   
    LogShaderCompilers: Warning: /home/ue4/UnrealEngine/LocalBuilds/InstalledDDC/Engine/Plugins/FX/Niagara/Shaders/Private/NiagaraGPURayTracingTransforms.usf(107): Shader FNiagaraGPURayTrac
ingTransformsCS, Permutation 0, VF None:
        error: 'TLASTransforms' undeclared
   
    LogShaderCompilers: Warning: /home/ue4/UnrealEngine/LocalBuilds/InstalledDDC/Engine/Plugins/FX/Niagara/Shaders/Private/NiagaraGPURayTracingTransforms.usf(107): Shader FNiagaraGPURayTrac
ingTransformsCS, Permutation 0, VF None:
        error: cannot assign value of type 'vec4' to type '': no implicit conversion allowed
    LogShaderCompilers: Error:  /Plugin/FX/Niagara/Private/NiagaraGPURayTracingTransforms.usf(112): error: 'TLASTransforms' undeclared                                             [200/1943]
    LogShaderCompilers: Error:  /Plugin/FX/Niagara/Private/NiagaraGPURayTracingTransforms.usf(112): error: 'TLASTransforms' undeclared
    LogShaderCompilers: Error:  /Plugin/FX/Niagara/Private/NiagaraGPURayTracingTransforms.usf(112): error: cannot assign value of type 'vec4' to type '': no implicit conversion allowed
    LogShaderCompilers: Error:  /Plugin/FX/Niagara/Private/NiagaraGPURayTracingTransforms.usf(112): error: cannot assign value of type 'vec4' to type '': no implicit conversion allowed
    LogShaderCompilers: Error:  /Plugin/FX/Niagara/Private/NiagaraGPURayTracingTransforms.usf(113): error: 'TLASTransforms' undeclared
    LogShaderCompilers: Error:  /Plugin/FX/Niagara/Private/NiagaraGPURayTracingTransforms.usf(113): error: 'TLASTransforms' undeclared
    LogShaderCompilers: Error:  /Plugin/FX/Niagara/Private/NiagaraGPURayTracingTransforms.usf(113): error: cannot assign value of type 'vec4' to type '': no implicit conversion allowed
    LogShaderCompilers: Error:  /Plugin/FX/Niagara/Private/NiagaraGPURayTracingTransforms.usf(113): error: cannot assign value of type 'vec4' to type '': no implicit conversion allowed
    LogOutputDevice: Warning:
   
    Script Stack (0 frames):
   
    LogOutputDevice: Warning:
   
    Script Stack (0 frames):
   
    Fatal error: [File:/home/ue4/UnrealEngine/Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp] [Line: 4956]
    Failed to compile global shader FNiagaraGPURayTracingTransformsCS  .  Enable 'r.ShaderDevelopmentMode' in ConsoleVariables.ini for retries.
    LogCore: Error: appError called: Fatal error: [File:/home/ue4/UnrealEngine/Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp] [Line: 4956]
    Failed to compile global shader FNiagaraGPURayTracingTransformsCS  .  Enable 'r.ShaderDevelopmentMode' in ConsoleVariables.ini for retries.
    0x00007f80a28386cb libUE4Editor-Engine.so!ProcessCompiledJob(FShaderCompileJob*, FShaderPipelineType const*, TArray<EShaderPlatform, TSizedDefaultAllocator<32> >&, TArray<FShaderPipelin
eType const*, TSizedDefaultAllocator<32> >&) [/home/ue4/UnrealEngine/Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp:4953]
    0x00007f80a28254a4 libUE4Editor-Engine.so!ProcessCompiledGlobalShaders(TArray<TSharedRef<FShaderCommonCompileJob, (ESPMode)1>, TSizedDefaultAllocator<32> > const&) [/home/ue4/UnrealEngi
ne/Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp:4975]
    0x00007f80a28246a4 libUE4Editor-Engine.so!FShaderCompilingManager::ProcessCompiledShaderMaps(TMap<int, FShaderMapFinalizeResults, FDefaultSetAllocator, TDefaultMapHashableKeyFuncs<int, 
FShaderMapFinalizeResults, false> >&, float) [/home/ue4/UnrealEngine/Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp:2453]
    Signal 11 caught.
    0x00007f80a2829b84 libUE4Editor-Engine.so!FShaderCompilingManager::FinishCompilation(char16_t const*, TArray<int, TSizedDefaultAllocator<32> > const&) [/home/ue4/UnrealEngine/Engine/Sou
rce/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp:2846]
    0x00007f80a2834060 libUE4Editor-Engine.so!VerifyGlobalShaders(EShaderPlatform, bool) [/home/ue4/UnrealEngine/Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp:4385]
    0x00007f80a2835fca libUE4Editor-Engine.so!CompileGlobalShaderMap(EShaderPlatform, ITargetPlatform const*, bool) [/home/ue4/UnrealEngine/Engine/Source/Runtime/Engine/Private/ShaderCompil
er/ShaderCompiler.cpp:4689]
    0x00007f809ce0d10b libUE4Editor-UnrealEd.so!UDerivedDataCacheCommandlet::Main(FString const&) [/home/ue4/UnrealEngine/Engine/Source/Editor/UnrealEd/Private/Commandlets/DerivedDataCacheC
ommandlet.cpp:170]
    0x000000000025090b UE4Editor!FEngineLoop::PreInitPostStartupScreen(char16_t const*) [/home/ue4/UnrealEngine/Engine/Source/Runtime/Launch/Private/LaunchEngineLoop.cpp:3391]
    0x000000000023e31b UE4Editor!GuardedMain(char16_t const*) [/home/ue4/UnrealEngine/Engine/Source/Runtime/Launch/Private/Launch.cpp:127]
    0x00007f80a5691b5b libUE4Editor-UnixCommonStartup.so!CommonUnixMain(int, char**, int (*)(char16_t const*), void (*)()) [/home/ue4/UnrealEngine/Engine/Source/Runtime/Unix/UnixCommonStart
up/Private/UnixCommonStartup.cpp:264]
    0x00007f809b60eb97 libc.so.6!__libc_start_main(+0xe6)
    0x000000000022c029 UE4Editor!_start()

Any guess about what's going on? I'm trying to reproduce the same problem on Windows in the meantime (but it is painful because I go out of space often)

@adamrehn
Copy link
Owner

This is a known issue in Unreal Engine 4.25.0 under Linux, and my understanding is that a fix is already implemented and slated for release in Unreal Engine 4.25.1

@adamrehn adamrehn added the awaiting-upstream Awaiting bugfixes or functionality from upstream dependencies label May 22, 2020
@galeone
Copy link
Contributor Author

galeone commented May 22, 2020

Ouch, sorry for reporting it to you then! (Once again, this project is awesome).

But I don't have (still) found this bug reported elsewhere.

@adamrehn
Copy link
Owner

I can't seem to find an official bug report, but it's been mentioned several times (including by myself) on the #linux channel of the Unreal Slackers Discord server, and Epic Games staff member Brandon Schaefer confirmed that a fix should be present in 4.25.1.

@adamrehn
Copy link
Owner

adamrehn commented May 22, 2020

@adamrehn
Copy link
Owner

This commit was also mentioned as fixing a similar shader compilation issue that was triggering a segfault: https://github.com/EpicGames/UnrealEngine/commit/4627d4f75bc88b5aab189e1155e6a1a8a2939f29

@galeone
Copy link
Contributor Author

galeone commented May 22, 2020

Uh nice! I didn't know there is an official discord - just joined! (and I'll be monitoring the #linux channel).

Ok thank you very much for your help 👍 if the 4.25.1 get's released soon I'll just wait (I have some week of buffer for migrate the project I'm working on); otherwise I'll cherry-pick the commit you kindly shared with me.

(I guess this issue can be closed since it's not related with eu4-docker at all. Or maybe, you could warn the Linux users that if they are trying to build the 4.25.0 they should cherry-pick or abort)

@adamrehn
Copy link
Owner

Closing this issue, since 4.25.1 includes the fix and works correctly. As always, users are encouraged to use the latest point release for any given Unreal Engine version, and to be wary of .0 releases when building the ue4-full image due to their rocky track record when it comes to Installed Builds of the Engine. (As an example, both 4.20.0 and 4.22.0 had issues with Installed Builds, under Windows and Linux respectively.)

@adamrehn adamrehn removed the awaiting-upstream Awaiting bugfixes or functionality from upstream dependencies label Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants