Megafunk / MassSample

My understanding of Unreal Engine 5's experimental ECS plugin with a small sample project.
MIT License
681 stars 112 forks source link

Can't build for Android #56

Closed zzanggu closed 11 months ago

zzanggu commented 11 months ago

UATHelper: Packaging (Android (ASTC)): Executing up to 12 processes, one per physical core UATHelper: Packaging (Android (ASTC)): Building 3 actions with 3 processes... UATHelper: Packaging (Android (ASTC)): [1/3] Compile [arm64] Module.MassCommunitySample.cpp UATHelper: Packaging (Android (ASTC)): In file included from F:/Project/MassSample/Plugins/MassCommunitySample/Intermediate/Build/Android/a/UnrealGame/Development/MassCommunitySample/Module.MassCommunitySample.cpp:3: UATHelper: Packaging (Android (ASTC)): In file included from F:/Project/MassSample/Plugins/MassCommunitySample/Intermediate/Build/Android/UnrealGame/Inc/MassCommunitySample/UHT/LambdaBasedMassProcessor.gen.cpp:8: UATHelper: Packaging (Android (ASTC)): In file included from F:/Project/MassSample/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/LambdaBasedMassProcessor.h:9: UATHelper: Packaging (Android (ASTC)): F:/Project/MassSample/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/MSMassUtils.h(26,4): error: use of function template name with no prior declaration in function call with explicit template arguments is a C++20 extension [-Werror,-Wc++20-extensions] UATHelper: Packaging (Android (ASTC)): (AddAnyFragment(Query, TFragments::StaticStruct()), ...); UATHelper: Packaging (Android (ASTC)): ^ UATHelper: Packaging (Android (ASTC)): In file included from F:/Project/MassSample/Plugins/MassCommunitySample/Intermediate/Build/Android/a/UnrealGame/Development/MassCommunitySample/Module.MassCommunitySample.cpp:3: UATHelper: Packaging (Android (ASTC)): In file included from F:/Project/MassSample/Plugins/MassCommunitySample/Intermediate/Build/Android/UnrealGame/Inc/MassCommunitySample/UHT/LambdaBasedMassProcessor.gen.cpp:8: UATHelper: Packaging (Android (ASTC)): F:/Project/MassSample/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/LambdaBasedMassProcessor.h(63,3): warning: 'bAllowDuplicates' is deprecated: This property is deprecated. Use bAllowMultipleInstances instead Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. [-Wdeprecated-declarations] UATHelper: Packaging (Android (ASTC)): bAllowDuplicates = true; UATHelper: Packaging (Android (ASTC)): ^ UATHelper: Packaging (Android (ASTC)): C:/Epic/UE_5.2/Engine/Plugins/Runtime/MassEntity/Source/MassEntity/Public/MassProcessor.h(141,2): note: 'bAllowDuplicates' has been explicitly marked deprecated here UATHelper: Packaging (Android (ASTC)): UE_DEPRECATED(5.2, "This property is deprecated. Use bAllowMultipleInstances instead") UATHelper: Packaging (Android (ASTC)): ^ UATHelper: Packaging (Android (ASTC)): C:/Epic/UE_5.2/Engine/Source/Runtime/Core/Public/Misc/CoreMiscDefines.h(259,43): note: expanded from macro 'UE_DEPRECATED' UATHelper: Packaging (Android (ASTC)): #define UE_DEPRECATED(Version, Message) [[deprecated(Message " Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.")]] UATHelper: Packaging (Android (ASTC)): ^ UATHelper: Packaging (Android (ASTC)): In file included from F:/Project/MassSample/Plugins/MassCommunitySample/Intermediate/Build/Android/a/UnrealGame/Development/MassCommunitySample/Module.MassCommunitySample.cpp:70: UATHelper: Packaging (Android (ASTC)): F:/Project/MassSample/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/Physics/MSPhysicsInitProcessors.cpp(67,26): error: static_cast from 'const char ' to 'char ' is not allowed UATHelper: Packaging (Android (ASTC)): ActorParams.DebugName = static_cast<char>("MassPhysicsBody"); UATHelper: Packaging (Android (ASTC)): ^~~~~~~~~ UATHelper: Packaging (Android (ASTC)): In file included from F:/Project/MassSample/Plugins/MassCommunitySample/Intermediate/Build/Android/a/UnrealGame/Development/MassCommunitySample/Module.MassCommunitySample.cpp:75: UATHelper: Packaging (Android (ASTC)): F:/Project/MassSample/Plugins/MassCommunitySample/Source/MassCommunitySample/ProjectileSim/Processors/MSProjectileHitObservers.cpp(98,46): error: member access into incomplete type 'UPhysicalMaterial' UATHelper: Packaging (Android (ASTC)): Velocity = HitResult.PhysMaterial.Get()->Restitution; UATHelper: Packaging (Android (ASTC)): ^ UATHelper: Packaging (Android (ASTC)): C:/Epic/UE_5.2/Engine/Source/Runtime/Engine/Classes/Engine/EngineTypes.h(27,7): note: forward declaration of 'UPhysicalMaterial' UATHelper: Packaging (Android (ASTC)): class UPhysicalMaterial; UATHelper: Packaging (Android (ASTC)): ^ UATHelper: Packaging (Android (ASTC)): In file included from F:/Project/MassSample/Plugins/MassCommunitySample/Intermediate/Build/Android/a/UnrealGame/Development/MassCommunitySample/Module.MassCommunitySample.cpp:3: UATHelper: Packaging (Android (ASTC)): In file included from F:/Project/MassSample/Plugins/MassCommunitySample/Intermediate/Build/Android/UnrealGame/Inc/MassCommunitySample/UHT/LambdaBasedMassProcessor.gen.cpp:8: UATHelper: Packaging (Android (ASTC)): In file included from F:/Project/MassSample/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/LambdaBasedMassProcessor.h:9: UATHelper: Packaging (Android (ASTC)): F:/Project/MassSample/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/MSMassUtils.h(26,4): error: call to function 'AddAnyFragment' that is neither visible in the template definition nor found by argument-dependent lookup UATHelper: Packaging (Android (ASTC)): (AddAnyFragment(Query, TFragments::StaticStruct()), ...); UATHelper: Packaging (Android (ASTC)): ^ UATHelper: Packaging (Android (ASTC)): F:/Project/MassSample/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/LambdaBasedMassProcessor.h(134,38): note: in instantiation of function template specialization 'MSMassUtils::Query<const FMSMassPhysicsFragment, FTransformFragment>' requested here UATHelper: Packaging (Android (ASTC)): NewProcessor->Query = MSMassUtils::Query(); UATHelper: Packaging (Android (ASTC)): ^ UATHelper: Packaging (Android (ASTC)): F:/Project/MassSample/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/Physics/MSMassPhysics.cpp(21,15): note: in instantiation of function template specialization 'MSMassUtils::GameThreadProcessor<const FMSMassPhysicsFragment, FTransformFragment>' requested here UATHelper: Packaging (Android (ASTC)): MSMassUtils::GameThreadProcessor<const FMSMassPhysicsFragment,FTransformFragment>(EntitySim).ForEachChunk([this](FMassExecutionContext& Context) UATHelper: Packaging (Android (ASTC)): ^ UATHelper: Packaging (Android (ASTC)): F:/Project/MassSample/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/MSMassUtils.h(32,7): note: 'AddAnyFragment' should be declared prior to the call site or in the global namespace UATHelper: Packaging (Android (ASTC)): void AddAnyFragment(FMassEntityQuery& Query, UScriptStruct& Type) UATHelper: Packaging (Android (ASTC)): ^ UATHelper: Packaging (Android (ASTC)): F:/Project/MassSample/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/MSMassUtils.h(26,4): error: use of function template name with no prior declaration in function call with explicit template arguments is a C++20 extension [-Werror,-Wc++20-extensions] UATHelper: Packaging (Android (ASTC)): (AddAnyFragment(Query, TFragments::StaticStruct()), ...); UATHelper: Packaging (Android (ASTC)): ^ PackagingResults: Error: use of function template name with no prior declaration in function call with explicit template arguments is a C++20 extension [-Werror,-Wc++20-extensions] PackagingResults: Warning: 'bAllowDuplicates' is deprecated: This property is deprecated. Use bAllowMultipleInstances instead Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. [-Wdeprecated-declarations] PackagingResults: Error: static_cast from 'const char ' to 'char ' is not allowed PackagingResults: Error: member access into incomplete type 'UPhysicalMaterial' PackagingResults: Error: call to function 'AddAnyFragment' that is neither visible in the template definition nor found by argument-dependent lookup PackagingResults: Error: use of function template name with no prior declaration in function call with explicit template arguments is a C++20 extension [-Werror,-Wc++20-extensions] UATHelper: Packaging (Android (ASTC)): F:/Project/MassSample/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/MSMassUtils.h(26,4): error: call to function 'AddAnyFragment' that is neither visible in the template definition nor found by argument-dependent lookup UATHelper: Packaging (Android (ASTC)): F:/Project/MassSample/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/MSMassUtils.h(32,7): note: 'AddAnyFragment' should be declared prior to the call site or in the global namespace UATHelper: Packaging (Android (ASTC)): void AddAnyFragment(FMassEntityQuery& Query, UScriptStruct& Type) UATHelper: Packaging (Android (ASTC)): ^ UATHelper: Packaging (Android (ASTC)): F:/Project/MassSample/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/MSMassUtils.h(26,4): error: use of function template name with no prior declaration in function call with explicit template arguments is a C++20 extension [-Werror,-Wc++20-extensions] UATHelper: Packaging (Android (ASTC)): (AddAnyFragment(Query, TFragments::StaticStruct()), ...); UATHelper: Packaging (Android (ASTC)): ^ UATHelper: Packaging (Android (ASTC)): 1 warning and 7 errors generated. UATHelper: Packaging (Android (ASTC)): [2/3] clang++ MassSampleProject-arm64.so cancelled UATHelper: Packaging (Android (ASTC)): [3/3] WriteMetadata MassSampleProject.target cancelled UATHelper: Packaging (Android (ASTC)): Took 14.9295537s to run dotnet.exe, ExitCode=6 UATHelper: Packaging (Android (ASTC)): UnrealBuildTool failed. See log for more details. (C:\Users\duelg\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Epic+UE_5.2\UBT-MassSampleProject-Android-Development.txt) UATHelper: Packaging (Android (ASTC)): AutomationTool executed for 0h 0m 16s UATHelper: Packaging (Android (ASTC)): AutomationTool exiting with ExitCode=6 (6) UATHelper: Packaging (Android (ASTC)): BUILD FAILED

Megafunk commented 11 months ago

I think I have a fix, give me a moment

Megafunk commented 11 months ago

I tried a fix,... let me know if it helps