Skip to content

cvcgl-cuda and pycvc-gl-cp311-cuda recipes: their CPU peers' dependencies, every -cuda pair checked - #1211

Merged
transfix merged 2 commits into
masterfrom
tfx/cuda-peer-recipe-deps
Nov 13, 2026
Merged

transfix merged 2 commits into
masterfrom
tfx/cuda-peer-recipe-deps

Conversation

@transfix

Copy link
Copy Markdown
Owner

cvcgl-cuda and pycvc-gl-cp311-cuda now declare their CPU peers' dependencies. The parity check from #1208 now covers every -cuda recipe, each with an explicit swap map.

Stacked on #1208. This branch was cut from tfx/libcvc-cuda-recipe-deps, so the parity script exists here. It targets master because ci.yml only runs on PRs into master. Until #1208 merges, this PR also shows #1208's commit (1ac35b5). Merge #1208 first. Only the last commit, f6bf901, is this PR's.

The gaps, and whether they matter

Each -cuda recipe builds its CPU peer's sources with the same CMake. But its own depends: is what cvcpkg pack bakes into the bundle's required_deps, and cvcpkg install is flat.

pycvc-gl-cp311-cuda lacked vtk-python-cp311: it matters, and the published bundles are broken

  • How it is built. publish-cvcpkg.yml's Linux CUDA lane (build-cuda):

    • installs python311 numpy-cp311 vtk vtk-python-cp311 xorgproto cvcgl into $PY;
    • builds bindings/pycvc with CVC_BUILD_PYCVC_GL=ON against $STAGE;$PY;$DEPS;
    • runs cvcpkg pack cvcpkg/recipes/pycvc-gl-cp311-cuda --from-prefix stage-pycvcgl-cuda.

    The Windows CUDA job builds no pycvc packages.

  • Does the GPU build link it? Yes. CVC_PYCVCGL_VTK_BRIDGE defaults to ON (bindings/pycvc/CMakeLists.txt:389), and neither the workflow nor the recipe's scripts turn it off. With it on, CMake links libvtkWrappingPythonCore3.11-9.5, or stops with a FATAL_ERROR if it can't find it.

  • Evidence from the published bundle. I downloaded pycvc-gl-cp311-cuda-3.7.13+cvc.2-linux-x86_64-release-shared.tar.zst from cvcpkg.org; its sha256 matches the catalog's (f0a5a2b0…). In it, lib/python3.11/site-packages/pycvc_gl/_pycvc_gl.so:

    • has DT_NEEDED libvtkWrappingPythonCore3.11-9.5.so.1;
    • imports vtkPythonUtil::GetObjectFromPointer and vtkPythonUtil::GetPointerFromObject;
    • has DT_RUNPATH $ORIGIN/../../.., so it looks for that library in the install prefix.
  • What the catalog declares. All 14 published rows, 3.5.1+cvc.1 through 3.7.13+cvc.2, have required_deps of pycvc-cp311-cuda, libcvc-cuda, cvcgl, python311, numpy-cp311, vtk. None names vtk-python-cp311. Every published pycvc-gl-cp311 row (the CPU peer) does.

  • Nothing else brings it in. The published closure of those six names on linux x86_64 is 61 packages, and vtk-python-cp311 is not one of them. vtk 9.5.0+cvc.3 needs only glu, hdf5, libglvnd, libx11, libxext, libxt, qt6, tiff and zlib.

  • So: in a fresh cvcpkg install pycvc-gl-cp311-cuda prefix, import pycvc_gl cannot load _pycvc_gl.so. A cvcpkg build of the recipe would stop at configure instead, because its deps prefix holds only what the recipe declares.

  • Fix: vtk-python-cp311 added to build and runtime. libcvc and pycvc-cp311 are swapped for their -cuda peers as before. cvcgl is deliberately not swapped: there is one cvcgl (feat(cuda): publish pycvc-cuda + pycvc-gl-cuda; push recipes so cvcpkg.org can graph them #174).

cvcgl-cuda lacked imgui-w32, sdl3 and ffmpeg-lgpl: no bundle is broken today, but a build of the recipe is

  • How it is built: it isn't.

    • Nothing builds or publishes cvcgl-cuda. publish-cvcpkg.yml's CUDA family header says "hence no cvcgl-cuda here", and the lane installs the published CPU cvcgl instead.
    • ci-recipe.yml builds only libcvc.
    • GET /v1/packages/cvcgl-cuda returns {"total":0}.
    • pycvc-gl-cp311-cuda links the single cvcgl, which the variant-invariant cvc::volume ABI makes safe.
  • Does the GPU build use them? Yes, exactly as the CPU build does.

    • src/cvcGL has no CVC_USING_CUDA code at all.
    • cvcgl-cuda's scripts configure the same src/cvcGL as cvcgl's.
    • src/cvcGL/CMakeLists.txt finds imgui-w32 (line 189) and SDL3 (line 306) QUIET, and src/cvcMedia/CMakeLists.txt finds FFmpeg through pkg-config or by name. Each is silently skipped when absent.
  • What goes wrong. A cvcpkg build cvcgl-cuda from the old list, whose deps prefix holds only libcvc-cuda, vtk and their closures:

    • drops the ImGui overlay, the SDL3 input seam and the FFmpeg player;
    • changes the PUBLIC CVC_ENABLE_IMGUI and CVC_ENABLE_SDL defines, so its consumers compile a different cvcGL than cvcgl's.

    A prefix that had them anyway (including a host FFmpeg, found through pkg-config) gives a libcvcGL that links libraries its bundle doesn't declare.

  • Fix: all three added to build and runtime, with cvcgl's platform scopes (ffmpeg-lgpl on linux, macos and windows). The recipe's STATUS comment said cvcgl-cuda "is published as the cvcgl provider slot for CUDA hosts so pycvc-gl-cuda has an ABI-matched cvcGL". That stopped being true with feat(cuda): publish pycvc-cuda + pycvc-gl-cuda; push recipes so cvcpkg.org can graph them #174, and the comment now says what is.

The other pairs

cvc-cli-cuda and pycvc-cp311-cuda already match their peers with the libcvc -> libcvc-cuda swap. libcvc-cuda matches on #1208.

What changes

  • cvcpkg/recipes/pycvc-gl-cp311-cuda/recipe.yaml: adds vtk-python-cp311, with the evidence above in the comments.

  • cvcpkg/recipes/cvcgl-cuda/recipe.yaml: adds imgui-w32, sdl3 and ffmpeg-lgpl, and corrects the STATUS comment.

  • .github/scripts/recipe-deps-parity.py: one table, PAIRS. For each -cuda recipe it holds the CPU peer, a swap map and any CPU-only entries:

    -cuda recipe CPU peer swaps left out
    libcvc-cuda libcvc none build googletest
    cvcgl-cuda cvcgl libcvc -> libcvc-cuda
    cvc-cli-cuda cvc-cli libcvc -> libcvc-cuda
    pycvc-cp311-cuda pycvc-cp311 libcvc -> libcvc-cuda
    pycvc-gl-cp311-cuda pycvc-gl-cp311 libcvc -> libcvc-cuda, pycvc-cp311 -> pycvc-cp311-cuda

    The check is the same as before: (kind, name) per platform in the -cuda build matrix, after swaps, plus host_tools. It also fails when:

    • a *-cuda recipe directory isn't in PAIRS, so a new peer can't skip the check;
    • PAIRS names a recipe that doesn't exist;
    • a swap's CPU name is no longer declared by the peer (a stale swap).
  • .github/workflows/ci.yml: the step in recipe-version is renamed to "The -cuda recipes' dependencies match their CPU peers'" and its comment updated. It is still a step, not a new required check. ci.yml stays CRLF: git diff --numstat shows 6 added and 5 removed lines.

Verification

All runs were local, with Python 3.11 and PyYAML 6.0.3.

  • This branch passes:
    • libcvc-cuda: 46 deps on Linux, 47 on Windows;
    • cvcgl-cuda: 10 on each;
    • cvc-cli-cuda: 4 on each;
    • pycvc-cp311-cuda: 6 on each;
    • pycvc-gl-cp311-cuda: 13 on each.
  • Master's recipes fail (git archive origin/master cvcpkg/recipes):
    • cvcgl-cuda: 12 differences (3 deps × build/runtime × linux/windows);
    • libcvc-cuda: 15 on Linux and 16 on Windows;
    • pycvc-gl-cp311-cuda: 4.
  • libcvc-cuda recipe: libcvc's dependencies, kept in step by CI #1208's head fails on exactly the two gaps above.
  • Negative tests: a dummy foo-cuda recipe fails as "not in PAIRS". Renaming cvc-cli's libcvc to libcvc-cuda fails as a stale swap.
  • ci.yml and both recipes parse with yaml.safe_load.

Not verified:

  • A publish. Nothing goes to cvcpkg.org from this PR; that needs Joe's OK. The fixed required_deps reach users only when pycvc-gl-cp311-cuda is next published by a v* tag or a publish_cuda dispatch. The 14 published rows keep the short list.
  • An actual import pycvc_gl in a fresh Linux prefix. The DT_NEEDED entry and the closure walk are the evidence; there is no Linux host here.
  • A build of cvcgl-cuda from its recipe.

Found, not fixed (follow-ups)

  • cvcgl-cuda's build.sh doesn't map CVC_LINK to BUILD_SHARED_LIBS as cvcgl's does, so a Linux --link shared build would ship the static archive (build.ps1 gets the mapping from _common/env-windows.ps1). Its package.files lack lib/cvcGL* (the MSVC static lib; cvcgl +cvc.4's Windows pack failed for this) and cvcMedia's files, and cmake_packages lacks cvcMedia.
  • pycvc-gl-cp311-cuda's build.sh doesn't pin Python3_EXECUTABLE or the NumPy include dir the way pycvc-gl-cp311's does.
  • Stale comments in the CPU recipes. pycvc-gl-cp311/recipe.yaml (lines 30–31) still says its CUDA peer links "the GPU cvcgl-cuda", and cvcgl/recipe.yaml (lines 103–108) describes GL <-> CUDA interop as if it existed.

