City Sample fails to compile on UE5 Linux - SoundScape, ElectraPlayer and more

I’ve compiled the 5.0 release branch successfully on Fedora Linux 35. I’ve managed to download the City Sample project and it fails to compile on the last few .cpp modules.

Building CitySample...
Determining max actions to execute in parallel (12 physical cores, 12 logical cores)
  Executing up to 12 processes, one per physical core
  Requested 1,5 GB free memory per action, 8,08 GB available: limiting max parallel actions to 5
Building 6 actions with 5 processes...
[1/6] Compile Module.Soundscape.gen.cpp
In file included from /home/jakubkrych/Dokumenty/EpicVault/CitySample_5.0/data 5.0/Intermediate/Build/Linux/B4D820EA/CitySample/Debug/Soundscape/Module.Soundscape.gen.cpp:2:
In file included from /home/jakubkrych/Dokumenty/EpicVault/CitySample_5.0/data 5.0/Intermediate/Build/Linux/B4D820EA/CitySample/Inc/Soundscape/SoundScape.gen.cpp:8:
/home/jakubkrych/Dokumenty/EpicVault/CitySample_5.0/data 5.0/Plugins/SoundScape/Source/SoundScape/Public/SoundScape.h:7:10: fatal error: 'SoundscapeModule.h' file not found
#include "SoundscapeModule.h"
         ^~~~~~~~~~~~~~~~~~~~
1 error generated.
[2/6] Compile Module.Soundscape.cpp
In file included from /home/jakubkrych/Dokumenty/EpicVault/CitySample_5.0/data 5.0/Intermediate/Build/Linux/B4D820EA/CitySample/Debug/Soundscape/Module.Soundscape.cpp:2:
/home/jakubkrych/Dokumenty/EpicVault/CitySample_5.0/data 5.0/Plugins/SoundScape/Source/SoundScape/Private/SoundScape.cpp:3:10: fatal error: 'Soundscape.h' file not found
#include "Soundscape.h"
         ^~~~~~~~~~~~~~
1 error generated.
[3/6] Compile Module.ElectraPlayerPlugin.cpp
In file included from /home/jakubkrych/Dokumenty/EpicVault/CitySample_5.0/data 5.0/Intermediate/Build/Linux/B4D820EA/CitySample/Debug/ElectraPlayerPlugin/Module.ElectraPlayerPlugin.cpp:3:
/home/jakubkrych/Unreal Engine 5.0/Engine/Plugins/Media/ElectraPlayer/Source/ElectraPlayerPlugin/Private/ElectraPlayerPlugin.cpp:366:3: error: unknown type name 'FElectraTextureSampleRef'; did you mean 'FElectraTextureSamplePtr'?
                FElectraTextureSampleRef TextureSample = PinnedHost->OutputTexturePool.AcquireShared();
                ^~~~~~~~~~~~~~~~~~~~~~~~
                FElectraTextureSamplePtr
/home/jakubkrych/Unreal Engine 5.0/Engine/Plugins/Media/ElectraUtil/Source/ElectraSamples/Public/GStreamer/ElectraTextureSample.h:137:7: note: 'FElectraTextureSamplePtr' declared here
using FElectraTextureSamplePtr = TSharedPtr<FElectraTextureSampleUnix, ESPMode::ThreadSafe>;
      ^
In file included from /home/jakubkrych/Dokumenty/EpicVault/CitySample_5.0/data 5.0/Intermediate/Build/Linux/B4D820EA/CitySample/Debug/ElectraPlayerPlugin/Module.ElectraPlayerPlugin.cpp:3:
/home/jakubkrych/Unreal Engine 5.0/Engine/Plugins/Media/ElectraPlayer/Source/ElectraPlayerPlugin/Private/ElectraPlayerPlugin.cpp:367:18: error: too few arguments to function call, expected 4, have 1; did you mean 'UE::Trace::Initialize'?
                TextureSample->Initialize(InVideoFrame.Get());
                               ^~~~~~~~~~
                               UE::Trace::Initialize
/home/jakubkrych/Unreal Engine 5.0/Engine/Source/Runtime/TraceLog/Public/Trace/Trace.h:44:19: note: 'UE::Trace::Initialize' declared here
UE_TRACE_API void       Initialize(const FInitializeDesc& Desc) UE_TRACE_IMPL();
                        ^
