Skip to content

pycvc-gl wasm: link VTK's libxml2 replacement again (vtk 9.5.0+cvc.4); no arigl in the build - #910

Merged
transfix merged 2 commits into
masterfrom
fix/link-host-vtk-cvc4
Oct 30, 2026
Merged

transfix merged 2 commits into
masterfrom
fix/link-host-vtk-cvc4

Conversation

@transfix

@transfix transfix commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Two changes to the pycvc-gl wasm build. A dry run of publish-pycvc-gl-wasm on this branch is the check for both; its result goes below when it finishes.

link-host.sh: link every deps archive again

77772ca left libvtklibxml2-*.a out of the host link. Before vtk 9.5.0+cvc.4, the wasm bundles had VTK's own copy of libxml2, which renames only the public API. Its plain-named internals (__xmlRaiseError, xmlBuf*, ...) collided with the libxml2 that ImageMagick brings, and under --allow-multiple-definition the module didn't compile.

vtk 9.5.0+cvc.4 (cy-pca/cvcpkg#497 and cy-pca/cvcpkg#505; published for wasm and wasm-mt on 2026-10-30) builds against cvcpkg's libxml2, libtiff, liblzma and freetype instead of VTK's bundled copies. So the exclusion matches nothing now, and the comment says why the group needs cvc.4 or later. The recipe doesn't pin vtk, so install-deps takes cvc.4.

vtk-python 9.5.0+cvc.6's 56 *Python*.a wrapper archives reference no vtklibxml2_, vtktiff_, vtkfreetype_ or vtklzma_ symbols (checked with llvm-nm), so they link against cvc.4 as they are.

build-wasm.sh/.ps1: no arigl

The first dry run on this branch, 41100253269, never reached link-host.sh. It ran on 27d03f7, after #888, with vtk 9.5.0+cvc.4 installed:

wasm-ld: error: lib/libcvc.a(http_client_fetch.cpp.o): undefined symbol: emscripten_fetch
FAILED: bin/arigl.js
CMake Error at src/arigl/cmake_install.cmake:41 (file):
  file INSTALL cannot find ".../build/bin/arigl.js": No such file or directory.

Since #888, arigl takes the network flags, so its wasm link pulls in cvc::net's fetch backend and needs -sFETCH=1. Only the examples' gallery link (TARGET wasm-demos) gives it that flag, and this build has the examples off. The -k 0 build carries on past the failed link, but cmake --install is fatal. v3.7.5's tag run (b0a6953, before #888) still linked arigl.js, so master's next tag publish of pycvc-gl wasm would fail the same way.

The package never declared or shipped arigl, so both build scripts now turn it off. publish-cvcgl-wasm.yml already does the same for the same reason. build-wasm.ps1 also gets -DCVC_BUILD_ARI=OFF, which build-wasm.sh already had.

Dry run: passed

Dry run 41116674101 ran on 360e2e1 (this branch, rebased onto 5d0a62f) and every step succeeded; publish was skipped because dry_run=true.

  • Deps: vtk 9.5.0+cvc.4, vtk-python-cp312 9.5.0+cvc.6, libxml2 2.12.9+cvc.5, xz 5.6.4+cvc.5, tiff 4.7.0+cvc.3, freetype 2.13.3+cvc.4, imagemagick 7.1.2+cvc.23.
  • Build: no arigl target, and no failed targets at all.
  • Host link:
    • The only signature-mismatch warnings are numpy's seven random_*, as in v3.7.5's run.
    • No libxml2, tiff, lzma or freetype mismatches.
    • No vtk{libxml2,tiff,lzma,freetype}_ symbols anywhere in the log.
  • Node checks: the host prints PYCVC_VTK_BRIDGE_OK and PYCVC_WASM_OK in link-host.sh's smoke run and in the workflow's verify gate.
  • Bundle: pycvc-gl-cp312-3.7.5+cvc.1-wasm-wasm32-release-static.tar.gz, 86,469,952 bytes, sha256 fdd5f1b7….

Not in this PR

Compared with v3.7.5's run, the host link has five more undefined symbols, all emscripten_fetch*. Since #888, the pycvc host pulls in cvc::net's fetch backend too. link-host.sh links with -sERROR_ON_UNDEFINED_SYMBOLS=0 (as it does for libpython's hashlib gap), so these are imports that fail only if Python makes an HTTP request through cvc::net. Neither node check does. Making that work needs -sFETCH=1 plus -sASYNCIFY or -pthread on the host link, so it's left as a follow-up.

… one copy

link-host.sh left libvtklibxml2-*.a out of the host link (#872): VTK's
bundled libxml2 kept 65 internals under plain names, which collided with the
libxml2 ImageMagick brings and made a module node could not compile. vtk
9.5.0+cvc.4 (cy-pca/cvcpkg#497, #505) builds its wasm variants against
cvcpkg's libxml2, libtiff, liblzma and freetype, so the bundle no longer
ships libvtk{libxml2,tiff,lzma,freetype} and the exclusion matches nothing.
Every deps archive goes into the group again; the comment says why an older
vtk would break and that the workflow's node check catches it.
Since arigl took the network flags, every wasm link of it pulls in cvc::net's fetch backend and
needs -sFETCH=1, which only the examples' gallery link gives it. pycvc-gl's wasm build has the
examples off, so arigl.js fails to link (undefined emscripten_fetch*), and cmake --install then
stops on the missing bin/arigl.js before link-host.sh runs. The package never shipped arigl, so
turn it off, as publish-cvcgl-wasm.yml already does; build-wasm.ps1 gets the ari and arigl
options build-wasm.sh has.
@transfix
transfix marked this pull request as ready for review October 30, 2026 23:02
@transfix
transfix enabled auto-merge (squash) October 30, 2026 23:15
@transfix
transfix merged commit b6d7e10 into master Oct 30, 2026
22 of 28 checks passed
@transfix
transfix deleted the fix/link-host-vtk-cvc4 branch October 30, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant