ALS-Refactored icon indicating copy to clipboard operation
ALS-Refactored copied to clipboard

Linux Compilation Issues

Open josephjaspers opened this issue 10 months ago • 3 comments

Reopening: https://github.com/Sixze/ALS-Refactored/issues/468

Clangs C++20 and MSVC C++20 support differ.

  1. Bitfield class init isn't supported yet in Clang.
        uint8 bStateValid : 1 {false};

Error:

<Project>/Plugins/ALS-Refactored/Source/ALS/Public/Utility/AlsMath.h:35:24: error: default member initializer for bit-field is a C++20 extension [-Werror,-Wc++20-extensions]
  1. ALS.Build.cs needs CppStandard = CppStandardVersion.Cpp20 for Clang to use C++20. (Regardless, this doesn't fix the other missing features).

  2. Requires isn't supported yet. (Tragically)

requires std::is_floating_point_v<ValueType>

error:

Plugins/ALS-Refactored/Source/ALS/Public/Utility/AlsMath.h:102:76: error: expected ';' at end of declaration list
        template <typename ValueType> requires std::is_floating_point_v<ValueType>
  1. ALSEditor.Build.cs is missing "AnimGraphRuntime" as a module dependency Error:
ld.lld: error: undefined symbol: vtable for FAnimNode_BlendListBase
>>> referenced by AnimNode_BlendListBase.h:24 (Runtime/AnimGraphRuntime/Public/AnimNodes/AnimNode_BlendListBase.h:24)
>>>               /home/joseph/Documents/Unreal Projects/Bells/Plugins/ALS-Refactored/Intermediate/Build/Linux/x64/UnrealEditor/Development/ALSEditor/Module.ALSEditor.cpp.o:(FAlsAnimNode_GameplayTagsBlend::~FAlsAnimNode_GameplayTagsBlend())
>>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

josephjaspers avatar Apr 17 '24 16:04 josephjaspers

This is weird. C++20 is the default in UE 5.3, and I don't have all these issues on my machine. Check the version of Clang on your machine, UE 5.3 requires 16.0.6.

Sixze avatar Apr 18 '24 16:04 Sixze

Epic bundles their version of Clang with UE~~ maybe they just need to upgrade to a newer version? I'll check it out~~

josephjaspers avatar Apr 18 '24 19:04 josephjaspers

I met the same issue No.4. And I add "AnimGraphRuntime" to ALSEditor.Build.cs resolve it. When I build dedicated server on linux.

watsonsong avatar Apr 23 '24 08:04 watsonsong