atteneder / DracoUnity

Draco 3D Data Compression Unity Package
Apache License 2.0
247 stars 40 forks source link

Burst error #18

Closed ketourneau closed 3 years ago

ketourneau commented 3 years ago

Hi,

We try to use GltFast 4.0 with DracoUnity 3.0.1 but got some burst errors when we load draco glb file. We use Unity 2020.3.9f1 LTS with Burst 1.4.8 on macos.

/Temp/Burst/burst-aotmapfenzj.il4/lib_burst_generated_part_0.o: _DecodeDracoMeshStep1
symbol(s) not found

While compiling job: System.Void Unity.Jobs.IJobExtensions/JobStruct`1<Draco.DracoNative/DecodeJob>::Execute(T&,System.IntPtr,System.IntPtr,Unity.Jobs.LowLevel.Unsafe.JobRanges&,System.Int32)
at <empty>:line 0
Unexpected exception Burst.Compiler.IL.Aot.AotLinkerException: The native link step failed. Check previous exception in the log - linker command line : ".../Library/PackageCache/com.unity.burst@1.4.8/.Runtime/hostmac/lld -flavor darwin -arch x86_64 -macosx_version_min 10.8 -sdk_version 10.9 -r -dylib -o ".../Temp/Burst/burst-aotmapfenzj.il4/bceef9978708ccba5c5983a7dc41dd2a.bundle" ".../Library/PackageCache/com.unity.burst@1.4.8/.Runtime/libs/burstRTL_m64.a" ".../Temp/Burst/burst-aotmapfenzj.il4/lib_burst_generated_part_0.o" ".../Temp/Burst/burst-aotmapfenzj.il4/lib_burst_generated_part_0_merged.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 <6b9ca69063a2498c9988acea59759ba5>: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) [0x00118] in <6b9ca69063a2498c9988acea59759ba5>: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 <6b9ca69063a2498c9988acea59759ba5>: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) [0x00089] in <6b9ca69063a2498c9988acea59759ba5>: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) [0x00511] in <6b9ca69063a2498c9988acea59759ba5>:0 
  at Burst.Compiler.IL.Jit.JitCompiler.CompileMethods (Mono.Cecil.MethodReference[] methodReferences, Burst.Compiler.IL.Jit.JitOptions jitOptions) [0x0027a] in <6b9ca69063a2498c9988acea59759ba5>:0 
  at Burst.Compiler.IL.Jit.JitCompiler.CompileMethod (Mono.Cecil.MethodReference methodReference, Burst.Compiler.IL.Jit.JitOptions jitOptions) [0x0001c] in <6b9ca69063a2498c9988acea59759ba5>:0 
  at Burst.Compiler.IL.Jit.JitCompilerService+CompilerThreadContext.Compile (Burst.Compiler.IL.Jit.JitCompilerService+CompileJob job) [0x00468] in <6b9ca69063a2498c9988acea59759ba5>:0 

While compiling job: System.Void Unity.Jobs.IJobExtensions/JobStruct`1<Draco.DracoNative/DecodeJob>::Execute(T&,System.IntPtr,System.IntPtr,Unity.Jobs.LowLevel.Unsafe.JobRanges&,System.Int32)
at <empty>:line 0
atteneder commented 3 years ago

Thanks for reporting, I can confirm.

It should still work though (and fall back to non-Burst), right?

ketourneau commented 3 years ago

Yes, file is open but got errors in console

ketourneau commented 3 years ago

@atteneder I still have the problem with 3.0.2.

I try to update from 3.0.1 with package manager in unity. I try to uninstall/install DracoUnity with installer. I try to delete Library, Temp... unity folders and open again.

Undefined symbol: .../Temp/Burst/burst-aotfaqifuac.cyb/lib_burst_generated_part_0.o: _DecodeDracoMeshStep1
symbol(s) not found

While compiling job: System.Void Unity.Jobs.IJobExtensions/JobStruct`1<Draco.DracoNative/DecodeJob>::Execute(T&,System.IntPtr,System.IntPtr,Unity.Jobs.LowLevel.Unsafe.JobRanges&,System.Int32)
at <empty>:line 0
atteneder commented 3 years ago

@Blocovin Sorry to hear that, but it works on my machine(s) 🤷

DracoUnity 3.0.2 Unity 2019.4.26f1 Burst 1.4.8 glTFast 4.0.0

I'm afraid I'd need better steps to reproduce.

ketourneau commented 3 years ago

@atteneder This is how I reproduce:

Got errors

atteneder commented 3 years ago

@Blocovin

I created a new project and followed your steps 1:1 and didn't see any error.

I installed via OpenUPM installer (both glTFast and DracoUnity). Did you do it this way as well?

Burst was installed automatically (as dependency of DracoUnity). I noticed the Package Manager has a glitch, not showing it as installed in In Project view mode, but it was installed.

ketourneau commented 3 years ago

@atteneder

Yes I installed GltFast and DracoUnity with OpenUPM installer: GltFast installer & DracoUnity installer.

I noticed that I need to restart Unity after installing DracoUnity to correctly got Burst imported.

Do you have errors if you reopen the new project after DracoUnity installation ?

ketourneau commented 3 years ago

@atteneder

I found the problem, error was gone when I create project in another path.

It's not a problem with DracoUnity, so sorry for the inconvenience & thank you for the help !

Best regards

atteneder commented 3 years ago

@Blocovin

No worries. I'm glad you figured it out!