Build wasm viewer

Skip to first unread message

Данил Буланов

Feb 18, 2024, 9:33:26 AMFeb 18
to skia-discuss
I am trying to build a wasm Viewer version, and I have a problem, 

wasm-ld: error: obj/modules/canvaskit/canvaskit.viewer_bindings.o: undefined symbol: SvgSlide::SvgSlide(SkString const&, SkString const&)

That is the error which I get when trying to build it. I can clearly see in canvaskit's file this file "../../tools/viewer/SvgSlide.cpp", appended to sources array in component("viewer_wasm") {, so I have no idea why it cant find the SvgSlide constructor

Данил Буланов

Feb 19, 2024, 2:54:03 AMFeb 19
to skia-discuss
I have finally managed to do it myself, turns out that wasm version of viewer was updated some time ago, and some stuff is outdated, just in case I will leave here some tips for newbies like me

The main obvious thing that I was missing is that I have to pass "viewer" flag into, but not trying to change sources of
And since I run viewer in not oficial build mode, I have to set testonly flags in a couple of places (errors were straightforward, and I found those places easily)

And some updates for new stuff here:

I have updatesd file in cavaskit, mor specificly  component("viewer_wasm") section, I have added this lines 
to souces, which makes sense since it is what linker tells me by its errors.

And also viewer bindings are a little bit outdated, since SvgSlide has changed, and SampleSlide is gone (I think)

воскресенье, 18 февраля 2024 г. в 17:33:26 UTC+3, Данил Буланов:
Reply all
Reply to author
0 new messages