libcvc-cuda's build.sh and build.ps1 run libcvc's scripts with CVC_ENABLE_CUDA=ON, and the
publish workflow's CUDA jobs install libcvc's closure, so the GPU build links what the CPU build
links. Its own depends: list, which `cvcpkg pack` bakes into the bundle's required_deps, was a hand
copy that had drifted again. The dry-run CUDA configure (run 43150296417) enables libcurl,
yaml-cpp, json-schema-validator, FTXUI, tvision (ncursesw), Jolt, Qhull, Opus and PocketFFT, and
the recipe declared none of them, so `cvcpkg install libcvc-cuda` gives a libcvc.so that links
libraries the flat prefix does not have. That is how assimp broke it before.

- depends: now has libcvc's entries, with libcvc's platform scopes:
  - build: tvision, clipper2, cdt and shewchuk-predicates join pegtl;
  - runtime: added pocketfft, libopus, yaml-cpp, nlohmann-json, json-schema-validator, ftxui,
    ncurses, joltphysics, qhull, curl, openmp and mingw-w64-runtime; fftw3 is gone, as it is
    from libcvc since PocketFFT replaced it.
  googletest is the one libcvc build dep left out: it only builds the test suite, and
  libcvc-cuda's scripts leave tests off.
- .github/scripts/recipe-deps-parity.py compares the (kind, name) dependencies both recipes
  declare on each platform in libcvc-cuda's build matrix (linux, windows), plus host_tools.
  ci.yml's recipe-version job runs it as a new step, so no required check is added. On master's
  recipes it fails with 15 differences on Linux and 16 on Windows; on these it passes with 46
  and 47 dependencies.
