Skip to content

ariglx-web and the pycvc wasm host link with undefined symbols as errors - #1075

Merged
transfix merged 3 commits into
masterfrom
fix/ariglx-web-strict-link
Nov 9, 2026
Merged

transfix merged 3 commits into
masterfrom
fix/ariglx-web-strict-link

Conversation

@transfix

@transfix transfix commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

W1's last link cleanup. python312 3.12.10+cvc.23 for wasm and wasm-mt (cy-pca/cvcpkg#565, #567; on cvcpkg.org since 2026-11-08) has pyexpat's expat and _sha2's HACL SHA-2 in libpython3.12.a. So ariglx-web's link and the pycvc wasm host's link-host.sh link no longer need -sERROR_ON_UNDEFINED_SYMBOLS=0.

ariglx-web (src/ariadne_python/ariadne_python.cmake)

  • Drops -sERROR_ON_UNDEFINED_SYMBOLS=0 -sWARN_ON_UNDEFINED_SYMBOLS=1. In the last ariglx-web CI run and in local lean and full builds, the 64 Python symbols were the only undefined ones.
  • Requires cvc.23 or later. cvcpkg's version ranges ignore +cvc.N (>=3.12.10+cvc.23 would match cvc.13), so a recipe version: can't express it. Instead the configure reads share/libcvc-deps/python312/manifest.yaml in the deps prefix and stops on an older bundle. A prefix without a manifest is left to the link. Tested with cmake -P against a cvc.13 manifest (stops), a cvc.23 one (passes) and none (passes).

