#Unable to Find Sleef Function

1 messages · Page 1 of 1 (latest)

split flame
#

I've been working on a project that I just upgraded to the 2022.3.1 LTS release earlier today, and noticed that I'm still seeing the same strange Burst compile error that I've been seeing for quite a while now, at least since 2022.2. I have a few ECS systems in my code, that seem to be working properly without any runtime errors. However, I have a strange error message in my console that is appearing when compiling my project:

Burst internal compiler error: Burst.Compiler.IL.CompilerException: Unable to find sleef function `` at Burst.Compiler.IL.NativeCompiler.Compile (Burst.Compiler.IL.CompilerStatistics stats) [0x004ca] in <532a8a169e6a4953b5d9a4c213b71772>:0 at Burst.Compiler.IL.Server.LibraryCompiler.HashAndCompileMethodGroup (Burst.Compiler.IL.Server.CompilationJob request, System.Int32 methodGroupIndex, Burst.Compiler.IL.Server.SharedLibraryCompilationState sharedState, Burst.Compiler.IL.Aot.AotCompilerOptions defaultOptions, Burst.Compiler.IL.NativeCompiler& nativeCompiler, Burst.Compiler.IL.Aot.AotModuleGroup& aotModuleGroup) [0x00539] in <532a8a169e6a4953b5d9a4c213b71772>:0

I'm not sure what (if any) impact this has on the project, and while I was able to find a forum post from a long time ago (2020) with the same error message, it seemed to be resolved. I was rather hoping that the upgrade to LTS would resolve this, but it seems like it's still happening. Has anyone else run into this?

shy ibex
#

What platform are you targetting?

split flame
#

It's just happening in the editor, to be clear

#

I'm on Win 10, if that's what you're looking for

shy ibex
#

Ah, this isn't happening (exclusively) when making a build?

split flame
#

I was just trying that - It's still running

#

Nope, fails when attempting to build, Windows Intel 64

#

Library\Bee\artifacts\WinPlayerBuildProgram\AsyncPluginsFromLinker: Burst internal compiler error: Burst.Compiler.IL.CompilerException: Unable to find sleef function `` UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

shy ibex
#

I64, not x64?

split flame
#

Should be x64

shy ibex
#

What's your actual host cpu

split flame
#

AMD Ryzen 5950x

UnityEditor.Build.BuildFailedException: Burst compiler (1.8.7) failed running

stdout:
Starting 1 library requests
Error: Burst internal compiler error: Burst.Compiler.IL.CompilerException: Unable to find sleef function ``
   at Burst.Compiler.IL.NativeCompiler.Compile(CompilerStatistics stats)
   at Burst.Compiler.IL.Server.LibraryCompiler.HashAndCompileMethodGroup(CompilationJob request, Int32 methodGroupIndex, SharedLibraryCompilationState sharedState, AotCompilerOptions defaultOptions, NativeCompiler& nativeCompiler, AotModuleGroup& aotModuleGroup)
Error: Burst internal compiler error: Burst.Compiler.IL.CompilerException: Unable to find sleef function ``
   at Burst.Compiler.IL.NativeCompiler.Compile(CompilerStatistics stats)
   at Burst.Compiler.IL.Server.LibraryCompiler.HashAndCompileMethodGroup(CompilationJob request, Int32 methodGroupIndex, SharedLibraryCompilationState sharedState, AotCompilerOptions defaultOptions, NativeCompiler& nativeCompiler, AotModuleGroup& aotModuleGroup)
