falldamagestudio / UE-Jenkins-BuildSystem

Build Unreal Engine & games with Jenkins on GKE/GCE
MIT License
46 stars 11 forks source link

UE4Editor-Cmd.exe fails loading UE4Editor-OpenGLDrv.dll & UE4Editor-MagicLeap.dll when launched within a Windows Server Core container #24

Closed Kalmalyzer closed 3 years ago

Kalmalyzer commented 3 years ago

The root problem is likely that those DLLs expect (directly or indirectly) some 3D related DLLs to exist in the Windows installation. Those DLLs are present in Windows Server, but not in Windows Server Core.

Typical trace:

PS C:\J\workspace\build_game_windows> & "C:\j\workspace\build_game_windows\UE\Engine\Binaries\Win64\UE4Editor-Cmd.exe" "C:\j\workspace\build_game_windows\Ex
ampleGame\ExampleGame.uproject" "-run=Cook"  "-TargetPlatform=WindowsNoEditor" "-buildmachine" "-fileopenlog" "-unversioned" "-iterate" "-iterateshash" "-ab
slog=C:\j\workspace\build_game_windows\UE\Engine\Programs\AutomationTool\Saved\Cook-2021.01.27-07.45.00.txt" "-stdout" "-CrashForUAT" "-unattended" "-NoLogT
imes" "-buildmachine" "-UTF8Output" "-nullrhi" "-unattended" "-nohmd"
LogInit: Display: Running engine for game: ExampleGame
LogModuleManager: Warning: ModuleManager: Unable to load module 'C:/j/workspace/build_game_windows/UE/Engine/Binaries/Win64/UE4Editor-OpenGLDrv.dll' because
 the file couldn't be loaded by the OS.
LogModuleManager: Warning: ModuleManager: Unable to load module 'C:/j/workspace/build_game_windows/UE/Engine/Plugins/Lumin/MagicLeap/Binaries/Win64/UE4Edito
r-MagicLeap.dll' because the file couldn't be loaded by the OS.

Is there a way to make UE4Editor-Cmd not load those DLLs at startup? -nullrhi on the command line made no difference. Alternatively, perhaps it is possible to inject the missing DLLs (from Windows Server) into the container, just to make Unreal capable of loading those DLLs?

(A third option would be to change to using Windows Server as the base image, but that might lead to other problems, like longer image pull times, longer pod startup times, etc, with no clear path for speeding things up in the future)

Kalmalyzer commented 3 years ago

There is no reasonable way to not make UE4Editor-Cmd load those DLLs. The only feasible way (without source code changes) is to inject the missing DLLs from Windows Server host OS into the Windows Server Core container when building the container.

After doing this, UE4Editor-Cmd can cook Win64 example game content successfully. The image size doesn't go up noticeably since the container image is still based on Windows Server Core.