Search Unity

Feedback [Burst] Unexpected exception Burst.Compiler.IL.Aot.AotLinkerException: The native link step failed.

Discussion in 'Burst' started by iamarugin, Mar 27, 2020.

  1. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    Tried to install Burst 1.3.0 preview.8
    When running game I got these errors in console:
    Code (CSharp):
    1. lld: error: undefined symbol: ldexpf
    2. >>> referenced by unknown\unknown:0
    3. >>>               C:\\Unity\\rocket_science\\Temp\\Burst\\burst-aotjojfvldp.r7m\\lib_burst_generated_part_0.obj:(C84D5A21D816CF0F)
    4. >>> referenced by unknown\unknown:0
    5. >>>               C:\\Unity\\rocket_science\\Temp\\Burst\\burst-aotjojfvldp.r7m\\lib_burst_generated_part_0.obj:(C84D5A21D816CF0F)
    6. >>> referenced by unknown\unknown:0
    7. >>>               C:\\Unity\\rocket_science\\Temp\\Burst\\burst-aotjojfvldp.r7m\\lib_burst_generated_part_0.obj:(C84D5A21D816CF0F)
    8. >>> referenced by unknown\unknown:0
    9. >>>               C:\\Unity\\rocket_science\\Temp\\Burst\\burst-aotjojfvldp.r7m\\lib_burst_generated_part_0.obj:(C84D5A21D816CF0F)
    10.  
    11.  
    12. While compiling job: System.Void Unity.Entities.JobChunkExtensions/JobChunkProducer`1<QB.EdgeFansSystem/QB.<>c__DisplayClass_OnUpdate_LambdaJob1>::Execute(Unity.Entities.JobChunkExtensions/JobChunkWrapper`1<T>&,System.IntPtr,System.IntPtr,Unity.Jobs.LowLevel.Unsafe.JobRanges&,System.Int32)
    13. at <empty>:line 0
    Code (CSharp):
    1. Unexpected exception Burst.Compiler.IL.Aot.AotLinkerException: The native link step failed. Check previous exception in the log - linker command line : "C:\Unity\rocket_science\Library\PackageCache\com.unity.burst@1.3.0-preview.8\.Runtime\hostwin\lld -flavor link "@C:\Users\valer\AppData\Local\Temp\tmp2fd5726e.tmp""
    2.   at Burst.Compiler.IL.Aot.AotNativeLinkBase.RunNativeLinkerTool (System.String command, System.String arguments, System.String errorMessage, System.String commandType, System.String workingDirectory) [0x00074] in <db0e45d9997943f08d641850e219b36b>:0
    3.   at Burst.Compiler.IL.Aot.AotNativeLinkLLVMWindows.Link (Burst.Backend.TargetCpu targetCpu, System.Collections.Generic.List`1[T] inputFiles, System.String outputFile, System.Boolean enableDebugInfo) [0x00123] in <db0e45d9997943f08d641850e219b36b>:0
    4.   at Burst.Compiler.IL.Aot.AotNativeLink.LinkNatively (Burst.Compiler.IL.Aot.AotCompilerOptions options, System.Collections.Generic.List`1[T] inputFiles, System.String outputFile, System.Boolean enableDebugInfo, System.IO.TextWriter consoleOut, System.IO.TextWriter consoleError) [0x0001e] in <db0e45d9997943f08d641850e219b36b>:0
    5.   at Burst.Compiler.IL.Aot.AotCompiler.Link (System.Collections.Generic.List`1[T] groups, System.String nameSuffix, Burst.Compiler.IL.Aot.AotCompilerOptions compilerOptions, System.IO.TextWriter consoleOut, System.IO.TextWriter consoleError) [0x00182] in <db0e45d9997943f08d641850e219b36b>:0
    6.   at Burst.Compiler.IL.Jit.Providers.OnDiskJitProvider.BeginCompileModule (Burst.Backend.Module module, Burst.Compiler.IL.NativeCompiler nativeCompiler, Burst.Compiler.IL.NativeCompilerOptions options, Burst.Compiler.IL.Jit.JitOptions jitOptions, Burst.Compiler.IL.Helpers.Hash128& moduleHash, Burst.Compiler.IL.Jit.JitCacheManager jitCacheManager) [0x00089] in <db0e45d9997943f08d641850e219b36b>:0
    7.   at Burst.Compiler.IL.Jit.JitCompiler.CompileMethodInternal (Burst.Compiler.IL.Jit.JitResult result, System.Collections.Generic.List`1[T] methodsToCompile, Burst.Compiler.IL.Jit.JitOptions jitOptions) [0x00554] in <db0e45d9997943f08d641850e219b36b>:0
    8.   at Burst.Compiler.IL.Jit.JitCompiler.CompileMethods (Mono.Cecil.MethodReference[] methodReferences, Burst.Compiler.IL.Jit.JitOptions jitOptions) [0x0024f] in <db0e45d9997943f08d641850e219b36b>:0
    9.   at Burst.Compiler.IL.Jit.JitCompiler.CompileMethod (Mono.Cecil.MethodReference methodReference, Burst.Compiler.IL.Jit.JitOptions jitOptions) [0x0001c] in <db0e45d9997943f08d641850e219b36b>:0
    10.   at Burst.Compiler.IL.Jit.JitCompilerService+CompilerThreadContext.Compile (Burst.Compiler.IL.Jit.JitCompilerService+CompileJob job) [0x003d7] in <db0e45d9997943f08d641850e219b36b>:0
    11.  
    12. While compiling job: System.Void Unity.Entities.JobChunkExtensions/JobChunkProducer`1<QB.EdgeFansSystem/QB.<>c__DisplayClass_OnUpdate_LambdaJob1>::Execute(Unity.Entities.JobChunkExtensions/JobChunkWrapper`1<T>&,System.IntPtr,System.IntPtr,Unity.Jobs.LowLevel.Unsafe.JobRanges&,System.Int32)
    13. at <empty>:line 0
    14.  
    Unity 2019.3.5f1
    Burst Burst 1.3.0 preview.7 works fine
     
  2. sheredom

    sheredom

    Unity Technologies

    Joined:
    Jul 15, 2019
    Posts:
    300
    Hey there! I made some changes to make LLVM optimize our math functions some more, and I'm going to guess that LLVM has introduced the ldexp during optimizations. Can you confirm if you are using pow or exp2 in your code, or could you give us a repro though? It'd speed up me fixing it!
     
    deus0 likes this.
  3. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    Yes, I am using pow from Unity.Mathematics in that system. I will try to prepare repro project
     
  4. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    @sheredom Case 1231207
    I've attached repro project to it
     
  5. sheredom

    sheredom

    Unity Technologies

    Joined:
    Jul 15, 2019
    Posts:
    300
    Thanks! I think I've managed to repro it locally - LLVM is optimizing pow(2.0, y) and exp2(x) where x or y came from an int/uint into ldexp basically.

    I should have a fix in the next preview.
     
  6. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    Great, thank you
     
  7. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    Tried 1.3.0 preview.9 looks like everything is working as expected. Thanks again.
     
    sheredom likes this.
  8. LucarioKid

    LucarioKid

    Joined:
    Dec 15, 2021
    Posts:
    8
    I am currently having the same problem. I am currently using unity 2021.2.7f1, and I would upload a picture but the post creator won't let me. The strange thing about my case is that whenever I return from editing the C# it will redo the burst and give me those same errors again.
     
  9. KinanGH

    KinanGH

    Joined:
    Dec 3, 2019
    Posts:
    37
    I have this same error.
     
  10. sheredom

    sheredom

    Unity Technologies

    Joined:
    Jul 15, 2019
    Posts:
    300
    Can you copy the error and paste it here? Not much we can do without some more context. Also what Burst versions are you using?
     
  11. LucarioKid

    LucarioKid

    Joined:
    Dec 15, 2021
    Posts:
    8
    A direct copy paste of the error:

    Unexpected exception Burst.Compiler.IL.Aot.AotLinkerException: The native link step failed. Check previous exception in the log - linker command line : "/Users/joshuavogt/Desktop/Kai's stuff/Unity/The great maze game/Library/PackageCache/com.unity.burst@1.6.0/.Runtime/hostmac/lld -flavor darwin -arch x86_64 -macosx_version_min 10.8 -sdk_version 10.9 -r -dylib -o "/Users/joshuavogt/Desktop/Kai's stuff/Unity/The great maze game/Temp/Burst/burst-aotimkxa5qd.gzk/5712acdcb20bfb458b1d66c3ee779b91.bundle" "/Users/joshuavogt/Desktop/Kai's stuff/Unity/The great maze game/Library/PackageCache/com.unity.burst@1.6.0/.Runtime/libs/burstRTL_m64.a" "/Users/joshuavogt/Desktop/Kai's stuff/Unity/The great maze game/Temp/Burst/burst-aotimkxa5qd.gzk/lib_burst_generated_part_.o""
    at Burst.Compiler.IL.Aot.AotNativeLinkBase.RunNativeLinkerTool (System.String command, System.String arguments, System.String errorMessage, System.String commandType, System.String workingDirectory, System.Boolean muteOutputs) [0x000d0] in <685f0c65f2a448a78ba2734aa17d6be3>:0
    at Burst.Compiler.IL.Aot.AotNativeLinkLLVMMacOS.Link (Burst.Backend.TargetCpu targetCpu, System.Collections.Generic.List`1[T] inputFiles, System.String outputFile, System.Boolean enableDebugInfo) [0x0016a] in <685f0c65f2a448a78ba2734aa17d6be3>:0
    at Burst.Compiler.IL.Aot.AotCompiler.Link (System.Collections.Generic.List`1[T] groups, System.String nameSuffix, Burst.Compiler.IL.Aot.AotCompilerOptions compilerOptions, System.IO.TextWriter consoleOut, System.IO.TextWriter consoleError) [0x001f8] in <685f0c65f2a448a78ba2734aa17d6be3>:0
    at Burst.Compiler.IL.Jit.Providers.BaseOnDiskProvider.CommonDiskCompileModule (Burst.Backend.Module module, Burst.Compiler.IL.NativeCompiler nativeCompiler, Burst.Compiler.IL.NativeCompilerOptions options, Burst.Compiler.IL.Jit.JitOptions jitOptions, Burst.Compiler.IL.Helpers.Hash128& moduleHash) [0x000b2] in <685f0c65f2a448a78ba2734aa17d6be3>:0
    at Burst.Compiler.IL.Jit.Providers.OnDiskJitProvider.BeginCompileModule (Burst.Backend.Module module, Burst.Compiler.IL.NativeCompiler nativeCompiler, Burst.Compiler.IL.NativeCompilerOptions options, Burst.Compiler.IL.Jit.JitOptions jitOptions, Burst.Compiler.IL.Helpers.Hash128& moduleHash, Burst.Compiler.IL.Jit.JitCacheManager jitCacheManager, Burst.Compiler.IL.Jit.GetExternalFunctionPointerDelegate getExternalFunctionPointer, System.Action& invokeBurstInitialize) [0x00000] in <685f0c65f2a448a78ba2734aa17d6be3>:0
    at Burst.Compiler.IL.Jit.JitCompiler.CompileMethodInternal (Burst.Compiler.IL.Jit.JitResult result, System.Collections.Generic.List`1[T] methodsToCompile, Burst.Compiler.IL.Jit.JitOptions jitOptions) [0x00677] in <685f0c65f2a448a78ba2734aa17d6be3>:0
    at Burst.Compiler.IL.Jit.JitCompiler.CompileMethods (Burst.Compiler.IL.Jit.JitMethodGroupRequest& request, Burst.Compiler.IL.Jit.JitCompilationRequestType requestType) [0x00209] in <685f0c65f2a448a78ba2734aa17d6be3>:0
    at Burst.Compiler.IL.Jit.JitCompiler.CompileMethod (Burst.Compiler.IL.Jit.MethodReferenceWithMethodRefString method, Burst.Compiler.IL.Jit.JitOptions jitOptions, Burst.Compiler.IL.Jit.JitCompilationRequestType requestType) [0x00023] in <685f0c65f2a448a78ba2734aa17d6be3>:0
    at Burst.Compiler.IL.Jit.JitCompilerService+CompilerThreadContext.Compile (Burst.Compiler.IL.Jit.JitCompilerService+CompileJob job, Burst.Compiler.IL.Jit.JitCompilationRequestType requestType) [0x00491] in <685f0c65f2a448a78ba2734aa17d6be3>:0

    While compiling job: System.Void Unity.Jobs.IJobExtensions/JobStruct`1<UnityEngine.U2D.SpriteShapeGenerator>::Execute(T&,System.IntPtr,System.IntPtr,Unity.Jobs.LowLevel.Unsafe.JobRanges&,System.Int32)
    at <empty>:line 0
     
  12. LucarioKid

    LucarioKid

    Joined:
    Dec 15, 2021
    Posts:
    8
    Also, I do not know how to check or update my burst version.
     
  13. sheredom

    sheredom

    Unity Technologies

    Joined:
    Jul 15, 2019
    Posts:
    300
    From that trace it looks like you are on Burst 1.6.0. If you can go to the Package Manager window and try 1.6.3 (the latest 1.6.X version) that'd be helpful.

    upload_2022-1-10_16-13-30.png
     
  14. LucarioKid

    LucarioKid

    Joined:
    Dec 15, 2021
    Posts:
    8
    I have installed the latest version of burst (which at was actually burst 1.6.4), and am now only receiving this error, and only one time:

    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'UnityEditor.U2D.Animation.TessellateBurst_00000744$BurstDirectCall' threw an exception. ---> System.InvalidOperationException: Burst failed to compile the function pointer `Void TessellateBurst(Unity.Collections.Allocator, Unity.Mathematics.float2*, Int32, Unity.Mathematics.int2*, Int32, Unity.Mathematics.float2*, Int32*, Unity.Mathematics.int2*, Int32, Unity.Mathematics.int3*)`
    at Unity.Burst.BurstCompiler.Compile (System.Object delegateObj, System.Reflection.MethodInfo methodInfo, System.Boolean isFunctionPointer, System.Object managedFallbackDelegateObj) [0x00131] in /Users/joshuavogt/Desktop/Kai's stuff/Unity/The great maze game/Library/PackageCache/com.unity.burst@1.6.4/Runtime/BurstCompiler.cs:364
    at Unity.Burst.BurstCompiler.CompileILPPMethod (System.RuntimeMethodHandle burstMethodHandle, System.RuntimeMethodHandle managedMethodHandle, System.RuntimeTypeHandle delegateTypeHandle) [0x0008f] in /Users/joshuavogt/Desktop/Kai's stuff/Unity/The great maze game/Library/PackageCache/com.unity.burst@1.6.4/Runtime/BurstCompiler.cs:170
    at UnityEditor.U2D.Animation.TriangulationUtility+TessellateBurst_00000744$BurstDirectCall.Constructor () [0x00000] in <e5e7a82bf5d7429d9c91904de18bf86e>:0
    at UnityEditor.U2D.Animation.TriangulationUtility+TessellateBurst_00000744$BurstDirectCall..cctor () [0x00000] in <e5e7a82bf5d7429d9c91904de18bf86e>:0
    --- End of inner exception stack trace ---
    at $BurstDirectCallInitializer.Initialize () [0x00000] in <e5e7a82bf5d7429d9c91904de18bf86e>:0
    at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
    at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <bd21fd595d394493a51e7c79b5fef9e0>:0
    --- End of inner exception stack trace ---
    at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00083] in <bd21fd595d394493a51e7c79b5fef9e0>:0
    at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <bd21fd595d394493a51e7c79b5fef9e0>:0
    at UnityEditor.EditorAssemblies.ProcessInitializeOnLoadMethodAttributes () [0x000a5] in /Users/bokken/buildslave/unity/build/Editor/Mono/EditorAssemblies.cs:147
    UnityEditor.EditorAssemblies.ProcessInitializeOnLoadMethodAttributes () (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorAssemblies.cs:151)

    If any explanation of this could be provided, that would be helpful.
     
    Last edited: Jan 13, 2022
  15. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    @LucarioKid my guess is that you're hitting a bug where Burst fails to compile if your project is in a folder whose name contains an apostrophe ("Kai's stuff"). Please could you try moving the project to a folder that doesn't have special characters (or whitespace, to rule that out too) in the name, and see if you still get the issue?
     
    MidnightSkyGD likes this.
  16. KinanGH

    KinanGH

    Joined:
    Dec 3, 2019
    Posts:
    37
    We could change the name of the project folder but only for Burst testing.
    But changing the folder name permanently is pain, version control system will break upon folder renaming, besides, you need to rename the folder for all team members, and I don't think that this is the optimal solution for the problem.
     
  17. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    I don't think it's the name of the project folder that's the problem, it's more the "Kai's stuff" parent folder. At least, I think it's the apostrophe that's the problem here. And to be clear, if that is the bug then we'll work on a fix.

    > Please could you try moving the project to a folder that doesn't have special characters (or whitespace, to rule that out too) in the name, and see if you still get the issue?

    This was more about narrowing down the problem, I wasn't suggesting that was a permanent fix.
     
    HernandoNJ and MidnightSkyGD like this.
  18. LucarioKid

    LucarioKid

    Joined:
    Dec 15, 2021
    Posts:
    8
    I am now only receiving three different things:

    Could not extract GUID in text file UserSettings/Layouts/default-2021.dwlt at line 976.
    UnityEditor.WindowLayout:LoadDefaultWindowPreferences ()

    Broken text PPtr. GUID 00000000000000000000000000000000 fileID 4630008392798838738 is invalid!
    UnityEditor.WindowLayout:LoadDefaultWindowPreferences ()

    Invalid AssetDatabase path: /Users/joshuavogt/Desktop/Kais_Stuff/Unity/The_great_maze_game/Assets/TextMesh Pro/Resources/TMP Settings.asset. Use path relative to the project folder.
    UnityEditor.AssetPostprocessingInternal:postprocessAllAssets (string[],string[],string[],string[],string[],bool) (126 of these)
     
  19. LucarioKid

    LucarioKid

    Joined:
    Dec 15, 2021
    Posts:
    8
    This pink emoji is supposed to be : followed immediately by a P. This seems to be the way to write the stick out tongue emoji.
     
  20. LucarioKid

    LucarioKid

    Joined:
    Dec 15, 2021
    Posts:
    8
    Having teammates to give updates to is not an issue for this, as this is solo project.
     
  21. TheBreadPerson

    TheBreadPerson

    Joined:
    Aug 6, 2021
    Posts:
    11
    Hey! I'm having the same problem with all of my unity projects. Even when opening a new blank one I immediately get the errors. Any solution yet?
     
  22. KinanGH

    KinanGH

    Joined:
    Dec 3, 2019
    Posts:
    37
    Not yet sadly, I even upgraded the project to the latest LTS Unity version which is 2021.3.0f1 with no avail.
     
  23. KinanGH

    KinanGH

    Joined:
    Dec 3, 2019
    Posts:
    37
    In Unity 2022.1.0 tech stream https://unity3d.com/unity/whats-new/2022.1.0
    Unity claims it fixed the issue
    I hope that's true, I can't test it right now though until at least the preview version get released.
     
  24. blindkat

    blindkat

    Joined:
    Feb 28, 2017
    Posts:
    1
    I had a student with this error, fixed it by taking out the apostrophe in the project folder. Apparently that bug still hasn't been fixed?
     
  25. KinanGH

    KinanGH

    Joined:
    Dec 3, 2019
    Posts:
    37
    No it dosen't, I still face the same issue.