netpyoung / unity.webp

:art: WebP made easy for Unity3d
https://netpyoung.github.io/unity.webp/
MIT License
237 stars 28 forks source link

WEBGL compilation error #61

Open MUN1Z opened 6 months ago

MUN1Z commented 6 months ago

I get this error on WEBGL compilation, Windows and Android compile with success:

\

Building Library\Bee\artifacts\WebGL\GameAssembly\release_WebGL_wasm\vaf2a5ds6lwe.o failed with output: D:\Git\MUN1Z\IronCanary\IronCanary.Client.Unity2D\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\unity.webp.cpp:3359:55: error: builtin functions must be directly called intptr_t returnValue = reinterpret_cast(builtinexpect)(0_param0, _1_param1); ^ D:\Git\MUN1Z\IronCanary\IronCanary.Client.Unity2D\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\unity.webp.cpp:3367:54: error: builtin functions must be directly called int32_t returnValue = reinterpret_cast(builtin_clz)(_0_param0); ^ D:\Git\MUN1Z\IronCanary\IronCanary.Client.Unity2D\Library\Bee\artifacts\WebGL\il2cppOutput\cpp\unity.webp.cpp:3375:54: error: builtin functions must be directly called int32_t returnValue = reinterpret_cast(builtin_ctz)(_0_param0); ^ 3 errors generated. emcc: error: '"D:/Arquivos de Programas/Unity/Hub/Editor/2022.3.15f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/llvm\clang++.exe" -target wasm32-unknown-emscripten -DEMSCRIPTEN -DEMSCRIPTEN_major=3 -DEMSCRIPTEN_minor=1 -DEMSCRIPTEN_tiny=8 -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-cxx-exceptions -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL "--sysroot=D:\Arquivos de Programas\Unity\Hub\Editor\2022.3.15f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\cache\sysroot" -Xclang -iwithsysroot/include\compat -Dwebgl__ -Wno-c++11-extensions -Wno-nonportable-include-path -ffunction-sections -fno-unwind-tables -fomit-frame-pointer -fno-threadsafe-statics -std=c++11 -Wno-#warnings -Wswitch -Wno-trigraphs -Wno-tautological-compare -Wno-invalid-offsetof -Wno-implicitly-unsigned-literal -Wno-integer-overflow -Wno-shift-negative-value -Wno-unknown-attributes -Wno-implicit-function-declaration -Wno-null-conversion -Wno-missing-declarations -Wno-unused-value -Wno-pragma-once-outside-header -fvisibility=hidden -fexceptions -fno-rtti -O3 -fno-strict-overflow -ffunction-sections -fdata-sections -fmessage-length=0 -pipe -D_GLIBCXX_USE_CXX11_ABI=0 -DBASELIB_INLINE_NAMESPACE=il2cpp_baselib -DIL2CPP_MONO_DEBUGGER_DISABLED -DRUNTIME_IL2CPP -DHAVE_BDWGC_GC -DNDEBUG -I. -ID:/Git/MUN1Z/IronCanary/IronCanary.Client.Unity2D/Library/Bee/artifacts/WebGL/il2cppOutput/cpp "-ID:/Arquivos de Programas/Unity/Hub/Editor/2022.3.15f1/Editor/Data/il2cpp/libil2cpp/pch" "-ID:/Arquivos de Programas/Unity/Hub/Editor/2022.3.15f1/Editor/Data/il2cpp/libil2cpp" "-ID:/Arquivos de Programas/Unity/Hub/Editor/2022.3.15f1/Editor/Data/il2cpp/external/baselib/Include" "-ID:/Arquivos de Programas/Unity/Hub/Editor/2022.3.15f1/Editor/Data/il2cpp/libil2cpp/os/ClassLibraryPAL/brotli/include" "-ID:/Arquivos de Programas/Unity/Hub/Editor/2022.3.15f1/Editor/Data/il2cpp/external/baselib/Platforms/WebGL/Include" -fcolor-diagnostics -fdiagnostics-absolute-paths -c -xc++ D:/Git/MUN1Z/IronCanary/IronCanary.Client.Unity2D/Library/Bee/artifacts/WebGL/il2cppOutput/cpp/unity.webp.cpp -o Library/Bee/artifacts/WebGL/GameAssembly/release_WebGL_wasm/vaf2a5ds6lwe.o' failed (returned 1)

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

I am using unity 2022.3.15f1 (LTS)

MUN1Z commented 6 months ago

I tested in same unity version of examples in repository, executing the examples and have the same error image

MUN1Z commented 6 months ago

the release 0.3.8 works, i am using it for now

netpyoung commented 6 months ago

Happy new year and thank you for reporting. I also tested then got same result. that caused from this.

And It will be good to try previous version but If you are considering security issue

netpyoung commented 6 months ago

Could you try 0.3.11 ? I hope it will be work well.

netpyoung commented 5 months ago

On 0.3.11 It still can use for webgl but to keep to tracking isseu what i raised on unity, I will keep this issue to open.