…cies, every -cuda pair checked

Each -cuda recipe builds its CPU peer's sources with the same CMake, but its own depends: is what
`cvcpkg pack` bakes into the bundle's required_deps, and `cvcpkg install` is flat. Two more had
drifted.

- pycvc-gl-cp311-cuda adds vtk-python-cp311 (build and runtime). bindings/pycvc builds the
  VTK-Python bridge by default, and publish-cvcpkg.yml's CUDA lane installs vtk-python-cp311
  before it builds, so the published 3.7.13+cvc.2 Linux _pycvc_gl.so has DT_NEEDED
  libvtkWrappingPythonCore3.11-9.5.so.1. None of the 14 published rows names vtk-python-cp311,
  and nothing in their 61-package closure ships that library, so `import pycvc_gl` cannot load
  in a fresh install prefix.
- cvcgl-cuda adds imgui-w32, sdl3 and ffmpeg-lgpl (build and runtime, cvcgl's platform scopes).
  Nothing builds or publishes cvcgl-cuda today (the CUDA lane installs the one cvcgl), so no
  bundle is broken. But cvcGL and cvcMedia find all three QUIET, so a build of the recipe as it
  was dropped the ImGui overlay, the SDL3 seam and the FFmpeg player, changing cvcGL's PUBLIC
  defines. Its STATUS comment, which said it was published for pycvc-gl-cuda, now says what
  is true.
- .github/scripts/recipe-deps-parity.py covers all five pairs (libcvc, cvcgl, cvc-cli,
  pycvc-cp311, pycvc-gl-cp311), each with an explicit swap map: libcvc -> libcvc-cuda
  everywhere, plus pycvc-cp311 -> pycvc-cp311-cuda for pycvc-gl-cp311-cuda, whose cvcgl stays
  unswapped. It also fails on a *-cuda recipe missing from its table and on a swap whose CPU
  name the peer no longer declares. ci.yml's step is renamed to match.
@transfix
transfix enabled auto-merge (squash) November 13, 2026 02:19
@transfix
transfix merged commit 7714a53 into master Nov 13, 2026
30 of 33 checks passed
@transfix
transfix deleted the tfx/cuda-peer-recipe-deps branch November 13, 2026 22:21
transfix added a commit that referenced this pull request Nov 14, 2026
…#1177, #1167) into perf/threaded-s1b

The one conflict is the sanitizers' SAN_CXX_TESTS list in ci.yml: this branch added
stream_test, net_ws_client_test and ariadne_host_test, and #1167 added skeleton_test. The
list keeps all four.
transfix added a commit that referenced this pull request Nov 14, 2026
… check requires

net_host.cpp: master's register_http_uri_handler(app, policy) beside enable_e2ee.
transfix added a commit that referenced this pull request Nov 14, 2026
#1237)

libcvc-cuda 3.7.13+cvc.2 (packed 2026-11-10, before #1211 brought its runtime list level with
libcvc's) ships a libcvc.so that needs yaml-cpp, ftxui, json-schema-validator, Jolt, curl, opus
and ncurses, and its manifest declares none of them. A consumer whose resolver picks it for
`libcvc` (any CUDA host) gets a prefix where libcvc.so does not load and `import pycvc` fails.
The pack step only copies the recipe's depends: into required_deps; nothing checked the list
against what the library links, and the publish job's own deps prefix holds libcvc's whole
closure, so the build never noticed.

.github/scripts/bundle-check-closure.sh installs a packed bundle's declared required_deps from
the catalog into an empty prefix, unpacks the bundle over them and runs sdk-check-closure.sh
there. publish-cvcpkg runs it between pack and publish for libcvc-cuda (Linux) and for libcvc
(Linux x86_64 release).
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