stderr:```
#
  at Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x00237] in .\Library\PackageCache\com.unity.burst@1.8.7\Editor\BurstAotCompiler.cs:1705 
  at Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x0004d] in .\Library\PackageCache\com.unity.burst@1.8.7\Editor\BurstAotCompiler.cs:1582 
  at Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunManagedProgram (System.String exe, System.String args, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x00001] in .\Library\PackageCache\com.unity.burst@1.8.7\Editor\BurstAotCompiler.cs:1557 
  at Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLsImpl (Unity.Burst.Editor.BurstAotCompiler+BurstAOTSettings settings, UnityEditor.Compilation.Assembly[] playerAssemblies) [0x00a3c] in .\Library\PackageCache\com.unity.burst@1.8.7\Editor\BurstAotCompiler.cs:705 
  at Unity.Burst.Editor.BurstAOTCompilerPostprocessor.DoGenerate (UnityEditor.Compilation.Assembly[] assemblies) [0x0001b] in .\Library\PackageCache\com.unity.burst@1.8.7\Editor\BurstAotCompiler.cs:265 
  at Unity.Burst.Editor.BurstAOTCompilerPostprocessor.GenerateNativePluginsForAssemblies (UnityEditor.Build.IGenerateNativePluginsForAssemblies+GenerateArgs args) [0x0008a] in .\Library\PackageCache\com.unity.burst@1.8.7\Editor\BurstAotCompiler.cs:179 
  at UnityEditor.Modules.BeeBuildPostprocessor.GenerateNativePluginsForAssemblies (PlayerBuildProgramLibrary.Data.GenerateNativePluginsForAssembliesArgs args) [0x00050] in <582c35e8f45345d395e99f8e72e3c16d>:0 
#

``` at Bee.BeeDriver.BuildRequest+<>c__DisplayClass63_0`1[T].<RegisterRPCCallback>b__0 (System.Object o) [0x00000] in <cbc6cae0703746c08eee7f40dbc1e66c>:0
at Bee.BeeDriver.BeeDriver_RunBackend+<>c__DisplayClass1_0.<ProcessRPCRequest>b__0 () [0x00021] in <cbc6cae0703746c08eee7f40dbc1e66c>:0
at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <6aa56e57ab504395b555cf3ed50fa53d>:0
at System.Threading.Tasks.Task.Execute () [0x00000] in <6aa56e57ab504395b555cf3ed50fa53d>:0
--- End of stack trace from previous location where exception was thrown ---

at Bee.BeeDriver.BeeDriver_RunBackend.ProcessRPCRequest (Bee.BinLog.RPCActionMessage msg, Bee.BeeDriver.BuildRequest+RPCCallback rpcCallback, IPCConnection ipcConnection, System.Threading.Tasks.Task writePipeConnectionTask, Bee.BeeDriver.InternalState state) [0x00111] in <cbc6cae0703746c08eee7f40dbc1e66c>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)```

#

I'd suspect that stack trace is mostly useless but there you have it

#

I do have some embedded packages, if that's interesting

#

That are using Burst

#

And ECS

#

Come to think of it - this might have started when I swapped the packages from local packages to embedded packages

split flame
#

Okay - I resorted to just deleting random source files until the compile error disappeared and it seems like I found the one it was originating from. I'll trawl through it and figure out which lines cause the errors.

#

Gah - it was my mistake. I was using System.Math.Clamp instead of Unity.Mathematics.math.clamp in some Burst compiled code. Sort of a strange error message, but there you have it.

#

That code was down a call tree that didn't used to be bursted. Hence why I didn't realize when the issue had started happening.

#

I played around with it a bit and also found the System.Math.Ceil function seems to not work either.

shy ibex
#

Ah, what version of burst are you using?

split flame
#

I also tried using the System.Math.IEEERemainder function that it specifically calls out as incompatible and it... doesn't give me a compile error. Curious

#

1.8.7, but this has been happening for a while.

shy ibex
#

It may be that the substitution happens at a lexical level

#

so transitive dependencies like clamp using sleef are not

#

but just a guess

split flame
#

Should I submit this as a bug somewhere? Do you know where would be most appropriate?

shy ibex
#

Sure, one sec

#

if you have a minimal repro that would be awesome

#

feel free to tag joe.valenzuela in the bug report as well