In file included from /home/jakubkrych/Dokumenty/EpicVault/CitySample_5.0/data 5.0/Intermediate/Build/Linux/B4D820EA/CitySample/Debug/ElectraPlayerPlugin/Module.ElectraPlayerPlugin.cpp:3:
/home/jakubkrych/Unreal Engine 5.0/Engine/Plugins/Media/ElectraPlayer/Source/ElectraPlayerPlugin/Private/ElectraPlayerPlugin.cpp:368:38: error: no viable conversion from 'FElectraTextureSamplePtr' (aka 'TSharedPtr<FElectraTextureSampleUnix, ESPMode::ThreadSafe>') to 'const TSharedRef<IMediaTextureSample, ESPMode::ThreadSafe>'
                PinnedHost->MediaSamples->AddVideo(TextureSample);
                                                   ^~~~~~~~~~~~~
/home/jakubkrych/Unreal Engine 5.0/Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h:361:14: note: candidate constructor not viable: no known conversion from 'FElectraTextureSamplePtr' (aka 'TSharedPtr<FElectraTextureSampleUnix, ESPMode::ThreadSafe>') to 'const TSharedRef<IMediaTextureSample, ESPMode::ThreadSafe> &' for 1st argument
        FORCEINLINE TSharedRef( TSharedRef const& InSharedRef )
                    ^
/home/jakubkrych/Unreal Engine 5.0/Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h:366:14: note: candidate constructor not viable: no known conversion from 'FElectraTextureSamplePtr' (aka 'TSharedPtr<FElectraTextureSampleUnix, ESPMode::ThreadSafe>') to 'TSharedRef<IMediaTextureSample, ESPMode::ThreadSafe> &&' for 1st argument
        FORCEINLINE TSharedRef( TSharedRef&& InSharedRef )
                    ^
/home/jakubkrych/Unreal Engine 5.0/Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h:229:14: note: candidate template ignored: could not match 'TRawPtrProxy' against 'TSharedPtr'
        FORCEINLINE TSharedRef( SharedPointerInternals::TRawPtrProxy< OtherType > const& InRawPtrProxy )
                    ^
/home/jakubkrych/Unreal Engine 5.0/Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h:256:14: note: candidate template ignored: could not match 'TRawPtrProxyWithDeleter' against 'TSharedPtr'
        FORCEINLINE TSharedRef( SharedPointerInternals::TRawPtrProxyWithDeleter< OtherType, DeleterType > const& InRawPtrProxy )
                    ^
/home/jakubkrych/Unreal Engine 5.0/Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h:283:14: note: candidate template ignored: could not match 'TRawPtrProxyWithDeleter' against 'TSharedPtr'
        FORCEINLINE TSharedRef( SharedPointerInternals::TRawPtrProxyWithDeleter< OtherType, DeleterType >&& InRawPtrProxy )
                    ^
/home/jakubkrych/Unreal Engine 5.0/Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h:308:14: note: candidate template ignored: could not match 'TSharedRef' against 'TSharedPtr'
        FORCEINLINE TSharedRef( TSharedRef< OtherType, Mode > const& InSharedRef )
                    ^
/home/jakubkrych/Unreal Engine 5.0/Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h:176:23: note: explicit constructor is not a candidate
        FORCEINLINE explicit TSharedRef( OtherType* InObject )
                             ^
/home/jakubkrych/Unreal Engine 5.0/Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h:545:23: note: explicit constructor is not a candidate
        FORCEINLINE explicit TSharedRef( TSharedPtr< OtherType, Mode > const& InSharedPtr )
                             ^
/home/jakubkrych/Unreal Engine 5.0/Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h:558:23: note: explicit constructor is not a candidate
        FORCEINLINE explicit TSharedRef( TSharedPtr< OtherType, Mode >&& InSharedPtr )
                             ^
/home/jakubkrych/Unreal Engine 5.0/Engine/Source/Runtime/MediaUtils/Public/MediaSamples.h:75:76: note: passing argument to parameter 'Sample' here
        void AddVideo(const TSharedRef<IMediaTextureSample, ESPMode::ThreadSafe>& Sample)
                                                                                  ^
3 errors generated.
[4/6] Compile Module.CitySample.cpp
In file included from /home/jakubkrych/Dokumenty/EpicVault/CitySample_5.0/data 5.0/Intermediate/Build/Linux/B4D820EA/CitySample/Debug/CitySample/Module.CitySample.cpp:51:
/home/jakubkrych/Dokumenty/EpicVault/CitySample_5.0/data 5.0/Source/CitySample/UI/CitySampleControlsOverlay.cpp:226:8: error: expression result unused [-Werror,-Wunused-value]
                for (ButtonCacheIndex; ButtonCacheIndex < ButtonsCache.Num(); ++ButtonCacheIndex)
                     ^~~~~~~~~~~~~~~~