pycvc wasm host (bindings/pycvc/wasm/link-host.sh)

  • Drops the flag, and the "un-archived HACL gap" note. It reads the same manifest check.
  • The flag also hid 44 other undefined symbols (v3.7.12's publish-pycvc-gl-wasm log), none of them called by the node smoke. The link now names what a CMake executable gets from its targets, which arigl/ariglx already link:
    • libcvcMedia.a: audio_stream_player;
    • -sFETCH=1: cvc::net's fetch backend;
    • -lwebsocket.js;
    • -sFULL_ES3=1 -sMIN_WEBGL_VERSION=2 -sMAX_WEBGL_VERSION=2: VTK's FindOpenGL, 24 GL calls;
    • --js-library vtkWebAssemblyRenderWindowInteractor.js: VTK RenderingUI's.

Test: src/arigl/web/test/python/stdlib.ari and a smoke case. A python: block parses XML with xml.parsers.expat, takes hashlib.sha256(b"abc") and seeds random with a string. Each of those aborted the page before.

CI: ci.yml's ariglx-web job and publish-pycvc-gl-wasm.yml print the python312 they installed. ci.yml has no pycvc wasm host job, so publish-pycvc-gl-wasm.yml is dispatched on this branch with dry_run=true. A dry run packs and checks only: no upload, no publish.

Docs: ARIADNE.md §9.6 (expat and SHA-2 now work), CVCGL_WASM.md, and ARIADNE_SCRIPTING_HOSTS.md §1, §5.1, §5.5 (host link step 6), §9 and §10's W1 row.


Update: the pycvc host dry run waits on cy-pca/cvcpkg#581. The first dry run (run 42537540047, python312 cvc.24) didn't fail on an undefined symbol. It failed on duplicates:

wasm-ld: error: duplicate symbol: g_reparseDeferralEnabledDefault
>>> defined in wasm-deps/lib/libpython3.12.a(xmlparse.o)
>>> defined in wasm-deps/lib/libvtkexpat-9.5.a(xmlparse.c.o)
wasm-ld: error: duplicate symbol: _INTERNAL_trim_to_complete_utf8_characters
  • Cause: cvc.23 archived CPython's expat, and its pyexpatns.h leaves those two internals unrenamed. VTK's bundled expat defines the same two, and vtk-python's wrappers pull it into the link. Upstream CPython's pyexpatns.h lacks both (3.12, 3.13, main).
  • Independent of this PR: duplicate symbols are errors with or without the flag, so master's next pycvc host link (a v* tag) fails the same way on cvc.24.
  • The fix: python312 cvc.25 (wasm, wasm-mt): namespace all of the bundled expat cy-pca/cvcpkg#581 renames them in python312 cvc.25. It was verified in WSL on wasm and wasm-mt: 0 duplicate and 0 undefined symbols linking libpython with VTK's expat, and both parsers run.
  • This PR, since that run (6216eb7):
    • with the VTK bridge, both checks require cvc.25 or later;
    • without it, they still require cvc.23 (the lean ariglx-web job passed on cvc.24, with all 9 cases including stdlib.ari).
  • Merged master (607b502): the one conflict was imgui -> imgui-w32 in publish-pycvc-gl-wasm.yml, and both sides are kept.

Once #581 is merged and cvc.25 is published, re-dispatch publish-pycvc-gl-wasm.yml on this branch with dry_run=true.

python312 3.12.10+cvc.23 (wasm and wasm-mt, cy-pca/cvcpkg#565 and #567)
archives pyexpat's expat and _sha2's HACL SHA-2, so neither link needs
-sERROR_ON_UNDEFINED_SYMBOLS=0 any more.

- cvc_ariadne_python_wasm_host drops the flag. Its configure reads the
  deps prefix's python312 manifest and stops on anything older than
  cvc.23: cvcpkg's version ranges ignore +cvc.N, so the recipes can't ask
  for it.
- link-host.sh drops it too and checks the same manifest. Allowing
  undefined symbols had also hidden 44 others the node smoke never
  calls, so the link now names what a CMake executable gets from its
  targets: libcvcMedia.a, -sFETCH=1, -lwebsocket.js, WebGL 2
  (-sFULL_ES3=1 -sMIN_WEBGL_VERSION=2 -sMAX_WEBGL_VERSION=2) and VTK
  RenderingUI's js-library.
- The ariglx-web smoke gains stdlib.ari: a python: block that parses XML
  with xml.parsers.expat, takes a SHA-256 and seeds random with a string,
  each of which used to abort the page.
- ci.yml and publish-pycvc-gl-wasm.yml print the python312 they
  installed. The recipes, ARIADNE.md, CVCGL_WASM.md and the scripting
  hosts roadmap (5.1, 5.5, 9, 10) say what is required now.
The pycvc_gl host's dry run (publish-pycvc-gl-wasm) failed on duplicate
symbols, not undefined ones:

  wasm-ld: error: duplicate symbol: g_reparseDeferralEnabledDefault
  >>> defined in libpython3.12.a(xmlparse.o)
  >>> defined in libvtkexpat-9.5.a(xmlparse.c.o)

python312 cvc.23 and cvc.24 archive CPython's expat, whose pyexpatns.h
leaves two internals unrenamed (that one and
_INTERNAL_trim_to_complete_utf8_characters). VTK's bundled expat defines
both too, and vtk-python's wrappers pull it in. This happens with or
without the strict flag. cy-pca/cvcpkg#581 renames them in cvc.25.

Both checks, the configure's (cvc_ariadne_python_wasm_host) and
link-host.sh's, now ask for cvc.25 or later when the VTK bridge is
linked. Without the bridge they still ask for cvc.23, which the lean
ariglx-web job passes on cvc.24. link-host.sh runs its check after the
vtk-python detection. The recipes, the workflow comment, CVCGL_WASM.md
and the roadmap (1, 5.1, 5.5, 10) say so.
@transfix
transfix merged commit f261f92 into master Nov 9, 2026
34 of 36 checks passed
@transfix
transfix deleted the fix/ariglx-web-strict-link branch November 9, 2026 18:04
transfix added a commit that referenced this pull request Nov 9, 2026
The conflicts were #1094's own lines, squashed on master, against this
branch's edits of them (the ABI notes in wasm_engine.h, and roadmap 8.3's
G1 lists and the G1 row); this branch's side is kept. #1075's roadmap
changes (5.1, 5.5, 9, 10) come in untouched. The 8.4.1 note now gives
mesh_read's attribute as a pointer and a length, as the import takes it.
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