atteneder / KtxUnity

Load KTX and Basis Universal textures at runtime
Apache License 2.0
215 stars 42 forks source link

Build ktx unity failed for webgl in unity 2023.2.10f1 #91

Closed dqnhat closed 6 months ago

dqnhat commented 6 months ago

I update project to Unity 2023.2.10f1. When I build WebGL, I cause an error:

build 21-Feb-2024 10:46:37 wasm-ld: error: Library/PackageCache/com.atteneder.ktx@d560182258/Runtime/Plugins/WebGL/libktx_read.a(basis_transcode.cpp.o): undefined symbol: std::2::vector_base_common::throw_length_error() const build 21-Feb-2024 10:46:37 emcc: error: '/Applications/Unity/Hub/Editor/2023.2.10f1/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/llvm/wasm-ld @/var/folders/jw/lwt4zgk173gcqjwn7z41vsmr0000gn/T/emscripten_j2ozrfup.rsp.utf-8' failed (returned 1) build 21-Feb-2024 10:46:37 ** Tundra build failed (131.28 seconds - 0:02:11), 598 items updated, 649 evaluated build 21-Feb-2024 10:46:37 Building Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js failed with output: build 21-Feb-2024 10:46:37 wasm-ld: error: Library/PackageCache/com.atteneder.ktx@d560182258/Runtime/Plugins/WebGL/libktx_read.a(basis_transcode.cpp.o): undefined symbol: std::2::vector_base_common::__throw_length_error() const build 21-Feb-2024 10:46:37 emcc: error: '/Applications/Unity/Hub/Editor/2023.2.10f1/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/llvm/wasm-ld @/var/folders/jw/lwt4zgk173gcqjwn7z41vsmr0000gn/T/emscripten_j2ozrfup.rsp.utf-8' failed (returned 1) build 21-Feb-2024 10:46:37 ing_t _FalseString; build 21-Feb-2024 10:46:37 UnityEngine.Debug:ExtractStackTraceNoAlloc (byte*,int,string) build 21-Feb-2024 10:46:37 UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/StackTrace.cs:37) build 21-Feb-2024 10:46:37 UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object) build 21-Feb-2024 10:46:37 UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[]) build 21-Feb-2024 10:46:37 UnityEngine.Logger:Log (UnityEngine.LogType,object) build 21-Feb-2024 10:46:37 UnityEngine.Debug:LogError (object)

how can I fix this error?

atteneder commented 6 months ago

Hi,

thanks for reporting!

Could you please try if the successor package KTX for Unity (com.unity.cloud.ktx) suffers the same problem? In general I advice users to switch to that package as it'll receive updates sooner.

atteneder commented 6 months ago

I assume the suggested solution works -> closing.