In file included from /home/jakubkrych/Dokumenty/EpicVault/CitySample_5.0/data 5.0/Intermediate/Build/Linux/B4D820EA/CitySample/Debug/CitySample/Module.CitySample.cpp:61:
/home/jakubkrych/Dokumenty/EpicVault/CitySample_5.0/data 5.0/Source/CitySample/Util/CitySampleAssetManager.cpp:4:10: fatal error: 'Misc/Commandline.h' file not found
#include "Misc/Commandline.h"
         ^~~~~~~~~~~~~~~~~~~~
2 errors generated.
1 Like

Hey, seems to be a lot of typo errors, I’m trying to compile it on my side, will tell you later if I succeed

There’s a patch available from Epic already. First, do these conversions inside the project path

find . -name *.cpp -exec dos2unix {} \;
find . -name *.h -exec dos2unix {} \;
find . -name *.cs -exec dos2unix {} \;

Then you need to place this file beside your CitySample folder and run this command.

patch -p 0 < city-sample-linux.diff

The project should compile succesfully after that and you can now wait for the 20GB DDC to compile. If you’re having a lot of crashes, first run this command to compile shaders outside of the loaded Editor.

./UnrealEditor <pathtoyourproject>/Project.uasset -run=DerivedDataCache -fill

Then it will still need to build textures, Nanites and SDFs. I advise to run the extra map with buildings only first, as building Nanite versions of those requires a lot of memory. They are the cause for a lot of crashes. Then you should be able to safely run the SmallCity and BigCity.

city-sample-linux.diff (18.6 KB)

3 Likes

Any luck with this?

I followed all your instruction, but got a bit lost on the

The project should compile succesfully after that and you can now wait for the 20GB DDC to compile

Any command line instruction hand holding on that?

You need to have your engine and VS Code installed. Run the engine, find the CitySample.uproject to run. It will probably ask you to compile modules. It will either do it itself, or it will ask you to compile through VS Code. Open the project directory in VS Code and Run debugging. It will compile all the modules you need and it will either run the project or show an error. You can ignore it, and run it from the engine. Then it will start compiling shaders etc. for DDC.

Has anyone succeeded in running the CitySample project in a Linux environment? I succeeded in compiling and loading the project, but when I press the play button, a crash occurs(I have tried both Small_city and Big_city).

================================= Crash Log ==================================
Assertion failed: Pair != nullptr [File:Runtime/Core/Public/Containers/Map.h] [Line: 643]

