UbaCoordinatorHorde compilation and linking issue

Hi,

like everybody else trying to compile Uba with the Github release of 5.6.1, I hit the compilation issues in UbaSessionServer.cpp and UbaCacheService.cpp. To fix them, I cherry-picked the fixes from the 5.6 branch.

However, I am also hitting compilation issues in UbaCoordinatorHorde.cpp and also some linking issues in UbaCore. I tried digging on Github for a fix but I can’t see one, not even in ue5-main.

Here are the issues that I am encountering in that file (oh the irony of Uba failing to compile Uba files):

9>[1/3] Compile [x64] Module.UbaCoordinatorHorde.cpp
9>E:\UnrealEngine\Engine\Source\Developer\UbaCoordinatorHorde\Private\UbaCoordinatorHorde.cpp(42,12): error C2664: 'void FUbaHordeAgentManager::SetAddClientCallback(FUbaHordeAgentManager::FAddClientCallback (__cdecl *),void *)': cannot convert argument 1 from 'uba::Coordinator::AddClientCallback (__cdecl *)' to 'FUbaHordeAgentManager::FAddClientCallback (__cdecl *)'
9>		m_manager.SetAddClientCallback(callback, userData);
9>		     ^
9>E:\UnrealEngine\Engine\Source\Developer\UbaCoordinatorHorde\Private\UbaCoordinatorHorde.cpp(42,34): note: This conversion requires a reinterpret_cast, a C-style cast or parenthesized function-style cast
9>		m_manager.SetAddClientCallback(callback, userData);
9>		                ^
9>E:\UnrealEngine\Engine\Source\Developer\UbaCoordinatorHorde\Public\UbaHordeAgentManager.h(23,31): note: see declaration of 'FUbaHordeAgentManager::SetAddClientCallback'
9>	UBACOORDINATORHORDE_API void SetAddClientCallback(FAddClientCallback* Callback, void* UserData);
9>	               ^
9>E:\UnrealEngine\Engine\Source\Developer\UbaCoordinatorHorde\Private\UbaCoordinatorHorde.cpp(42,12): note: while trying to match the argument list '(uba::Coordinator::AddClientCallback (__cdecl *), void *)'
9>		m_manager.SetAddClientCallback(callback, userData);
9>		     ^
9>E:\UnrealEngine\Engine\Source\Developer\UbaCoordinatorHorde\Private\UbaCoordinatorHorde.cpp(82,5): error C2039: 'SetPool': is not a member of 'FUbaHordeAgentManager'
9>		m.SetPool(info.pool);
9>		 ^
9>E:\UnrealEngine\Engine\Source\Developer\UbaCoordinatorHorde\Public\UbaHordeAgentManager.h(14,7): note: see declaration of 'FUbaHordeAgentManager'
9>class FUbaHordeAgentManager
9>   ^
9>E:\UnrealEngine\Engine\Source\Developer\UbaCoordinatorHorde\Private\UbaCoordinatorHorde.cpp(83,5): error C2039: 'SetMaxCoreCount': is not a member of 'FUbaHordeAgentManager'
9>		m.SetMaxCoreCount(info.maxCoreCount);
9>		 ^
9>E:\UnrealEngine\Engine\Source\Developer\UbaCoordinatorHorde\Public\UbaHordeAgentManager.h(14,7): note: see declaration of 'FUbaHordeAgentManager'
9>class FUbaHordeAgentManager
9>   ^
9>Trace written to file E:/UnrealEngine/Engine/Programs/UnrealBuildTool/Log.uba with size 4.7kb
9>Total time in Unreal Build Accelerator local executor: 2.54 seconds
9>
9>Result: Failed (OtherCompilationError)

Pasting the full linking errors would exceed the amount of allowed characters but here they are stripped from referencers :

8>Module.UbaCore.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl uba::UbaAssert(wchar_t const *,char const *,unsigned int,char const *,bool,unsigned int,void *,unsigned int)" 
8>Module.UbaCore.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl uba::FatalError(unsigned int,wchar_t const *,...)"
8>Module.UbaCore.cpp.obj : error LNK2019: unresolved external symbol OodleCore_Plugins_SetAllocators
8>Module.UbaCore.cpp.obj : error LNK2019: unresolved external symbol OodleLZ_Compress
8>Module.UbaCore.cpp.obj : error LNK2019: unresolved external symbol OodleLZ_Decompress
8>Module.UbaCore.cpp.obj : error LNK2019: unresolved external symbol OodleLZ_GetCompressedBufferSizeNeeded

This is not mission critical but I would like to know what I should do with these files in order to get a clean build tree.

Thanks,

Jean-Michel Gilbert

Steps to Reproduce
Compile Uba with Github 5.6.1-release branch.

Hi,

This is currently also broken on UE5/Main and we have a JIRA for this (UE-297608). From what I found, the culprit came from CL 39349975 that was backed out at CL 39357763, but some method signature (inlining) were modified and were backed out and not readded. So I would analyze the CL from 39349975 up to the latest and put back the missing methods if you really need to compile and debug UBA. Otherwise, you can just use the precompiled libraries from Engine\Binaries\Win64\UnrealBuildAccelerator or if you are experiencing problem, pull the one from the Main branch.

Regards,

Patrick

Thanks for your answer. We’ll take a look.