ALS-Refactored
ALS-Refactored copied to clipboard
Linux Compilation Issues
Reopening: https://github.com/Sixze/ALS-Refactored/issues/468
Clangs C++20 and MSVC C++20 support differ.
- 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]
-
ALS.Build.cs needs
CppStandard = CppStandardVersion.Cpp20
for Clang to use C++20. (Regardless, this doesn't fix the other missing features). -
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>
- 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)
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.
Epic bundles their version of Clang with UE~~ maybe they just need to upgrade to a newer version? I'll check it out~~
I met the same issue No.4. And I add "AnimGraphRuntime" to ALSEditor.Build.cs resolve it. When I build dedicated server on linux.