libUnrealEditor-MassEntity.so!FMassEntityView::GetFragmentPtrChecked(UScriptStruct const&) const [/home/ubuntu/UnrealEngine5/Engine/Source/./…/Plugins/Runtime/MassEntity/Source/MassEntity/Private/MassEntityView.cpp:41]
libUnrealEditor-MassActors.so!UE::Core::Private::Function::TFunctionRefCaller<UMassAgentMovementSyncTrait::BuildTemplate(FMassEntityTemplateBuildContext&, UWorld&) const::$_97, void (UObject&, FMassEntityView&, EMassTranslationDirection)>::Call(void*, UObject&, FMassEntityView&, EMassTranslationDirection&) [/home/ubuntu/UnrealEngine5/Engine/Source/Runtime/Core/Public/Templates/Function.h:548]
libUnrealEditor-MassActors.so!UMassAgentSubsystem::HandlePendingInitialization() [/home/ubuntu/UnrealEngine5/Engine/Source/./…/Plugins/Runtime/MassGameplay/Source/MassActors/Private/MassAgentSubsystem.cpp:324]
libUnrealEditor-MassActors.so!TBaseUObjectMethodDelegateInstance<false, UMassAgentSubsystem, void (float), FDefaultDelegateUserPolicy, EMassProcessingPhase>::ExecuteIfSafe(float) const [/home/ubuntu/UnrealEngine5/Engine/Source/Runtime/Core/Public/Delegates/DelegateInstancesImpl.h:609]
libUnrealEditor-MassEntity.so!TMulticastDelegate<void (float), FDefaultDelegateUserPolicy>::Broadcast(float) const [/home/ubuntu/UnrealEngine5/Engine/Source/Runtime/Core/Public/Delegates/DelegateSignatureImpl.inl:967]
libUnrealEditor-MassEntity.so!FMassProcessingPhase::ExecuteTick(float, ELevelTick, ENamedThreads::Type, TRefCountPtr const&) [/home/ubuntu/UnrealEngine5/Engine/Source/./…/Plugins/Runtime/MassEntity/Source/MassEntity/Private/MassProcessingPhase.cpp:60]
libUnrealEditor-Engine.so!FTickFunctionTask::DoTask(ENamedThreads::Type, TRefCountPtr const&) [/home/ubuntu/UnrealEngine5/Engine/Source/./Runtime/Engine/Private/TickTaskManager.cpp:284]
libUnrealEditor-Engine.so!TGraphTask::ExecuteTask(TArray<FBaseGraphTask*, TSizedDefaultAllocator<32> >&, ENamedThreads::Type, bool) [/home/ubuntu/UnrealEngine5/Engine/Source/Runtime/Core/Public/Async/TaskGraphInterfaces.h:975]
libUnrealEditor-Core.so!FNamedTaskThread::ProcessTasksNamedThread(int, bool) [/home/ubuntu/UnrealEngine5/Engine/Source/./Runtime/Core/Private/Async/TaskGraph.cpp:753]
libUnrealEditor-Core.so!FNamedTaskThread::ProcessTasksUntilQuit(int) [/home/ubuntu/UnrealEngine5/Engine/Source/./Runtime/Core/Private/Async/TaskGraph.cpp:641]
libUnrealEditor-Core.so!FTaskGraphCompatibilityImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type) [/home/ubuntu/UnrealEngine5/Engine/Source/./Runtime/Core/Private/Async/TaskGraph.cpp:2114]
libUnrealEditor-Core.so!FTaskGraphCompatibilityImplementation::WaitUntilTasksComplete(TArray<TRefCountPtr, TSizedInlineAllocator<4u, 32, TSizedDefaultAllocator<32> > > const&, ENamedThreads::Type) [/home/ubuntu/UnrealEngine5/Engine/Source/./Runtime/Core/Private/Async/TaskGraph.cpp:2168]
libUnrealEditor-Engine.so!FTickTaskSequencer::ReleaseTickGroup(ETickingGroup, bool) [/home/ubuntu/UnrealEngine5/Engine/Source/./Runtime/Engine/Private/TickTaskManager.cpp:564]
libUnrealEditor-Engine.so!FTickTaskManager::RunTickGroup(ETickingGroup, bool) [/home/ubuntu/UnrealEngine5/Engine/Source/./Runtime/Engine/Private/TickTaskManager.cpp:1591]
libUnrealEditor-Engine.so!UWorld::Tick(ELevelTick, float) [/home/ubuntu/UnrealEngine5/Engine/Source/./Runtime/Engine/Private/LevelTick.cpp:1531]
libUnrealEditor-UnrealEd.so!UEditorEngine::Tick(float, bool) [/home/ubuntu/UnrealEngine5/Engine/Source/./Editor/UnrealEd/Private/EditorEngine.cpp:1775]
libUnrealEditor-UnrealEd.so!UUnrealEdEngine::Tick(float, bool) [/home/ubuntu/UnrealEngine5/Engine/Source/./Editor/UnrealEd/Private/UnrealEdEngine.cpp:471]
UnrealEditor!FEngineLoop::Tick() [/home/ubuntu/UnrealEngine5/Engine/Source/./Runtime/Launch/Private/LaunchEngineLoop.cpp:5209]
UnrealEditor!GuardedMain(char16_t const*) [/home/ubuntu/UnrealEngine5/Engine/Source/./Runtime/Launch/Private/Launch.cpp:185]
libUnrealEditor-UnixCommonStartup.so!CommonUnixMain(int, char**, int ()(char16_t const), void (*)()) [/home/ubuntu/UnrealEngine5/Engine/Source/Runtime/Unix/UnixCommonStartup/Private/UnixCommonStartup.cpp:264]
libc.so.6!__libc_start_main(+0xf2)
UnrealEditor!_start()
============================ Crash Log =======================================

My development environment is as follows:

  • Ubuntu 20.04
  • Intel i9-12900K
  • RAM 64GB
  • Nvidia RTX 3070 Ti
3 Likes

It also crash for me.
The very same pattern in MassAgentSubsystem, so I will not paste it again.

I’m using Gentoo Linux, AMD Ryzen5600X, 32GB ram and RTX 3060.
Although I don’t think it have anything to do with hardware spec.
Kind of comforting to see some one with better spec crash in same pattern though…

I will avoid MassAgent whatever totally later in my game development.
Epic, please do something

Getting exactly the same error here with the latest state of the 5.0 branch.

CentOS 7, 2x Quadro P6000, 180GB RAM and a 40 Core Xeon. Specs don’t seem to be the issue.

Hay if you want to play with it I got the Demo fully up and running on Linux

https://www.youtube.com/watch?v=BDF7Iomu8cY
https://johnlogostini.itch.io/the-matrix-awakens