vtkWASM

I am trying to compile vtk-WASM on Windows. The description here Building using emscripten for WebAssembly - VTK documentation is for sure not working fully on Windows. I get errors like

C:/VTK/VTK-9.3.0/Rendering/WebGPU/vtkWebGPURenderWindow.cxx:164:16: error: no member named 'SetDeviceLostCallback' in 'wgpu::Device

At home, I managed to compile vtk-wasm using the old VTK 9.2.6 (Debian 12). I can see that the weekly vtk-wasm docker build fails. What is the recommended way to compile vtk-wasm yourself. Should I replicated the Docker build scripts that you have made, @jaswantp

The thing is I am developing some new native widgets that I would like to expose in a vtk-wasm setup.

Thanks in advance
Jens Munk

What version of emscripten you use? The docker build fix is in the works. Try disabling webgpu with -DVTK_ENABLE_WEBGPU=OFF

I use emsdk active latest. This is probably too new. I will try disabling the WEBGPU. We only the need wasm anyway.

A little strange. Adding -DVTK_ENABLE_WEBGPU=OFF to the command line added -DVTK_ENABLE_WEBGPU to the command line. I only deleted the CMakeCache.txt. Will try to delete the full output folder.

Will try -DVTK_ENABLE_WEBGPU:BOOL=OFF. Could be the emcmake.bat that is not propagating arguments correctly.

Hi @jaswantp

My emsdk is the following. emsdk activate latest

Resolving SDK alias 'latest' to '3.1.55'
Resolving SDK version '3.1.55' to 'sdk-releases-f5557e3b7166d05bddb5977e363ec48cd06e9d32-64bit'
Setting the following tools as active:
   node-16.20.0-64bit
   python-3.9.2-nuget-64bit
   java-8.152-64bit
   releases-f5557e3b7166d05bddb5977e363ec48cd06e9d32-64bit

Which version are you current using on the vtk-wasm docker builds?

The same story, em++.bat -DVTK_ENABLE_WEBGPU. WebGPU is enabled even though I actively disable it.

After adding
VTK_MODULE_ENABLE_VTK_RenderingWebGPU=NO
everything compiles.

I think the best solution is to find a version emsdk that works together with VTK master

Which version are you current using on the vtk-wasm docker builds?

VTK CI and that docker build use 3.1.45

1 Like