Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Bug IL2CPP Build Fail

Discussion in '2020.2 Beta' started by castor76, Oct 4, 2020.

  1. hazarss

    hazarss

    Joined:
    Aug 16, 2021
    Posts:
    12

    Right now I am using version 2021.2.8f1. Which version should I try?
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
  3. hazarss

    hazarss

    Joined:
    Aug 16, 2021
    Posts:
    12
    Last edited: Apr 8, 2022
  4. LmyJD

    LmyJD

    Joined:
    Nov 18, 2021
    Posts:
    6
    I have the same Issue,The error as follow:
    Require frontend run. artifacts\tundra.dag.json does not exist yet
    error: An attempt was made to load an assembly from a network location, which in previous versions of the .NET Framework would have caused the assembly to run as a sandboxed assembly. In this version of .NET Framework, the CAS policy is not enabled by default, so this loading process can be dangerous. If you do not intend to create a sandboxed assembly with this loading operation, enable the loadFromRemoteSources switch. For more information, see http://go.microsoft.com/fwlink/?LinkId=155569. (System.NotSupportedException)
     
  5. Elapotp

    Elapotp

    Joined:
    May 14, 2014
    Posts:
    98
    Hi, @JoshPeterson

    Checked this topic, but haven't found solution to my issue here, even though it looks similar.
    Could you please check my output and what is wrong with building Android?

    My environment:
    - MacBook Pro 16'' M1 Pro 32 GB
    - Unity 2020.3.30f1
    - DOTS 0.50

    Code (CSharp):
    1. Exception: Failed running /Applications/Unity/Hub/Editor/2020.3.30f1/Unity.app/Contents/il2cpp/build/BeeSettings/offline/bee.exe --no-colors --prebuiltbuildprogram="/Applications/Unity/Hub/Editor/2020.3.30f1/Unity.app/Contents/il2cpp/build/BeeSettings/offline/artifacts/buildprogram/buildprogram.exe"
    2. stdout:
    3. [             ] Require frontend run.  tundra.dag no longer valid. FileSignature timestamp changed: il2cpp_settings.json
    4. [        0s] Executed build program. Created build graph with 2 nodes.
    5. [           0s] Freezing tundra.dag.json into .dag (.dag file didn't exist)
    6. [0/2        4s] Il2Cpp /Users/artem_sukhliak/Evolver/racer_ecs/Library/Il2cppBuildCache/Android/arm64-v8a/Native/arm64-v8a/libil2cpp.so
    7. ##### CommandLine
    8. "/Applications/Unity/Hub/Editor/2020.3.30f1/Unity.app/Contents/il2cpp/build/deploy/netcoreapp3.1/il2cpp" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARM64" --configuration="Release" --outputpath="/Users/artem_sukhliak/Evolver/racer_ecs/Library/Il2cppBuildCache/Android/arm64-v8a/Native/arm64-v8a/libil2cpp.so" --cachedirectory="/Users/artem_sukhliak/Evolver/racer_ecs/Assets/../Library/il2cpp_android_arm64-v8a/il2cpp_cache" --additional-include-directories="/Applications/Unity/Hub/Editor/2020.3.30f1/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" --additional-include-directories="/Applications/Unity/Hub/Editor/2020.3.30f1/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" --baselib-directory="/Applications/Unity/Hub/Editor/2020.3.30f1/PlaybackEngines/AndroidPlayer/Variations/il2cpp/Release/StaticLibs/arm64-v8a" --avoid-dynamic-library-copy --tool-chain-path="/Applications/Unity/Hub/Editor/2020.3.30f1/PlaybackEngines/AndroidPlayer/NDK" --command-log=on --linker-flags="-Wl,--long-plt"  --incremental-g-c-time-slice=3 --profiler-report --map-file-parser="/Applications/Unity/Hub/Editor/2020.3.30f1/Unity.app/Contents/Tools/MapFileParser/MapFileParser" --generatedcppdir="/Users/artem_sukhliak/Evolver/racer_ecs/Library/Il2cppBuildCache/Android/armeabi-v7a/il2cppOutput" --stats-output-dir="/Users/artem_sukhliak/Evolver/racer_ecs/Library/Il2cppBuildCache/Android/armeabi-v7a/il2cppStats" --dotnetprofile="unityaot"
    9. ##### ExitCode
    10. 4
    11. ##### Output
    12. Building libil2cpp.so with AndroidToolChain
    13.    Output directory: /Users/artem_sukhliak/Evolver/racer_ecs/Library/Il2cppBuildCache/Android/arm64-v8a/Native/arm64-v8a
    14.    Cache directory: /Users/artem_sukhliak/Evolver/racer_ecs/Library/il2cpp_android_arm64-v8a/il2cpp_cache
    15. ObjectFiles: 794 of which compiled: 5
    16.    Time Compile: 2413 milliseconds Il2CppGenericMethodPointerTable.cpp
    17.    Time Compile: 1508 milliseconds Il2CppMetadataUsage.c
    18.    Time Compile: 1019 milliseconds Il2CppGenericAdjustorThunkTable.cpp
    19.    Time Compile: 912 milliseconds Il2CppGenericMethodTable.c
    20.    Time Compile: 679 milliseconds Il2CppGenericMethodDefinitions.c
    21. Total compilation time: 3142 milliseconds.
    22. Error: Unity.IL2CPP.Building.BuilderFailedException: /Applications/Unity/Hub/Editor/2020.3.30f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ @"/var/folders/l5/tsyggd892y57vypg6yj974ym0000gn/T/tmpXd60TE.tmp" -o "/Users/artem_sukhliak/Evolver/racer_ecs/Library/il2cpp_android_arm64-v8a/il2cpp_cache/linkresult_7E1F644D2087EA75534BC4E91B9DC983/libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id -stdlib=libc++ -static-libstdc++ -target aarch64-linux-android21 -Wl,--wrap,sigaction "/Applications/Unity/Hub/Editor/2020.3.30f1/PlaybackEngines/AndroidPlayer/Variations/il2cpp/Release/StaticLibs/arm64-v8a/baselib.a" -llog -rdynamic -fuse-ld=bfd -Wl,--long-plt
    23. /Applications/Unity/Hub/Editor/2020.3.30f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.bfd: unrecognized option '--long-plt'
    24. /Applications/Unity/Hub/Editor/2020.3.30f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.bfd: use the --help option for usage information (at ?)
    25. clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    26.   at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP.Building/CppProgramBuilder.cs:line 363
    27.   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP.Building/CppProgramBuilder.cs:line 160
    28.   at il2cpp.Compilation.CompilationDriver.Run(RuntimePlatform platform, BuildingOptions buildingOptions, ReadOnlyCollection`1 matchedAssemblyMethodSourceFiles) in /Users/bokken/build/output/unity/il2cpp/il2cpp/Compilation/CompilationDriver.cs:line 67
    29.   at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, BuildingOptions buildingOptions, Boolean throwExceptions) in /Users/bokken/build/output/unity/il2cpp/il2cpp/Program.cs:line 74
    30. *** Bee build failed (4.47 seconds), 1 items updated, 2 evaluated
    31. stderr:
    32. UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:133)
    33. UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:65)
    34. UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:818)
    35. UnityEditorInternal.IL2CPPBuilder.RunCompileAndLink (System.String il2cppBuildCacheSource) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:651)
    36. UnityEditorInternal.IL2CPPUtils.RunCompileAndLink (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, System.String il2cppBuildCacheSource) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:283)
    37. UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
    38. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
    39. UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
    40. UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
    41. UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:337) (at ?)
    42. UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)
    43. Unity.Build.Classic.Private.BuildPlayerStep:Run(BuildContext) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build.Classic.Private/NonIncremental/Steps/BuildPlayerStep.cs:64)
    44. Unity.Build.BuildStepCollection:Run(BuildContext) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build/BuildStepCollection.cs:77)
    45. Unity.Build.Classic.Private.MissingClassicNonIncrementalPipeline:OnBuild(BuildContext) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build.Classic.Private/NonIncremental/MissingClassicNonIncrementalPipeline.cs:66)
    46. Unity.Build.BuildProcess:Update() (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build/BuildProcess.cs:54)
    47. Unity.Build.BuildPipelineBase:Build(BuildConfiguration, BuildProgress) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build/BuildPipelineBase.cs:111)
    48. Unity.Build.BuildConfiguration:Build() (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build/BuildConfiguration.cs:157)
    49. Unity.Build.Editor.BuildConfigurationInspector:Build(BuildConfiguration) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build.Editor/BuildConfigurationInspector.cs:157)
    50. Unity.Build.Editor.BuildAction:Execute(BuildConfiguration) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build.Editor/BuildConfigurationInspector.cs:36)
    51. Unity.Build.Editor.<>c__DisplayClass48_1:<Build>b__13() (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build.Editor/BuildConfigurationInspector.cs:239)
    52. UnityEditor.EditorApplication:Internal_CallDelayFunctions() (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorApplication.cs:341)
    53.  
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    The relevant part of the error seems to be:

    /Applications/Unity/Hub/Editor/2020.3.30f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.bfd: unrecognized option '--long-plt'

    It looks like code somewhere in the project is passing the --long-plt argument to the linker, but the BFD linker from the Android NDK used with this version of Unity does not understand that argument.

    I don't believe that Unity will pass this argument itself. Something in the code for the project is likely calling PlayerSettings.SetAdditionalIl2CppArgs (https://docs.unity3d.com/ScriptReference/PlayerSettings.SetAdditionalIl2CppArgs.html) to pass that option.
     
  7. Elapotp

    Elapotp

    Joined:
    May 14, 2014
    Posts:
    98
    Great! Thank you!
    Now the error is gone and I could build release Android (yes, I had some custom code that called SetAdditionalIll2CppArgs method).

    But now I have another issue. In release some of my entities missing (they exist in the editor). And I wanted to build debug build. Unfortunately, it failed due to such error (can't provider Editor.log, cause in ~/Library/Logs I don't see Unity folder for some reason):

    Code (CSharp):
    1. Exception: Unity.IL2CPP.Building.BuilderFailedException: /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ @"/var/folders/l5/tsyggd892y57vypg6yj974ym0000gn/T/tmpC4XBN4.tmp" -o "/Users/artem_sukhliak/Evolver/racer_ecs/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/linkresult_5044BF55D6B6B0006B5A3A98BF6CCDF9/libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id -stdlib=libc++ -static-libstdc++ -target armv7-linux-androideabi19 -Wl,--wrap,sigaction "/Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/Variations/il2cpp/Development/StaticLibs/armeabi-v7a/baselib.a" -llog -rdynamic -fuse-ld=gold
    2. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    3. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    4. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    5. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    6. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    7. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    8. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    9. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    10. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    11. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    12. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    13. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    14. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    15. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    16. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    17. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    18. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    19. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    20. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    21. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    22. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    23. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    24. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    25. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    26. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    27. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    28. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    29. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    30. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    31. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    32. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    33. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    34. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    35. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    36. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    37. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    38. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    39. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    40. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    41. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    42. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    43. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    44. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    45. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    46. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    47. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    48. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    49. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    50. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    51. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    52. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    53. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    54. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    55. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    56. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    57. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    58. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    59. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    60. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt
    61. /Applications/Unity/H<message truncated>
    62.  
     
  8. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    So it looks like the issue here is that for one architecture (maybe ARMv7) we need the --long-plt argument (likely because the project is too large for the linker). For the other architecture we do not.

    To confirm that, can you build the two architectures separately?
     
  9. Elapotp

    Elapotp

    Joined:
    May 14, 2014
    Posts:
    98
    Sure. So all 3 runs were invoked for Android with Debug configuration (Engine Code Stripping is enabled with Low configuration).

    1. For ARMv7 I had to add additional ill2cpp arguments and managed to build debug Android successfully. I can't check the build itself (don't have such device, nor could create a virtual device with such hardware within Android Studio Simulator). After all, the only issue I got is about calculating build size.
    Code (CSharp):
    1. System.Exception: apkanalyzer failed to estimate the apk size. Output:
    2.   at Unity.BuildReportInspector.Mobile.AndroidUtilities.GetApkDownloadSize (System.String applicationPath) [0x00126] in /Users/artem_sukhliak/Evolver/racer_ecs/Library/PackageCache/com.unity.build-report-inspector@0.2.2-preview/Editor/Mobile/AndroidUtilities.cs:249
    3.   at Unity.BuildReportInspector.Mobile.AndroidUtilities.GetArchitectureInfo (System.String applicationPath) [0x000f3] in /Users/artem_sukhliak/Evolver/racer_ecs/Library/PackageCache/com.unity.build-report-inspector@0.2.2-preview/Editor/Mobile/AndroidUtilities.cs:128
    4.   at Unity.BuildReportInspector.Mobile.MobileAppendix..ctor (System.String applicationPath) [0x000d8] in /Users/artem_sukhliak/Evolver/racer_ecs/Library/PackageCache/com.unity.build-report-inspector@0.2.2-preview/Editor/Mobile/MobileAppendix.cs:90
    5.   at Unity.BuildReportInspector.Mobile.MobileHelper.GenerateMobileAppendix (System.String applicationPath, System.String guid) [0x0001e] in /Users/artem_sukhliak/Evolver/racer_ecs/Library/PackageCache/com.unity.build-report-inspector@0.2.2-preview/Editor/Mobile/MobileHelper.cs:77
    6. UnityEngine.Debug:LogError (object) (at ?)
    7. Unity.BuildReportInspector.Mobile.MobileHelper:GenerateMobileAppendix (string,string) (at Library/PackageCache/com.unity.build-report-inspector@0.2.2-preview/Editor/Mobile/MobileHelper.cs:83)
    8. Unity.BuildReportInspector.Mobile.MobileHelper:GenerateAndroidAppendix (string,string) (at Library/PackageCache/com.unity.build-report-inspector@0.2.2-preview/Editor/Mobile/MobileHelper.cs:27)
    9. Unity.BuildReportInspector.Mobile.PostBuildSetup:BuildPostProcess (UnityEditor.BuildTarget,string) (at Library/PackageCache/com.unity.build-report-inspector@0.2.2-preview/Editor/Mobile/PostBuildSetup.cs:44)
    10. UnityEditor.BuildPipeline:BuildPlayer (UnityEditor.BuildPlayerOptions) (at ?)
    11. Unity.Build.Classic.Private.BuildPlayerStep:Run (Unity.Build.BuildContext) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build.Classic.Private/NonIncremental/Steps/BuildPlayerStep.cs:64)
    12. Unity.Build.BuildStepCollection:Run (Unity.Build.BuildContext) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build/BuildStepCollection.cs:77)
    13. Unity.Build.Classic.Private.MissingClassicNonIncrementalPipeline:OnBuild (Unity.Build.BuildContext) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build.Classic.Private/NonIncremental/MissingClassicNonIncrementalPipeline.cs:66)
    14. Unity.Build.BuildProcess:Update () (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build/BuildProcess.cs:54)
    15. Unity.Build.BuildPipelineBase:Build (Unity.Build.BuildConfiguration,Unity.Build.BuildProgress) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build/BuildPipelineBase.cs:111)
    16. Unity.Build.BuildConfiguration:Build () (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build/BuildConfiguration.cs:157)
    17. Unity.Build.Editor.BuildConfigurationInspector:Build (Unity.Build.BuildConfiguration) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build.Editor/BuildConfigurationInspector.cs:157)
    18. Unity.Build.Editor.BuildConfigurationInspector/BuildAction:Execute (Unity.Build.BuildConfiguration) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build.Editor/BuildConfigurationInspector.cs:36)
    19. Unity.Build.Editor.BuildConfigurationInspector/<>c__DisplayClass48_1:<Build>b__13 () (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build.Editor/BuildConfigurationInspector.cs:239)
    20. UnityEditor.EditorApplication:Internal_CallDelayFunctions () (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorApplication.cs:341)
    2. Build with just ARM64 architecture and additional ill2cpp args failed. Here is the log:
    Code (CSharp):
    1. Exception: Unity.IL2CPP.Building.BuilderFailedException: /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ @"/var/folders/l5/tsyggd892y57vypg6yj974ym0000gn/T/tmpryHnKg.tmp" -o "/Users/artem_sukhliak/Evolver/racer_ecs/Library/il2cpp_android_arm64-v8a/il2cpp_cache/linkresult_4516D7A20653C093CF367723EB447252/libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id -stdlib=libc++ -static-libstdc++ -target aarch64-linux-android21 -Wl,--wrap,sigaction "/Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/Variations/il2cpp/Development/StaticLibs/arm64-v8a/baselib.a" -llog -rdynamic -fuse-ld=bfd -Wl,--long-plt (at ?)
    2. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.bfd: unrecognized option '--long-plt'
    3. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld.bfd: use the --help option for usage information
    4. clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    5.    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP.Building/CppProgramBuilder.cs:line 378
    6.    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP.Building/CppProgramBuilder.cs:line 160
    7.    at il2cpp.Compilation.CompilationDriver.Run(RuntimePlatform platform, BuildingOptions buildingOptions, ReadOnlyCollection`1 matchedAssemblyMethodSourceFiles) in /Users/bokken/build/output/unity/il2cpp/il2cpp/Compilation/CompilationDriver.cs:line 65
    8.    at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, BuildingOptions buildingOptions, Boolean throwExceptions) in /Users/bokken/build/output/unity/il2cpp/il2cpp/Program.cs:line 74
    9. UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:129)
    10. UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:65)
    11. UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:818)
    12. UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:785)
    13. UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:604)
    14. UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:269)
    15. UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <412eccfbd6dc4a4780661d5ab84b5ba4>:0)
    16. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <412eccfbd6dc4a4780661d5ab84b5ba4>:0)
    17. UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <412eccfbd6dc4a4780661d5ab84b5ba4>:0) (at ?)
    18. UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <412eccfbd6dc4a4780661d5ab84b5ba4>:0)
    19. UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:337)
    20. UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)
    21. Unity.Build.Classic.Private.BuildPlayerStep:Run(BuildContext) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build.Classic.Private/NonIncremental/Steps/BuildPlayerStep.cs:64)
    22. Unity.Build.BuildStepCollection:Run(BuildContext) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build/BuildStepCollection.cs:77)
    23. Unity.Build.Classic.Private.MissingClassicNonIncrementalPipeline:OnBuild(BuildContext) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build.Classic.Private/NonIncremental/MissingClassicNonIncrementalPipeline.cs:66)
    24. Unity.Build.BuildProcess:Update() (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build/BuildProcess.cs:54)
    25. Unity.Build.BuildPipelineBase:Build(BuildConfiguration, BuildProgress) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build/BuildPipelineBase.cs:111)
    26. Unity.Build.BuildConfiguration:Build() (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build/BuildConfiguration.cs:157)
    27. Unity.Build.Editor.BuildConfigurationInspector:Build(BuildConfiguration) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build.Editor/BuildConfigurationInspector.cs:157)
    28. Unity.Build.Editor.BuildAction:Execute(BuildConfiguration) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build.Editor/BuildConfigurationInspector.cs:36)
    29. Unity.Build.Editor.<>c__DisplayClass48_1:<Build>b__13() (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build.Editor/BuildConfigurationInspector.cs:239)
    30. UnityEditor.EditorApplication:Internal_CallDelayFunctions() (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorApplication.cs:341)
    31.  
    3. Interesting, that ARM64 build also failed (it was without --long-plt). Here is the error log:
    Code (CSharp):
    1. Exception: Unity.IL2CPP.Building.BuilderFailedException: /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ @"/var/folders/l5/tsyggd892y57vypg6yj974ym0000gn/T/tmp0AjXDT.tmp" -o "/Users/artem_sukhliak/Evolver/racer_ecs/Library/il2cpp_android_arm64-v8a/il2cpp_cache/linkresult_6B97B47629F26EBDBE09B14550F2A6D6/libil2cpp.so" -shared  (at ?)-Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id -stdlib=libc++ -static-libstdc++ -target aarch64-linux-android21 -Wl,--wrap,sigaction "/Applications/Unity/Hub/Editor/2020. (at ?)3.33f1/PlaybackEngines/AndroidPlayer/Variations/il2cpp/Development/StaticLibs/arm64-v8a/baselib.a" -llog -rdynamic -fuse-ld=bfd (at ?)
    2. /Users/artem_sukhliak/Evolver/racer_ecs/Library/il2cpp_android_arm64-v8a/il2cpp_cache/libil2cpp/84F0BDEA207B3F4C46F45AB9440B3C48.o: In function `il2cpp::vm::Class::HasReferences(Il2CppClass*)': (at ?)
    3. /Applications/Unity/Hub/Editor/2020.3.33f1/Unity.app/Contents/il2cpp/libil2cpp/vm/Class.cpp:1831:(.text._ZN6il2cpp2vm5Class13HasReferencesEP11Il2CppClass+0x30): relocation truncated to fit: R_AARCH64_CALL26 against symbol `abort@@LIBC' defined in .text section in /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/21/libc.so (at ?)
    4. /Users/artem_sukhliak/Evolver/racer_ecs/Library/il2cpp_android_arm64-v8a/il2cpp_cache/libil2cpp/84F0BDEA207B3F4C46F45AB9440B3C48.o: In function `il2cpp::vm::Exception::Raise(Il2CppException*, MethodInfo*)': (at ?)
    5. /Applications/Unity/Hub/Editor/2020.3.33f1/Unity.app/Contents/il2cpp/libil2cpp/vm/Exception.cpp:72:(.text._ZN6il2cpp2vm9Exception5RaiseEP15Il2CppExceptionP10MethodInfo+0x18): relocation truncated to fit: R_AARCH64_CALL26 against symbol `__cxa_allocate_exception' defined in .text.__cxa_allocate_exception section in /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/libc++abi.a(cxa_exception.o) (at ?)
    6. /Users/artem_sukhliak/Evolver/racer_ecs/Library/il2cpp_android_arm64-v8a/il2cpp_cache/libil2cpp/84F0BDEA207B3F4C46F45AB9440B3C48.o: In function `std::__ndk1::_DeallocateCaller::__do_call(void*)': (at ?)
    7. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/include/c++/v1/new:340:(.text._ZN6il2cpp2vm9Exception20GetTypeLoadExceptionERKNS0_17TypeNameParseInfoE+0x2b8): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)' defined in .text._ZdlPv section in /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/libc++_static.a(new.o) (at ?)
    8. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/include/c++/v1/new:340:(.text._ZN6il2cpp2vm9Exception20GetTypeLoadExceptionERKNS0_17TypeNameParseInfoE+0x2ec): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)' defined in .text._ZdlPv section in /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/libc++_static.a(new.o) (at ?)
    9. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/include/c++/v1/new:340:(.text._ZN6il2cpp2vmL34RaiseExceptionForNotFoundInterfaceEPK11Il2CppClassS3_t+0x1c0): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)' defined in .text._ZdlPv section in /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/libc++_static.a(new.o) (at ?)
    10. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/include/c++/v1/new:340:(.text._ZN6il2cpp2vmL34RaiseExceptionForNotFoundInterfaceEPK11Il2CppClassS3_t+0x1f4): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)' defined in .text._ZdlPv section in /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/libc++_static.a(new.o) (at ?)
    11. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/include/c++/v1/new:340:(.text._ZN6il2cpp2vmL34RaiseExceptionForNotFoundInterfaceEPK11Il2CppClassS3_t+0x204): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)' defined in .text._ZdlPv section in /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/libc++_static.a(new.o) (at ?)
    12. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/include/c++/v1/new:340:(.text._ZN6il2cpp2vmL34RaiseExceptionForNotFoundInterfaceEPK11Il2CppClassS3_t+0x214): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)' defined in .text._ZdlPv section in /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/libc++_static.a(new.o) (at ?)
    13. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/include/c++/v1/new:340:(.text._ZN6il2cpp2vmL34RaiseExceptionForNotFoundInterfaceEPK11Il2CppClassS3_t+0x224): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)' defined in .text._ZdlPv section in /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/libc++_static.a(new.o) (at ?)
    14. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/include/c++/v1/new:340:(.text._ZN6il2cpp2vmL34RaiseExceptionForNotFoundInterfaceEPK11Il2CppClassS3_t+0x234): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)' defined in .text._ZdlPv section in /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/libc++_static.a(new.o)
    15. /Applications/Unity/Hub/Editor/2020.3.33f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../sysroot/usr/include/c++/v1/new:340:(.text._ZN6il2cpp2vmL34RaiseExceptionForNotFoundInterfaceEPK11Il2CppClassS3_t+0x244): additional relocation overflows omitted from the output
    16. clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    17.   at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP.Building/CppProgramBuilder.cs:line 378
    18.   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP.Building/CppProgramBuilder.cs:line 160
    19.   at il2cpp.Compilation.CompilationDriver.Run(RuntimePlatform platform, BuildingOptions buildingOptions, ReadOnlyCollection`1 matchedAssemblyMethodSourceFiles) in /Users/bokken/build/output/unity/il2cpp/il2cpp/Compilation/CompilationDriver.cs:line 65
    20.   at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, BuildingOptions buildingOptions, Boolean throwExceptions) in /Users/bokken/build/output/unity/il2cpp/il2cpp/Program.cs:line 74
    21. UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:129)
    22. UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:65)
    23. UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:818)
    24. UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:785)
    25. UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:604)
    26. UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:269)
    27. UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <412eccfbd6dc4a4780661d5ab84b5ba4>:0)
    28. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <412eccfbd6dc4a4780661d5ab84b5ba4>:0)
    29. UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <412eccfbd6dc4a4780661d5ab84b5ba4>:0) (at ?)
    30. UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <412eccfbd6dc4a4780661d5ab84b5ba4>:0)
    31. UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:337)
    32. UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)
    33. Unity.Build.Classic.Private.BuildPlayerStep:Run(BuildContext) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build.Classic.Private/NonIncremental/Steps/BuildPlayerStep.cs:64)
    34. Unity.Build.BuildStepCollection:Run(BuildContext) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build/BuildStepCollection.cs:77)
    35. Unity.Build.Classic.Private.MissingClassicNonIncrementalPipeline:OnBuild(BuildContext) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build.Classic.Private/NonIncremental/MissingClassicNonIncrementalPipeline.cs:66)
    36. Unity.Build.BuildProcess:Update() (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build/BuildProcess.cs:54)
    37. Unity.Build.BuildPipelineBase:Build(BuildConfiguration, BuildProgress) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build/BuildPipelineBase.cs:111)
    38. Unity.Build.BuildConfiguration:Build() (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build/BuildConfiguration.cs:157)
    39. Unity.Build.Editor.BuildConfigurationInspector:Build(BuildConfiguration) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build.Editor/BuildConfigurationInspector.cs:157)
    40. Unity.Build.Editor.BuildAction:Execute(BuildConfiguration) (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build.Editor/BuildConfigurationInspector.cs:36)
    41. Unity.Build.Editor.<>c__DisplayClass48_1:<Build>b__13() (at Library/PackageCache/com.unity.platforms@0.50.0-preview.4/Editor/Unity.Build.Editor/BuildConfigurationInspector.cs:239)
    42. UnityEditor.EditorApplication:Internal_CallDelayFunctions() (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorApplication.cs:341)
    43.  
    4. Just for fun. iOS build crashes on start for both Release and Development configurations :/
    Found a similar problem and left a comment in this thread https://forum.unity.com/threads/xco...-thread-1-exc_bad_access.802374/#post-8083652

    NB. If that helps, can provide Build Report files for each of the builds to use within Build Report Inspector
     
  10. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Thanks for the details! I think that I better understand the issue.

    The fundamental problem is that the project code size grows too large when script debugging is enabled, and bumps up against some bugs in the NDK linker.

    When script debugging is enabled, IL2CPP has to emit extra code, which makes the code size larger and hits these issues. For ARMv7 builds, that --long-plt linker option works around the problem. For ARM64 builds, there is not a known work around.

    In Unity version 2022.2, we have updated to a newer NDK and now use the lld linker. It does not have these issues, so if possible, I think your best option is to upgrade when that release of Unity is available.

    For the iOS crash, I'm not sure what the problem is, but maybe someone on that other thread can help.
     
  11. Elapotp

    Elapotp

    Joined:
    May 14, 2014
    Posts:
    98
    Thank you, @JoshPeterson
    That makes sense. I will update our build pipeline.

    So, the main solution now for me is to reduce codebase size (like to remove useless plugins or replace them with smaller one/handwritten). I tried EngineCode stripping, but the High option does not work in Android (if I am not mistaken, the game crashes on start). So right now I use the Low option.

    Anything else I could do to reduce codebase size?

    About the crash on iOS.
    Could you please share a person's contact/nickname to whom I could talk about the problem? That would really help
     
  12. RemiSoleil

    RemiSoleil

    Joined:
    May 5, 2018
    Posts:
    13
    I fixed it also by deleting the whole folder Il2cppBuildCache in Library. Thank you very much for posting that message!
     
  13. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    The best option is to try to reduce the use of unused code.

    Regarding code stripping, there are two options here. Engine Code Stripping is and on/off toggle. That will cause unused parts of the Unity Engine native code to be removed. I don't think it will impact this problem directly, as that code is in a different part of the binary that does not play into this error.

    Managed code stripping does however have an impact. It removes unused managed code from the project, which can reduce the code size to work around this error. Note that the High managed code stripping level does work on Android, but the specific code in your project may not work with it, as code which users reflection can be problematic for managed code stripping. The managed code stripping system can remove code that it think is unused, because it cannot "see through" reflection calls. You may want to consider the Medium code stripping level if High does not work.

    I would recommend posting on that thread you mentioned. I'm not sure who else could help - that is likely the right place.
     
  14. gamestudiovoron

    gamestudiovoron

    Joined:
    Jul 20, 2018
    Posts:
    9
    I encounter this on versions 2019 2020 and 2021, 16 GB of RAM windows 10 64. Now I have the latest 2021. Out of memory and failure. How to deal with this?:(:(:(:(
    Script debugging disabled.For the experiment, I set up a scene with 2 sprites and one small script. The result is the same
    Code (CSharp):
    1. 'Function Pass Manager' on module 'D:/Projects/Game/Library/Bee/artifacts/Android/il2cppOutput/cpp/Assembly-CSharp13.cpp'.
    2. 4.    Running pass 'Live DEBUG_VALUE analysis' on function '@STARTDeathmatch1vs1_Enemy_m78B5E1A0411C471163A6262117CACD8BAE043FC6'
    3. #0 0x00007ff726c6fca6
    4. #1 0x00007ff9dfaa1881
    5. #2 0x000037952a94cd7f
    6. #3 0x000000c86d7fbe54
    7. #4 0x0000000000000016
    8. #5 0x00007ff726c6fca0
    9. #6 0x0000001b00000008
    10. clang++: error: clang frontend command failed due to signal (use -v to see invocation)
    11. Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
    12. Target: aarch64-unknown-linux-android22
    13. Thread model: posix
    14. InstalledDir: C:/Program Files/Unity/Hub/Editor/2021.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin
    15. clang++: note: diagnostic msg: PLEASE submit a bug report to https://github.com/android-ndk/ndk/issues and include the crash backtrace, preprocessed source, and associated run script.
    16. clang++: note: diagnostic msg:
    17. ********************
    18.  
    19. PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
    20. Preprocessed source(s) and associated run script(s) are located at:
    21. clang++: note: diagnostic msg: C:\Users\VORONG~1\AppData\Local\Temp\Assembly-CSharp13-9989a9.cpp
    22. clang++: note: diagnostic msg: C:\Users\VORONG~1\AppData\Local\Temp\Assembly-CSharp13-9989a9.sh
    23. clang++: note: diagnostic msg:
    24.  
    25. ********************
    26. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)


    Code (CSharp):
    1. 'Function Pass Manager' on module 'D:/Projects/Game/Library/Bee/artifacts/Android/il2cppOutput/cpp/Assembly-CSharp13.cpp'.
    2. 4.    Running pass 'Live DEBUG_VALUE analysis' on function '@STARTDeathmatch1vs1_Enemy_m78B5E1A0411C471163A6262117CACD8BAE043FC6'
    3. #0 0x00007ff726c6fca6
    4. #1 0x00007ff9dfaa1881
    5. #2 0x000075ad49e5f88c
    6. #3 0x000000bca91fba64
    7. #4 0x0000000000000016
    8. #5 0x00007ff726c6fca0
    9. #6 0x0000001b00000008
    10. clang++: error: clang frontend command failed due to signal (use -v to see invocation)
    11. Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
    12. Target: armv7a-unknown-linux-android22
    13. Thread model: posix
    14. InstalledDir: C:/Program Files/Unity/Hub/Editor/2021.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin
    15. clang++: note: diagnostic msg: PLEASE submit a bug report to https://github.com/android-ndk/ndk/issues and include the crash backtrace, preprocessed source, and associated run script.
    16. clang++: note: diagnostic msg:
    17. ********************
    18.  
    19. PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
    20. Preprocessed source(s) and associated run script(s) are located at:
    21. clang++: note: diagnostic msg: C:\Users\VORONG~1\AppData\Local\Temp\Assembly-CSharp13-af97ff.cpp
    22. clang++: note: diagnostic msg: C:\Users\VORONG~1\AppData\Local\Temp\Assembly-CSharp13-af97ff.sh
    23. clang++: note: diagnostic msg:
    24.  
    25. ********************
    26. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    27.  
     
  15. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    This looks like a bit of a different error than the out of memory or code size issues raised in this thread. This looks more like a specific compiler bug.

    Can you provide more details about the generated C++ code in the Deathmatch1vs1_Enemy_m78B5E1A0411C471163A6262117CACD8BAE043FC6 method? Is that a large individual method? If you comment it out, does the problem go away?
     
    gamestudiovoron likes this.
  16. gamestudiovoron

    gamestudiovoron

    Joined:
    Jul 20, 2018
    Posts:
    9
    Hello Josh. I was in a hurry to post a mistake with which I have been suffering for a long time and for a quick compilation for the sake of experiment I collected one scene. The version I migrated from is 2018.4.36f1 (unfortunately it doesn't support above Android 11 (API level 30). Everything works fine on it. I will compile again to show the out-of-memory error and comment out deathmatch1vs1.


    I commented out the script and the assembly was successful, even there were no sagging RAM as before. Josh, after all, this problem was the reason for which there was a lack of memory during the assembly. This is very strange because this script was not anywhere in the assembly, it was also absent in the resource folders .But somehow it was added to the assembly.
    The script does not represent anything at all, and I aim to randomly select the text, I once wrote it, but used a different system.
    Code (CSharp):
    1. string[] genres = new string[]{"Lemon4ik","Classic"};
    2. string randomName = genres[Random.Range(0, genres.Length)];
    3. EnemyName.text = " " + randomName;
    If necessary, I can break the project to completely show the same error if necessary.
    I think he complains because the script with nicknames was too large, script debugging was turned off. There are much larger scripts in the project, and he complained about the one that actually does not exist in the project.
     
    Last edited: May 6, 2022
  17. msehlimohamed96

    msehlimohamed96

    Joined:
    Jan 31, 2019
    Posts:
    1
    Now it's been days and still couldn't Fix the issue
    I need some help please


    MissingMethodException: Newtonsoft.Json.JsonSerializer Newtonsoft.Json.JsonSerializer.Create()
    UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    UnityEditorInternal.IL2CPPBuilder.Run () (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <a40de2f63ada42c98008dd43cde35512>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <a40de2f63ada42c98008dd43cde35512>:0)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <a40de2f63ada42c98008dd43cde35512>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <a40de2f63ada42c98008dd43cde35512>:0)
    UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     
  18. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Which version of Unity are you using? This error looks like there is some problem with the Unity installation.
     
  19. jimmyjiang1948

    jimmyjiang1948

    Joined:
    Jan 10, 2022
    Posts:
    1
    I've got this exact same error message several times, I found the actual cause is my hard disk doesn't have enough space, after I cleaned up my disk, this error was gone.
     
  20. Lord_Supremo

    Lord_Supremo

    Joined:
    Jan 10, 2022
    Posts:
    1
    Thanks It Solved my Problem, but can you tell why is this happening, and Is this a permanent solution or just a workaround?
     
  21. Karishma3010

    Karishma3010

    Joined:
    May 16, 2022
    Posts:
    1
    plz help ...m having this issue from last 3days

    Exception: Failed running C:\Program Files\Unity\Hub\Editor\2020.3.31f1\Editor\Data\il2cpp/build/BeeSettings/offline/bee.exe --no-colors --prebuiltbuildprogram="C:\Program Files\Unity\Hub\Editor\2020.3.31f1\Editor\Data\il2cpp/build/BeeSettings/offline/artifacts/buildprogram/buildprogram.exe"

    stdout:
    error: Method not found: 'System.Collections.Generic.IEnumerable`1<!!0> System.Linq.Enumerable.Append(System.Collections.Generic.IEnumerable`1<!!0>, !!0)'. (System.MissingMethodException)
    at Bee.Core.DynamicLoader.GetAllTypesInAssemblies
    at Bee.Core.DynamicLoader.FindAndCreateInstanceOfEachInAllAssemblies
    at Bee.StandaloneBeeDriver..cctor
    at Bee.StandaloneBeeDriver.RealMain
    at Bee.StandaloneBeeDriver.Main
    stderr:

    UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    UnityEditorInternal.IL2CPPBuilder.Run () (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    UnityEditor.WebGL.WebGlBuildPostprocessor.CompileBuild (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:365)
    UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:913)
    UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     
  22. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    I believe this error means that you may not have the latest version of .NET Framework installed on this computer. Please make sure that .NET Framework 4.8.1 is installed.
     
  23. Jack_retinize

    Jack_retinize

    Joined:
    Mar 21, 2015
    Posts:
    4
    Hi there,

    I'm having the following error when running a Development Build but don't have the issue on a Release Build... any suggestions?

    Code (CSharp):
    1. Exception: Failed running C:\Program Files\Unity\Hub\Editor\2020.3.31f1\Editor\Data\il2cpp\build/deploy/netcoreapp3.1/UnityLinker.exe @"D:/Unity Projects/[ProjectName]/[ProjectName]/Temp/StagingArea/Data/Managed/response.rsp"
    2.  
    3. stdout:
    4. Fatal error in Unity CIL Linker
    5. Mono.Linker.MarkException: Error processing method: 'Microsoft.CodeAnalysis.CSharp.BoundExpression Microsoft.CodeAnalysis.CSharp.Binder::CreateConversion(Microsoft.CodeAnalysis.SyntaxNode,Microsoft.CodeAnalysis.CSharp.BoundExpression,Microsoft.CodeAnalysis.CSharp.Conversion,System.Boolean,Microsoft.CodeAnalysis.CSharp.ConversionGroup,Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol,Microsoft.CodeAnalysis.DiagnosticBag)' in assembly: 'Microsoft.CodeAnalysis.CSharp.dll'
    6. ---> System.NullReferenceException: Object reference not set to an instance of an object.
    7.    at Mono.Linker.Steps.MarkStep.GetMethodWithNoParameters(TypeDefinition type, String methodname)
    8.    at Mono.Linker.Steps.MarkStep.MarkTypeWithDebuggerDisplayAttribute(TypeDefinition type, CustomAttribute attribute)
    9.    at Mono.Linker.Steps.MarkStep.MarkTypeSpecialCustomAttributes(TypeDefinition type)
    10.    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
    11.    at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
    12.    at Unity.Linker.Steps.UnityMarkStep.ProcessMethod(MethodDefinition method)
    13.    at Mono.Linker.Steps.MarkStep.ProcessQueue()
    14.    --- End of inner exception stack trace ---
    15.    at Mono.Linker.Steps.MarkStep.ProcessQueue()
    16.    at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
    17.    at Mono.Linker.Steps.MarkStep.Process()
    18.    at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
    19.    at Unity.Linker.Steps.UnityMarkStep.Process(LinkContext context)
    20.    at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
    21.    at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
    22.    at Mono.Linker.Pipeline.Process(LinkContext context)
    23.    at Unity.Linker.UnityDriver.UnityRun(ILogger customLogger)
    24.    at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger)
    25.    at Unity.Linker.UnityDriver.RunDriver()
    26. stderr:
    27.  
    28. UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    29. UnityEditorInternal.Runner.RunNetCoreProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    30. UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (System.Collections.Generic.IEnumerable`1[T] args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    31. UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String outputFolder, System.String& output, System.String& error, System.Collections.Generic.IEnumerable`1[T] linkXmlFiles, UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    32. UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (UnityEditorInternal.UnityLinkerRunInformation runInformation) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    33. UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, UnityEditorInternal.BaseUnityLinkerPlatformProvider unityLinkerPlatformProvider, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, UnityEditor.RuntimeClassRegistry rcr, UnityEditor.ManagedStrippingLevel managedStrippingLevel) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    34. UnityEditorInternal.IL2CPPBuilder.Run () (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    35. UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    36. DesktopStandalonePostProcessor.RunIL2CPP (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, System.Collections.Generic.List`1[T] cppPlugins) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    37. DesktopStandalonePostProcessor.SetupStagingArea (UnityEditor.Modules.BuildPostProcessArgs args, System.Collections.Generic.HashSet`1[T] filesToNotOverwrite) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    38. DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    39. Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    40. DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    41. UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    42. UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <9f01bdfe2db54f738bae09d12d90e1b8>:0)
    43. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
     
  24. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    I'm unsure why the behavior of a development build or differ from a non-development build in this case. It looks like the assembly causing a problem is Microsoft.CodeAnalysis.CSharp.dll. Do you know where or how that is used in your project?
     
  25. stenfeio

    stenfeio

    Joined:
    Jan 18, 2015
    Posts:
    22
    On M1 Mac and getting related error when building, except there's a reference to cache-error. Cleaned cache and reimported assets, issue still remains:


    Exception: Failed running /Applications/Unity/Hub/Editor/2020.3.29f1/Unity.app/Contents/il2cpp/build/BeeSettings/offline/bee.exe --no-colors --prebuiltbuildprogram="/Applications/Unity/Hub/Editor/2020.3.29f1/Unity.app/Contents/il2cpp/build/BeeSettings/offline/artifacts/buildprogram/buildprogram.exe"
    stdout:
    [ ] Require frontend run. artifacts/tundra.dag.json does not exist yet
    error: 'cache-folder' could not be inferred from environment, nor was it configured in Stevedore.conf (Bee.Stevedore.Program.HumaneException)
    at Bee.Stevedore.Program.StevedoreConfig+GlobalConfig.get_CacheFolder
    at Bee.Stevedore.Program.DownloadCache..ctor
    at Bee.Core.Stevedore.StevedoreUnpacker..ctor
    at Bee.Core.RequirementsForRunningBuildCode..ctor
    at Bee.Core.Backend.InstallRequirementsForRunningBuildCode
    at Bee.StandaloneBeeDriver.CreateBuildGraph
    at Bee.StandaloneBeeDriver.InvokeTundra
    at Bee.StandaloneBeeDriver.BuildMain
    at Bee.StandaloneDriver.BuildTopLevelBeeCommand.Execute
    at Bee.StandaloneBeeDriver.RealMain
    at Bee.StandaloneBeeDriver.Main
    stderr:
    UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:133)
    UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:65)
    UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:818)
    UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:785)
    UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:604)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:269)
    UnityEditor.iOS.PostProcessiPhonePlayer.CrossCompileManagedDlls (UnityEditor.iOS.PostProcessiPhonePlayer+BuildSettings bs, UnityEditor.iOS.PostProcessiPhonePlayer+ProjectPaths paths, UnityEditor.AssemblyReferenceChecker checker, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport buildReport) (at /Users/bokken/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:908)
    UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.PostProcessiPhonePlayer+BuildSettings bs, UnityEditor.iOS.PostProcessiPhonePlayer+ProjectPaths paths, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport buildReport) (at /Users/bokken/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:718)
    UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.PostProcessorSettings postProcessorSettings, UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:663)
    UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:45)
    Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:49)
    UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:29)
    UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:337)
    UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)
    Vuforia.DaltonPlayer.Editor.DaltonMenus:Build_iOS(BuildOptions) (at /Users/talal/Desktop/Code/daltonplayerunity/DPUC/Editor/Scripts/DPUCMenus.cs:270)
    Vuforia.DaltonPlayer.Editor.<>c:<Build_iOS_release>b__3_0() (at /Users/talal/Desktop/Code/daltonplayerunity/DPUC/Editor/Scripts/DPUCMenus.cs:53)
    Vuforia.DaltonPlayer.Editor.DaltonBuildWrapper:PerformBuild(String, Func`1) (at /Users/talal/Desktop/Code/daltonplayerunity/DPUC/Editor/Scripts/DaltonBuildWrapper.cs:37)
    Vuforia.DaltonPlayer.Editor.DaltonMenus:Build_iOS_release() (at /Users/talal/Desktop/Code/daltonplayerunity/DPUC/Editor/Scripts/DPUCMenus.cs:50)
     
  26. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Is there a Library/Caches directory in the directory pointed to by $HOME? The code here is trying to find that cache directory, and seems to be struggling.
     
  27. andyshih51

    andyshih51

    Joined:
    Feb 11, 2018
    Posts:
    5
    M1 Macbook here, I am having a similar problem HERE, but in my case, I cannot even open a project with Unity Editor.

    Here is everything under this project's Library folder. Compared to a project successfully set up on Windows, I think I am missing `BurstCache` and StateCache` folders. I have deleted the Library folder and let Unity rebuild, but the rebuilding process looked like it halted with that error message saying I have to open Unity Editor in Safe Mode.

    ash•MyUnity/asdf/Library» ls -la
    total 43992
    drwxr-xr-x 30 ash staff 960 Jul 28 02:28 .
    drwxr-xr-x 13 ash staff 416 Jul 28 02:21 ..
    -rw-r--r--@ 1 ash staff 6148 Jul 28 02:31 .DS_Store
    drwxr-xr-x 3 ash staff 96 Jul 28 02:21 APIUpdater
    -rw-r--r-- 1 ash staff 4124 Jul 28 02:21 AnnotationManager
    -rwxr-xr-x 1 ash staff 15925248 Jul 28 02:21 ArtifactDB
    -rwxr-xr-x 1 ash staff 8192 Jul 28 02:21 ArtifactDB-lock
    drwxr-xr-x 258 ash staff 8256 Jul 28 02:21 Artifacts
    drwxr-xr-x 5 ash staff 160 Jul 28 02:21 Bee
    -rw-r--r-- 1 ash staff 0 Jul 28 02:21 BuildPlayer.prefs
    -rw-r--r-- 1 ash staff 4152 Jul 28 02:21 BuildSettings.asset
    -rw-r--r-- 1 ash staff 207 Jul 28 02:21 EditorInstance.json
    -rw-r--r-- 1 ash staff 182 Jul 28 02:21 EditorOnlyScriptingSettings.json
    -rw-r--r-- 1 ash staff 79 Jul 28 02:21 EditorOnlyVirtualTextureState.json
    -rw-r--r-- 1 ash staff 7764 Jul 28 02:21 EditorUserBuildSettings.asset
    -rw-r--r-- 1 ash staff 4104 Jul 28 02:21 InspectorExpandedItems.asset
    -rw-r--r-- 1 ash staff 65 Jul 28 02:21 LibraryFormatVersion.txt
    -rw-r--r-- 1 ash staff 4112 Jul 28 02:21 MonoManager.asset
    drwxr-xr-x 59 ash staff 1888 Jul 28 02:21 PackageCache
    drwxr-xr-x 4 ash staff 128 Jul 28 02:21 PackageManager
    -rw-r--r-- 1 ash staff 4112 Jul 28 02:24 SceneVisibilityState.asset
    drwxr-xr-x 2 ash staff 64 Jul 28 02:21 ScriptAssemblies
    -rw-r--r-- 1 ash staff 13521 Jul 28 02:21 ScriptMapper
    drwxr-xr-x 5 ash staff 160 Jul 28 02:21 ShaderCache
    -rw-r--r-- 1 ash staff 16384 Jul 28 02:21 ShaderCache.db
    -rwxr-xr-x 1 ash staff 4997120 Jul 28 02:24 SourceAssetDB
    -rwxr-xr-x 1 ash staff 8192 Jul 28 02:21 SourceAssetDB-lock
    -rw-r--r-- 1 ash staff 4120 Jul 28 02:21 SpriteAtlasDatabase.asset
    -rw-r--r-- 1 ash staff 221434 Jul 28 02:21 Style.catalog
    drwxr-xr-x 4 ash staff 128 Jul 28 02:21 TempArtifacts


    Edit: The stack trace I'm getting in Unity Editor Safe Mode is:
     
    Last edited: Jul 28, 2022
  28. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Sorry, I was not clear. In this case, I mean the macOS Library/Caches folder, not the one in the Unity project. I believe that the Unity editor is running a tool trying to locate the cache directory in your home directory, but it cannot find that. I think this happens when the $HOME environment variable is not set correctly.
     
  29. andyshih51

    andyshih51

    Joined:
    Feb 11, 2018
    Posts:
    5
    Thanks for explanation. My $HOME env variable is correct, and `$HOME/Library/Unity/cache` folder exists with 2 subfolders `npm` and `packages`, both of which have a bunch of things inside them. Could this be file permission-related problem or something else?


    ash•~» echo $HOME
    /Users/ash
    ash•~» cd $HOME/Library/Unity
    ash•~/Library/Unity» ls -l
    total 8
    drwxr-xr-x 4 ash staff 128 Jun 10 09:39 cache
    drwxr-xr-x 3 ash staff 96 Jun 10 06:45 config
    drwxr-xr-x 3 ash staff 96 Jun 10 08:34 licenses
    -rw-r--r-- 1 ash staff 2853 Jul 27 16:37 rest-certificate.pem
    ash•~/Library/Unity» cd cache
    ash•Library/Unity/cache» ls -l
    total 0
    drwxr-xr-x 3 ash staff 96 Jun 10 09:39 npm
    drwxr-xr-x 3 ash staff 96 Jun 10 09:39 packages
     
  30. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    That seems to be correct. I'm not sure what the issue is then.
     
  31. andyshih51

    andyshih51

    Joined:
    Feb 11, 2018
    Posts:
    5
    I fixed the problem! I did as this article suggested and made a little bash script to define $HOME locally and then launch Unity Hub inside this script. Now I can open projects with Unity Editor!

    #!/bin/bash
    export HOME=/Users/ash
    nohup "/Applications/Unity Hub.app/Contents/MacOS/Unity Hub" &>/dev/null &


    My next question is: Why did this problem happen? (It didn't happen a month ago). Is there a config file where Unity's own environment variables are defined? (It doesn't seem to inherit the value of shell environment's $HOME)
     
  32. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    I'm not sure why this happened - maybe something changed with the Unity hub. I don't believe that there is a config file for anything like this in Unity though.
     
    gamestudiovoron likes this.
  33. salihdogustayhan

    salihdogustayhan

    Joined:
    Aug 25, 2022
    Posts:
    1
    Hi Josh , i am having the similar issue with "Failed running /Applications/Unity/Hub/Editor/2020.3.30f1/Unity.app/Contents/il2cpp/build/deploy/netcoreapp3.1/UnityLinker"

    Is there any directive solution to this?


    macOS Monterey 12.5 m1
    Unity 2020.3.30f1

    upload_2022-8-25_23-36-33.png

    1-
    Exception: Failed running /Applications/Unity/Hub/Editor/2020.3.30f1/Unity.app/Contents/il2cpp/build/deploy/netcoreapp3.1/UnityLinker @"/Users/salihdogustayhan/hyper-count-and-shoot/Temp/StagingArea/assets/bin/Data/Managed/response.rsp"
    stdout:
    Fatal error in Unity CIL Linker
    Mono.Linker.Steps.XmlResolutionException: Failed to process XML description: /Users/salihdogustayhan/hyper-count-and-shoot/Assets/StreamingAssets/aa/AddressablesLink/link.xml
    ---> System.ArgumentException: Name can not be empty
    at Mono.Cecil.AssemblyNameReference.Parse(String fullName)
    at Mono.Linker.Steps.ResolveFromXmlStep.GetAssemblyName(XPathNavigator nav) in /Users/bokken/build/output/unity/il2cpp/repos/monolinker/src/linker/Linker.Steps/ResolveFromXmlStep.cs:line 660
    at Unity.Linker.Steps.Resolution.UnityResolveFromXmlStep.GetAssemblyName(XPathNavigator nav) in /Users/bokken/build/output/unity/il2cpp/UnityLinker/Linker.Steps/Resolution/UnityResolveFromXmlStep.cs:line 171
    at Unity.Linker.Steps.Resolution.UnityResolveFromXmlStep.ProcessAssemblies(LinkContext context, XPathNodeIterator iterator) in /Users/bokken/build/output/unity/il2cpp/UnityLinker/Linker.Steps/Resolution/UnityResolveFromXmlStep.cs:line 77
    at Mono.Linker.Steps.ResolveFromXmlStep.Process() in /Users/bokken/build/output/unity/il2cpp/repos/monolinker/src/linker/Linker.Steps/ResolveFromXmlStep.cs:line 93
    --- End of inner exception stack trace ---
    at Mono.Linker.Steps.ResolveFromXmlStep.Process() in /Users/bokken/build/output/unity/il2cpp/repos/monolinker/src/linker/Linker.Steps/ResolveFromXmlStep.cs:line 96
    at Mono.Linker.Steps.BaseStep.Process(LinkContext context) in /Users/bokken/build/output/unity/il2cpp/repos/monolinker/src/linker/Linker.Steps/BaseStep.cs:line 60
    at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step) in /Users/bokken/build/output/unity/il2cpp/repos/monolinker/src/linker/Linker/Pipeline.cs:line 135
    at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step) in /Users/bokken/build/output/unity/il2cpp/UnityLinker/Linker/UnityPipeline.cs:line 23
    at Mono.Linker.Pipeline.Process(LinkContext context) in /Users/bokken/build/output/unity/il2cpp/repos/monolinker/src/linker/Linker/Pipeline.cs:line 127
    at Unity.Linker.UnityDriver.UnityRun(ILogger customLogger) in /Users/bokken/build/output/unity/il2cpp/UnityLinker/Linker/UnityDriver.cs:line 98
    at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger) in /Users/bokken/build/output/unity/il2cpp/UnityLinker/Linker/UnityDriver.cs:line 66
    at Unity.Linker.UnityDriver.RunDriver() in /Users/bokken/build/output/unity/il2cpp/UnityLinker/Linker/UnityDriver.cs:line 48
    stderr:
    UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:133)
    UnityEditorInternal.Runner.RunNetCoreProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:91)
    UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (System.Collections.Generic.IEnumerable`1[T] args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:155)
    UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String outputFolder, System.String& output, System.String& error, System.Collections.Generic.IEnumerable`1[T] linkXmlFiles, UnityEditorInternal.UnityLinkerRunInformation runInformation) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:146)
    UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (UnityEditorInternal.UnityLinkerRunInformation runInformation) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:261)
    UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, UnityEditorInternal.BaseUnityLinkerPlatformProvider unityLinkerPlatformProvider, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, UnityEditor.RuntimeClassRegistry rcr, UnityEditor.ManagedStrippingLevel managedStrippingLevel) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:167)
    UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:582)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:269)
    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
    UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:337)
    UnityEditor.DefaultBuildMethods:BuildPlayer(BuildPlayerOptions)
    Mobge.HyperCasualSetup.LevelSetAddressablePreBuildProcessor:BuildPlayerHandler(BuildPlayerOptions) (at Assets/Submodules/HyperCasualSetup/LevelSystems/Editor/LevelSetAddressablePreBuildProcessor.cs:26)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)


    2-
    Build completed with a result of 'Failed' in 43 seconds (43303 ms)
    UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
    Mobge.HyperCasualSetup.LevelSetAddressablePreBuildProcessor:BuildPlayerHandler (UnityEditor.BuildPlayerOptions) (at Assets/Submodules/HyperCasualSetup/LevelSystems/Editor/LevelSetAddressablePreBuildProcessor.cs:26)
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)


    3-
    UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002be] in /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:190
    at Mobge.HyperCasualSetup.LevelSetAddressablePreBuildProcessor.BuildPlayerHandler (UnityEditor.BuildPlayerOptions options) [0x00020] in /Users/salihdogustayhan/hyper-count-and-shoot/Assets/Submodules/HyperCasualSetup/LevelSystems/Editor/LevelSetAddressablePreBuildProcessor.cs:26
    at (wrapper delegate-invoke) System.Action`1[UnityEditor.BuildPlayerOptions].invoke_void_T(UnityEditor.BuildPlayerOptions)
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00072] in /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:93
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
     
  34. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Based on the error, it looks like there is a typo or mistake in the file Assets/StreamingAssets/aa/AddressablesLink/link.xml in your proces. Unfortunately the error message does not indicate which line of that file is a problem, but it seems like an "name" attribute might be empty when it should have some value.

    Can you check on that file to see if you can determine the cause?
     
    gamestudiovoron likes this.
  35. notunusual

    notunusual

    Joined:
    Jun 13, 2016
    Posts:
    12
    So this has been driving me nuts for far too long.

    We were also receiving the "Failed to remove directory" error when attempting to do Android builds.



    We could resolve this by cleaning up the folder before hand manually for example.

    This was happening all the time earlier in the year, then just magically went away. A few weeks back it reared it's ugly head again.

    Being fed up without a response I added a manually pre-build step to our process which would attempt to clear the

    Library\Bee\artifacts\Android\il2cppOutput\

    However when doing this, I noticed that it was throwing an exception due to 'System.UnauthorizedAccessException'.

    When looking at the files in question, I realized they were both marked as read only, which is why both my sccript and unity fail to clean this folder out.

    Turns out, it's copying files from various places across the repository, and the 2 files in question are both marked as read only (we use perforce which defaults to read only for non checked out files).

    So as a test, I checked them out before a build, and sure enough the copies places in the il2cppOutput\cpp folder then no longer had the read only attribute, and unity is correctly able to clean the folder allowing the android builds to build as expected.

    I have a ticket open with unity support to try and better understand why it's copying those files, but also for unity to be able to clean up after itself even if those files are set to read only.

    In the interim i've made my prebuild step recursively remove any read only attributes and then delete the folder as a stop gap until we can sort this out properly.

    Hopefully this is useful to others.
     
  36. ss-conor

    ss-conor

    Joined:
    Dec 7, 2020
    Posts:
    7
    Hi Josh, apologies for necro-ing this thread but I have a similar issue.

    I have just been trying to update our project from 2020.3.40f1 -> 2021.3.10f1, but my Android builds (which support both ARMv7 and ARM64) are blocked when Development Build is checked.

    I get the same error here spammed:
    Code (CSharp):
    1. 10:59:48  C:/Program Files/Unity/Hub/Editor/2021.3.10f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin\ld.gold.exe: error: PLT offset too large, try linking with --long-plt
    I have tried solutions such as this: https://issuetracker.unity3d.com/is...-error-plt-offset-too-large-try-with-long-plt

    But have been unsuccesful. Can you please advise? We did not have this issue at all in 2020 and we are not looking to update to 2022 until it reaches LTS.
     
  37. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    No worries! Let me first ask - when you say "Development Build" does that also mean that the "Script Debugging" option in the Build Settings window is enabled? In most cases we have only seen this problem when Script Debugging is enabled, so I would like to understand the specifics of your case.
     
  38. ss-conor

    ss-conor

    Joined:
    Dec 7, 2020
    Posts:
    7
    Hi Josh, yes that's correct, both are selected ("Development Build", and then "Script Debugging").
     
  39. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    To make sure I have the full picture, does this problem happen when "Script Debugging" is not enabled?
     
  40. ss-conor

    ss-conor

    Joined:
    Dec 7, 2020
    Posts:
    7
    No, I am able to succesfully build when "Script Debugging" is disabled.
     
  41. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Thanks for all of the details. This does look like the same issue we have seen before. It sounds like the code increased in size enough during the change to 2021.3 that this problem was triggered.

    The best advice I can give is to use Unity 2022.2, where we have shipped a newer Android NDK which is not subject to this bug in the native linker.
     
  42. ss-conor

    ss-conor

    Joined:
    Dec 7, 2020
    Posts:
    7
    Hi Josh, thanks for your advice.

    As mentioned in a previous comment, we are not looking to upgrade to 2022 unti it reaches LTS.

    Will this change be backported to 2021 at all? Or are there any alternative recommended fixes? Otherwise, I think we might just stay on 2019 until then.
     
  43. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Sorry, I missed the previous comment about the Unity version.

    I don't believe we will back port this change, unfortunately.
     
  44. Uzair55

    Uzair55

    Joined:
    Dec 16, 2022
    Posts:
    2
    stdout: [ ] Require frontend run. tundra.dag no longer valid. FileSignature timestamp changed: il2cpp_settings.json [ 0s] Executed build program. Created build graph with 2 nodes. [ 0s] Freezing tundra.dag.json into .dag (.dag file didn't exist) [ 0s] Delete 10 artifact files that are no longer in use.
     
  45. Uzair55

    Uzair55

    Joined:
    Dec 16, 2022
    Posts:
    2
    Am facing this issue many times please could you help me anyone
     
  46. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    I suspect there is another error in the editor log file with more details. Can you look for it there and provide it?
     
  47. jongning

    jongning

    Joined:
    Jun 14, 2022
    Posts:
    7
    Help i am build VR game and Got alot of Building error

    C:\Program Files\Unity\Hub\Editor\2021.3.16f1\Editor\Data\il2cpp\build\deploy\il2cpp.exe --convert-to-cpp --data-folder=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Library/Bee/artifacts/Android/il2cppOutput/data --generatedcppdir=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Library/Bee/artifacts/Android/il2cppOutput/cpp --enable-analytics --emit-null-checks --enable-array-bounds-check --dotnetprofile=unityaot-linux --profiler-report --profiler-output-file=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Library/Bee/artifacts/il2cpp_conv_wlcy.traceevents --print-command-line
    Error: il2cpp.InvalidCommandLineArgumentsException: One or more assemblies must be specified using either --directory or --assembly
    at il2cpp.Conversion.ContextDataFactory.CreateConversionDataFromOptions(Il2CppCommandLineArguments il2CppCommandLineArguments)
    at il2cpp.Conversion.ConversionDriver.Run(Il2CppCommandLineArguments il2CppCommandLineArguments)
    at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, Boolean throwExceptions)
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)


    Building C:\Users\jongn\Desktop\Unity Code\Zurgirial\Library\Bee\artifacts\unitylinker_xy1a.traceevents failed with output:
    C:\Program Files\Unity\Hub\Editor\2021.3.16f1\Editor\Data\il2cpp\build\deploy\UnityLinker.exe --search-directory=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed --out=Library/Bee/artifacts/Android/ManagedStripped --include-link-xml=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed\MethodsToPreserve.xml --include-link-xml=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed\TypesInScenes.xml --include-link-xml=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed\SerializedTypes.xml --include-link-xml=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Assets\..\Temp\InputSystemLink.xml --include-link-xml=C:\Users\jongn\Desktop\Unity Code\Zurgirial\Assets\SteamVR\link.xml --include-link-xml=C:/Program Files/Unity/Hub/Editor/2021.3.16f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/AndroidNativeLink.xml --include-directory=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed --profiler-report --profiler-output-file=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Library/Bee/artifacts/unitylinker_xy1a.traceevents --dotnetprofile=unityaot-linux --dotnetruntime=Il2Cpp --platform=Android --use-editor-options --editor-settings-flag=None,Development --enable-engine-module-stripping --engine-stripping-flag=EnableUnityConnect --engine-stripping-flag=EnablePerformanceReporting --engine-stripping-flag=EnableAnalytics --engine-modules-asset-file=C:/Program Files/Unity/Hub/Editor/2021.3.16f1/Editor/Data/PlaybackEngines/AndroidPlayer/modules.asset --editor-data-file=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/EditorToUnityLinkerData.json --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Oculus.Voice.Demo.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Oculus.AudioManager.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Oculus.Interaction.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/AssistantCoreSDKRuntime.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Facebook.Wit.Conduit.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/LitJson.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Unity.ProBuilder.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Unity.InputSystem.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Facebook.WitAI.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Facebook.Wit.Dictation.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Timeline.Samples.Tween.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Timeline.Samples.TimeDilation.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Unity.XR.Interaction.Toolkit.Samples.StarterAssets.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Oculus.VR.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Unity.XR.Management.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Unity.XR.OpenXR.Features.RuntimeDebugger.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Facebook.Wit.TTS.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Timeline.Samples.Utilities.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Oculus.Interaction.Samples.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Timeline.Samples.Video.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Oculus.Spatializer.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Unity.Timeline.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Unity.TextMeshPro.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Unity.XR.Interaction.Toolkit.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Unity.XR.OpenXR.Features.MockRuntime.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Unity.XR.OpenXR.Features.OculusQuestSupport.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Timeline.Samples.Text.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Timeline.Samples.Annotation.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Unity.Postprocessing.Runtime.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/VoiceSDK.Dictation.Runtime.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Facebook.Wit.TTS.Samples.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Oculus.Platform.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Oculus.LipSync.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Unity.XR.OpenXR.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/VoiceSDK.Runtime.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Unity.XR.OpenXR.Features.ConformanceAutomation.dll --include-unity-root-assembly=C:/Users/jongn/Desktop/Unity Code/Zurgirial/Temp/StagingArea/Data/Managed/Unity.XR.Oculus.dll --print-command-line --enable-analytics
    Fatal error in Unity CIL Linker
    System.ArgumentException: Malformed name
    at Mono.Cecil.AssemblyNameReference.Parse(String fullName)
    at Mono.Linker.LinkContext.GetType(String fullName)
    at System.Linq.Enumerable.SelectArrayIterator`2.MoveNext()
    at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
    at Unity.Linker.Steps.Marking.ClassLibraryMarking.DoAdditionalTypeProcessingForWebRequest(TypeDefinition type)
    at Unity.Linker.Steps.UnityMarkStep.DoAdditionalTypeProcessing(TypeDefinition type)
    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
    at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field, DependencyInfo& reason)
    at Mono.Linker.Steps.MarkStep.MarkField(FieldReference reference, DependencyInfo reason)
    at Unity.Linker.Steps.UnityMarkStep.Unity.Linker.Steps.Marking.IMarkStepCallbacks.MarkField(FieldReference reference, DependencyInfo& reason)
    at Unity.Linker.Steps.Marking.MonoBehaviourMarking.MarkNeededFields(TypeDefinition type)
    at Unity.Linker.Steps.Marking.MonoBehaviourMarking.DoAdditionalTypeProcessing(TypeDefinition type)
    at Unity.Linker.Steps.UnityMarkStep.DoAdditionalTypeProcessing(TypeDefinition type)
    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
    at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field, DependencyInfo& reason)
    at Mono.Linker.Steps.MarkStep.MarkField(FieldReference reference, DependencyInfo reason)
    at Unity.Linker.Steps.UnityMarkStep.Unity.Linker.Steps.Marking.IMarkStepCallbacks.MarkField(FieldReference reference, DependencyInfo& reason)
    at Unity.Linker.Steps.Marking.MonoBehaviourMarking.MarkNeededFields(TypeDefinition type)
    at Unity.Linker.Steps.Marking.MonoBehaviourMarking.DoAdditionalTypeProcessing(TypeDefinition type)
    at Unity.Linker.Steps.UnityMarkStep.DoAdditionalTypeProcessing(TypeDefinition type)
    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
    at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field, DependencyInfo& reason)
    at Mono.Linker.Steps.MarkStep.MarkEntireTypeInternal(TypeDefinition type, Boolean includeBaseTypes, DependencyInfo& reason, IMemberDefinition sourceLocationMember, HashSet`1 typesAlreadyVisited)
    at Mono.Linker.Steps.MarkStep.MarkEntireAssembly(AssemblyDefinition assembly)
    at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
    at Unity.Linker.Steps.UnityMarkStep.InitializeAssembly(AssemblyDefinition assembly)
    at Mono.Linker.Steps.MarkStep.Initialize()
    at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
    at Unity.Linker.Steps.UnityMarkStep.Process(LinkContext context)
    at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
    at Mono.Linker.Pipeline.Process(LinkContext context)
    at Unity.Linker.UnityDriver.UnityRun(Boolean noProfilerAllowed, ILogger customLogger)
    at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger, Boolean noProfilerAllowed)
    at Unity.Linker.UnityDriver.RunDriver()
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)


    BuildFailedException: Incremental Player build failed!


    UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <11d97693183d4a6bb35c29ae7882c66b>:0
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <11d97693183d4a6bb35c29ae7882c66b>:0
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
    UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <11d97693183d4a6bb35c29ae7882c66b>:0)
    UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <11d97693183d4a6bb35c29ae7882c66b>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <62de111f18d242d586f9a078a33b1ba2>:0)
    UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <11d97693183d4a6bb35c29ae7882c66b>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)


    upload_2023-2-16_0-12-11.png
     
  48. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    This is not an error we have seen before. Can you submit a project that causes this with a bug report?

    https://unity.com/releases/editor/qa/bug-reporting
     
    jongning likes this.
  49. bretfortt

    bretfortt

    Joined:
    Jun 20, 2020
    Posts:
    2
    Anyone new here:

    Make sure you're not using some preview package or

    Code (CSharp):
    1.  
    2. using NUnit.Framework;
    3.  
    Instead of:
    Code (CSharp):
    1.  
    2. using UnityEngine.Assertions;
    3.