My project has been packaging fine for months but yesterday started giving me strange errors during the build command.
-I have not edited any engine content, and have since rebuilt the engine and my project in VS just to be safe, and it worked fine compiling in VS!
-I can still package my project for Windows, it is only IOS that is giving me problems.
-I will post the stream of errors below. Any pointers as to where I should look to resolve these errors would be helpful!
=
UATHelper: Packaging (iOS): [1/43] Compile PCH.Core.h
UATHelper: Packaging (iOS): [2/43] Compile BuildSettings.cpp
UATHelper: Packaging (iOS): [4/43] Compile PCH.CoreUObject.h
UATHelper: Packaging (iOS): [3/43] Compile Module.TraceLog.cpp
UATHelper: Packaging (iOS): [5/43] Link UnrealHeaderTool-BuildSettings.dylib
UATHelper: Packaging (iOS): [6/43] Compile SharedPCH.Core.ShadowErrors.h
UATHelper: Packaging (iOS): [7/43] Link UnrealHeaderTool-TraceLog.dylib
UATHelper: Packaging (iOS): [8/43] Compile Module.UnrealHeaderTool.cpp
UATHelper: Packaging (iOS): [9/43] Compile Module.Core.1_of_12.cpp
UATHelper: Packaging (iOS): [10/43] Compile Module.Core.11_of_12.cpp
UATHelper: Packaging (iOS): [11/43] Compile Module.Core.3_of_12.cpp
UATHelper: Packaging (iOS): In file included from C:\Users\Dekle\UESource\Engine\Intermediate\Build\Mac\UnrealHeaderTool\Development\UnrealHeaderTool\Module.UnrealHeaderTool.cpp:6:
UATHelper: Packaging (iOS): In file included from C:\Users\Dekle\UESource\Engine\Source\Programs\UnrealHeaderTool\Private\CodeGenerator.cpp:52:
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Runtime\Core\Public\Algo\Copy.h:37:20: error: loop variable 'Value' is always a copy because the range of type 'const TFieldRange' does not return a reference [-Werror,-Wrange-loop-analysis]
UATHelper: Packaging (iOS): for (const auto& Value : Input)
UATHelper: Packaging (iOS): ^
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Programs\UnrealHeaderTool\Private\CodeGenerator.cpp:2071:9: note: in instantiation of function template specialization 'Algo::Copy, TArray > >' requested here
UATHelper: Packaging (iOS): Algo::Copy(TFieldRange(Class, EFieldIteratorFlags::ExcludeSuper), Props);
UATHelper: Packaging (iOS): ^
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Runtime\Core\Public\Algo\Copy.h:37:8: note: use non-reference type 'UProperty *'
UATHelper: Packaging (iOS): for (const auto& Value : Input)
UATHelper: Packaging (iOS): ^~~~~~~~~~~~~~~~~~~
PackagingResults: Error: loop variable 'Value' is always a copy because the range of type 'const TFieldRange' does not return a reference [-Werror,-Wrange-loop-analysis]
UATHelper: Packaging (iOS): 1 error generated.
UATHelper: Packaging (iOS): [12/43] Compile Module.Core.2_of_12.cpp
UATHelper: Packaging (iOS): [13/43] Compile Module.Core.5_of_12.cpp
UATHelper: Packaging (iOS): [14/43] Compile Module.Core.4_of_12.cpp
UATHelper: Packaging (iOS): In file included from C:\Users\Dekle\UESource\Engine\Intermediate\Build\Mac\UnrealHeaderTool\Development\Core\Module.Core.4_of_12.cpp:28:
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Runtime\Core\Private\Internationalization\InternationalizationMetadata.cpp:262:18: error: loop variable 'Pair' of type 'const TTuple >' creates a copy from type 'const TTuple >' [-Werror,-Wrange-loop-analysis]
UATHelper: Packaging (iOS): for (const auto Pair : Values)
UATHelper: Packaging (iOS): ^
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Runtime\Core\Private\Internationalization\InternationalizationMetadata.cpp:262:7: note: use reference type 'const TTuple > &' to prevent copying
UATHelper: Packaging (iOS): for (const auto Pair : Values)
UATHelper: Packaging (iOS): ^~~~~~~~~~~~~~~~~
UATHelper: Packaging (iOS): &
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Runtime\Core\Private\Internationalization\InternationalizationMetadata.cpp:546:43: error: loop variable 'Element' of type 'const TSharedPtr' creates a copy from type 'const TSharedPtr' [-Werror,-Wrange-loop-analysis]
UATHelper: Packaging (iOS): for (const TSharedPtr Element : Value)
UATHelper: Packaging (iOS): ^
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Runtime\Core\Private\Internationalization\InternationalizationMetadata.cpp:546:7: note: use reference type 'const TSharedPtr &' to prevent copying
UATHelper: Packaging (iOS): for (const TSharedPtr Element : Value)
UATHelper: Packaging (iOS): ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
UATHelper: Packaging (iOS): &
PackagingResults: Error: loop variable 'Pair' of type 'const TTuple >' creates a copy from type 'const TTuple >' [-Werror,-Wrange-loop-analysis]
PackagingResults: Error: loop variable 'Element' of type 'const TSharedPtr' creates a copy from type 'const TSharedPtr' [-Werror,-Wrange-loop-analysis]
UATHelper: Packaging (iOS): In file included from C:\Users\Dekle\UESource\Engine\Intermediate\Build\Mac\UnrealHeaderTool\Development\Core\Module.Core.4_of_12.cpp:40:
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Runtime\Core\Private\Internationalization\StringTableCore.cpp:363:20: error: loop variable 'MetaDataColumnName' of type 'const FName' creates a copy from type 'const FName' [-Werror,-Wrange-loop-analysis]
UATHelper: Packaging (iOS): for (const FName MetaDataColumnName : MetaDataColumnNames)
UATHelper: Packaging (iOS): ^
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Runtime\Core\Private\Internationalization\StringTableCore.cpp:363:8: note: use reference type 'const FName &' to prevent copying
UATHelper: Packaging (iOS): for (const FName MetaDataColumnName : MetaDataColumnNames)
UATHelper: Packaging (iOS): ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
UATHelper: Packaging (iOS): &
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Runtime\Core\Private\Internationalization\StringTableCore.cpp:389:21: error: loop variable 'MetaDataColumnName' of type 'const FName' creates a copy from type 'const FName' [-Werror,-Wrange-loop-analysis]
UATHelper: Packaging (iOS): for (const FName MetaDataColumnName : MetaDataColumnNames)
UATHelper: Packaging (iOS): ^
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Runtime\Core\Private\Internationalization\StringTableCore.cpp:389:9: note: use reference type 'const FName &' to prevent copying
UATHelper: Packaging (iOS): for (const FName MetaDataColumnName : MetaDataColumnNames)
UATHelper: Packaging (iOS): ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
UATHelper: Packaging (iOS): &
PackagingResults: Error: loop variable 'MetaDataColumnName' of type 'const FName' creates a copy from type 'const FName' [-Werror,-Wrange-loop-analysis]
PackagingResults: Error: loop variable 'MetaDataColumnName' of type 'const FName' creates a copy from type 'const FName' [-Werror,-Wrange-loop-analysis]
UATHelper: Packaging (iOS): 4 errors generated.
UATHelper: Packaging (iOS): [15/43] Compile Module.Core.7_of_12.cpp
UATHelper: Packaging (iOS): [16/43] Compile Module.Core.8_of_12.cpp
UATHelper: Packaging (iOS): [17/43] Compile Module.Core.9_of_12.cpp
UATHelper: Packaging (iOS): In file included from C:\Users\Dekle\UESource\Engine\Intermediate\Build\Mac\UnrealHeaderTool\Development\Core\Module.Core.9_of_12.cpp:19:
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Runtime\Core\Private\Modules\ModuleManager.cpp:676:18: error: loop variable 'ModuleIt' of type 'const TTuple >' creates a copy from type 'const TTuple >'
[-Werror,-Wrange-loop-analysis]
UATHelper: Packaging (iOS): for (const auto ModuleIt : Modules)
UATHelper: Packaging (iOS): ^
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Runtime\Core\Private\Modules\ModuleManager.cpp:676:7: note: use reference type 'const TTuple > &' to prevent copying
UATHelper: Packaging (iOS): for (const auto ModuleIt : Modules)
UATHelper: Packaging (iOS): ^~~~~~~~~~~~~~~~~~~~~
UATHelper: Packaging (iOS): &
PackagingResults: Error: loop variable 'ModuleIt' of type 'const TTuple >' creates a copy from type 'const TTuple >' [-Werror,-Wrange-loop-analysis]
UATHelper: Packaging (iOS): 1 error generated.
UATHelper: Packaging (iOS): [18/43] Compile Module.Core.10_of_12.cpp
UATHelper: Packaging (iOS): [19/43] Compile Module.Core.12_of_12.cpp
UATHelper: Packaging (iOS): &
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Runtime\Core\Private\Tests\Misc\TimecodeTest.cpp:237:24: error: loop variable 'FrameRate' of type 'const FFrameRate' creates a copy from type 'const FFrameRate' [-Werror,-Wrange-loop-analysis]
UATHelper: Packaging (iOS): for (const FFrameRate FrameRate : CommonFrameRates)
UATHelper: Packaging (iOS): ^
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Runtime\Core\Private\Tests\Misc\TimecodeTest.cpp:237:7: note: use reference type 'const FFrameRate &' to prevent copying
UATHelper: Packaging (iOS): for (const FFrameRate FrameRate : CommonFrameRates)
UATHelper: Packaging (iOS): ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
PackagingResults: Error: loop variable 'FrameRate' of type 'const FFrameRate' creates a copy from type 'const FFrameRate' [-Werror,-Wrange-loop-analysis]
UATHelper: Packaging (iOS): &
UATHelper: Packaging (iOS): 1 error generated.
UATHelper: Packaging (iOS): [20/43] Compile Module.Core.6_of_12.cpp
UATHelper: Packaging (iOS): [21/43] Compile Module.Json.cpp
UATHelper: Packaging (iOS): [22/43] Compile Module.Projects.cpp
UATHelper: Packaging (iOS): In file included from C:\Users\Dekle\UESource\Engine\Intermediate\Build\Mac\UnrealHeaderTool\Development\Projects\Module.Projects.cpp:6:
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Runtime\Projects\Private\PluginManager.cpp:1185:51: error: loop variable 'PluginPair' of type 'const TPair >' (aka 'const TTuple >') creates a copy from type 'const TPair >' [-Wer
ror,-Wrange-loop-analysis]
UATHelper: Packaging (iOS): for( const TPair PluginPair : AllPlugins )
UATHelper: Packaging (iOS): ^
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Runtime\Projects\Private\PluginManager.cpp:1185:7: note: use reference type 'const TPair > &' (aka 'const TTuple > &') to prevent copying
UATHelper: Packaging (iOS): for( const TPair PluginPair : AllPlugins )
UATHelper: Packaging (iOS): ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
UATHelper: Packaging (iOS): &
UATHelper: Packaging (iOS): In file included from C:\Users\Dekle\UESource\Engine\Intermediate\Build\Mac\UnrealHeaderTool\Development\Projects\Module.Projects.cpp:7:
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Runtime\Projects\Private\PluginManifest.cpp:36:36: error: loop variable 'JsonEntryValue' of type 'const TSharedPtr' creates a copy from type 'const TSharedPtr' [-Werror,-Wrange-loop-analysis]
UATHelper: Packaging (iOS): for (const TSharedPtr JsonEntryValue : JsonContents)
UATHelper: Packaging (iOS): ^
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Runtime\Projects\Private\PluginManifest.cpp:36:7: note: use reference type 'const TSharedPtr &' to prevent copying
UATHelper: Packaging (iOS): for (const TSharedPtr JsonEntryValue : JsonContents)
UATHelper: Packaging (iOS): ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
UATHelper: Packaging (iOS): &
PackagingResults: Error: loop variable 'PluginPair' of type 'const TPair >' (aka 'const TTuple >') creates a copy from type 'const TPair >' [-Werror,-Wrange-loop-analysis]
PackagingResults: Error: loop variable 'JsonEntryValue' of type 'const TSharedPtr' creates a copy from type 'const TSharedPtr' [-Werror,-Wrange-loop-analysis]
UATHelper: Packaging (iOS): 2 errors generated.
UATHelper: Packaging (iOS): [23/43] Compile Module.CoreUObject.4_of_7.cpp
UATHelper: Packaging (iOS): In file included from C:\Users\Dekle\UESource\Engine\Intermediate\Build\Mac\UnrealHeaderTool\Development\CoreUObject\Module.CoreUObject.4_of_7.cpp:16:
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Runtime\CoreUObject\Private\UObject\PackageReload.cpp:398:19: error: loop variable 'Dependency' of type 'const FName' creates a copy from type 'const FName' [-Werror,-Wrange-loop-analysis]
UATHelper: Packaging (iOS): for (const FName Dependency : PackageDependencies)
UATHelper: Packaging (iOS): ^
UATHelper: Packaging (iOS): C:\Users\Dekle\UESource\Engine\Source\Runtime\CoreUObject\Private\UObject\PackageReload.cpp:398:7: note: use reference type 'const FName &' to prevent copying
UATHelper: Packaging (iOS): for (const FName Dependency : PackageDependencies)
UATHelper: Packaging (iOS): ^~~~~~~~~~~~~~~~~~~~~~~~
UATHelper: Packaging (iOS): &
PackagingResults: Error: loop variable 'Dependency' of type 'const FName' creates a copy from type 'const FName' [-Werror,-Wrange-loop-analysis]
UATHelper: Packaging (iOS): [24/43] Compile Module.CoreUObject.5_of_7.cpp
UATHelper: Packaging (iOS): [25/43] Compile Module.CoreUObject.6_of_7.cpp
UATHelper: Packaging (iOS): 1 error generated.
UATHelper: Packaging (iOS): [26/43] Compile Module.CoreUObject.7_of_7.cpp
UATHelper: Packaging (iOS): [27/43] Compile Module.CoreUObject.3_of_7.cpp
UATHelper: Packaging (iOS): [28/43] Compile Module.CoreUObject.2_of_7.cpp
UATHelper: Packaging (iOS): [29/43] Compile Module.CoreUObject.1_of_7.cpp
UATHelper: Packaging (iOS): Generating UnrealHeaderTool-TraceLog.dSYM
UATHelper: Packaging (iOS): Generating UnrealHeaderTool-BuildSettings.dSYM
UATHelper: Packaging (iOS): [Remote] Downloading C:\Users\Dekle\UESource\Engine\Programs\AutomationTool\Saved\Logs\UBT-BloodlandMobile-IOS-Development_2_Remote.txt
UATHelper: Packaging (iOS): Total execution time: 398.36 seconds
UATHelper: Packaging (iOS): Took 398.394998s to run UnrealBuildTool.exe, ExitCode=7
UATHelper: Packaging (iOS): UnrealBuildTool failed. See log for more details. (C:\Users\Dekle\UESource\Engine\Programs\AutomationTool\Saved\Logs\UBT-BloodlandMobile-IOS-Development_2.txt)
UATHelper: Packaging (iOS): AutomationTool exiting with ExitCode=7 (7)
UATHelper: Packaging (iOS): BUILD FAILED
PackagingResults: Error: Unknown Error