Hello, I’m trying to build VTK 9.5.0 with WebAssembly 64-bit support following the official documentation, but I’m encountering a BigInt conversion error during the build process.
Special Note: Initially, the build was using Emscripten’s bundled Node.js, so I modified the .emscripten file to point to my system’s Node.js v23.8.0 instead.
Error: During the build, when trying to generate the wrap hierarchy for VTK::CommonCore, I get:
[1134/4962] Generating the wrap hierarchy for VTK::CommonCore
FAILED: lib/vtk-9.5/hierarchy/VTK/vtkCommonCore-hierarchy.txt
...
TypeError: Cannot convert a BigInt value to a number
at Object. (D:\dev\vtk-07-08\VTK-9.5.0\build\bin\vtkWrapHierarchy-9.5.js:1:6880)
at Module._compile (node:internal/modules/cjs/loader:1734:14)
...
Node.js v23.8.0
The build system is trying to run vtkWrapHierarchy-9.5.js with Node.js using the --experimental-wasm-memory64 flag, but it fails with a BigInt conversion error.
Question: Is this a known issue with VTK 9.5.0’s WebAssembly 64-bit build? The documentation mentions 64-bit support, but it seems the build tools themselves have issues running in 64-bit mode. Should the build tools (like vtkWrapHierarchy) be compiled in 32-bit mode while keeping the actual VTK libraries in 64-bit?
Any guidance would be greatly appreciated. Thank you!
Thank you for your guidance - I successfully built VTK with 64-bit following your instructions. I really appreciate your help. However, when I tried to build the cone example, I encountered an issue.
I successfully configured the build using emcmake with these flags: