-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Description
WebGL build (checked with: Release, Web-Mobile-Release profile, Web-Desktop-Development profile ) fails during wasm-ld linking with duplicate symbol errors from HarfBuzz. Unity's TextRenderingModule already provides HarfBuzz, Rive plugin bundles conflicting copy.
Unity Version
6000.3.1f1
Platform
WebGL, Release build, Web Mobile profile
Rive Plugin Version
0.3.8-canary.117
Steps to Reproduce
- Create new Unity project or use existing with Rive plugin
- Add Rive runtime component to scene
- File > Build Profiles > Switch to WebGL (Web-Mobile-Release or Web-Desktop-Development profile or any WebGL profile)
- Build
- Build fails at linking stage
Error Log
Build completed with a result of 'Failed' in 404 seconds (403568 ms) [12/13/2025 9:46:48 AM -> 12/13/2025 9:53:32 AM, 6m 43s]
Building Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js failed with output:
C:\workspace\projects\unity\RiveTestbed>set MYDIR=C:\Program Files\Unity\Hub\Editor\6000.3.1f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\
C:\workspace\projects\unity\RiveTestbed>goto FOUND_MYDIR
wasm-ld: error: duplicate symbol: _hb_shapers_get()
defined in C:/workspace/projects/unity/RiveTestbed/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(hb-shaper.o)
defined in C:/Program Files/Unity/Hub/Editor/6000.3.1f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/lib/modules_wasm23_optsize/WebGLSupport_UnityPlayer.TextRenderingModule_Dynamic.a(harfbuzz_5sk4y.o)
wasm-ld: error: duplicate symbol: hb_style_get_value
defined in C:/workspace/projects/unity/RiveTestbed/Library/Bee/artifacts/WebGL/il2cppOutput/build/GameAssembly.a(hb-style.o)
defined in C:/Program Files/Unity/Hub/Editor/6000.3.1f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/lib/modules_wasm23_optsize/WebGLSupport_UnityPlayer.TextRenderingModule_Dynamic.a(harfbuzz_5sk4y.o)
emcc: error: '"C:/Program Files/Unity/Hub/Editor/6000.3.1f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/llvm\wasm-ld.exe" @c:\Temp\emscripten_eb6juwyt.rsp.utf-8' failed (returned 1)
Expected Behavior
WebGL build succeeds without duplicate symbol errors.
Additional Context
- Clean Unity project + Rive plugin reproduces issue
- Unity WebGL TextRenderingModule_Dynamic.a already contains HarfBuzz (harfbuzz_5sk4y.o)
- Rive likely bundles own HarfBuzz copy causing conflict
- Seen similar hb_style_get_value issues in rive-flutter #437
In the Unity project, the Rive runtime includes its own HarfBuzz wasm libraries: the file librive_harfbuzz_wasm is located at ...\Library\PackageCache\app.rive.rive-unity@fb68f6042706\Runtime\Libraries\WebGL\emscripten_3.1.38\ (with a similar set of files also present under emscripten_3.1.8), which appears to be the source of the conflict with the HarfBuzz implementation built into Unity’s WebGL TextRenderingModule during linking.