Skip to content

fix(cvcgl-examples): ask CGAL for the Boost variant cvcpkg ships - #207

Merged
transfix merged 1 commit into
masterfrom
fix/cvcgl-examples-boost-variant
Aug 21, 2026
Merged

transfix merged 1 commit into
masterfrom
fix/cvcgl-examples-boost-variant

Conversation

@transfix

Copy link
Copy Markdown
Owner

What

First actual run of the cvcgl-examples linux entry (cvcpkg validate never parses build scripts, so this path had only ever been read) fails during configure:

CMake Error at …/lib/cmake/Boost-1.86.0/BoostConfig.cmake:67 (find_package):
  Could not find a configuration file for package "boost_program_options"
  that exactly matches requested version "1.86.0".
  The following configuration files were considered but not accepted:
    …/boost_program_options-1.86.0-shared/boost_program_options-config.cmake, version: 1.86.0 (shared)

The shared bundle is sitting right there and gets rejected.

Why

find_package(cvc) pulls CGAL in transitively, and CGAL_TweakFindBoost.cmake sets Boost_USE_STATIC_LIBS from the CGAL_Boost_USE_STATIC_LIBS cache option — ON in the cvcpkg CGAL bundle. Boost's per-component version files then reject every shared config ("Do not return shared libraries when Boost_USE_STATIC_LIBS is ON"), and cvcpkg ships Boost shared-only.

Isolated with a probe project so this isn't guesswork — and note it is not caused by the recipe's own -DBUILD_SHARED_LIBS=OFF:

PROBE before:    Boost_USE_STATIC_LIBS=''    BUILD_SHARED_LIBS='OFF'
PROBE after cvc: Boost_USE_STATIC_LIBS='ON'  cvc_FOUND='1'

Fix

Pass -DCGAL_Boost_USE_STATIC_LIBS=OFF, not -DBoost_USE_STATIC_LIBS=OFF. CGAL assigns the latter as a normal variable, which shadows the cache entry -D creates — so the obvious spelling compiles and silently does nothing. Setting the CGAL option is what actually reaches Boost's version check.

Verified: configure now succeeds and the build proceeds through to linking.

Follow-ups (not in this PR)

  1. The linux entry still cannot complete against the published SDK. After the Boost fix, the nav demos fail to link:
    undefined reference to `cvc::nav::sim_thread::read() const'
    undefined reference to `cvc::nav::city_scene…'  `cvc::nav::coef_mlp::default_biased…'
    
    Every missing symbol is cvc::nav::*. The published libcvc 3.2.4+cvc.12 ships no cvc/nav/ headers and zero nav symbols — it predates the nav kernels (feat(nav): cvc::nav grid navigation kernels for GRL-SNAM realtime #198). The build compiles against the repo's inc/ while linking the older installed libcvc.so, so this surfaces only at link time. libcvc must be republished from master before this entry can build, after which a version floor on the libcvc dep would turn this into a clear resolution error instead of a confusing link failure.
  2. The deeper cause of the Boost issue is the cgal recipe in libcvc-deps: CGAL is configured with CGAL_Boost_USE_STATIC_LIBS=ON while the fleet ships shared Boost. Fixing it there would fix every consumer (anything doing find_package(cvc) then find_package(Boost)), but needs a CGAL rebuild + republish.

The wasm entry is unaffected and verified working end-to-end — it compiles the whole cvc core from source, so it never consults an installed libcvc.

Running the recipe's linux entry for the first time (cvcpkg validate never
parses build scripts) fails in configure:

    CMake Error at .../lib/cmake/Boost-1.86.0/BoostConfig.cmake:67:
      Could not find a configuration file for package "boost_program_options"
      that exactly matches requested version "1.86.0".
      The following configuration files were considered but not accepted:
        .../boost_program_options-1.86.0-shared/...  version: 1.86.0 (shared)

The shared bundle is right there and is rejected anyway.  find_package(cvc)
pulls CGAL in transitively, and CGAL_TweakFindBoost.cmake sets
Boost_USE_STATIC_LIBS from the CGAL_Boost_USE_STATIC_LIBS cache option, which
is ON in the cvcpkg CGAL bundle.  Boost's own component version files then
refuse every shared config ("Do not return shared libraries when
Boost_USE_STATIC_LIBS is ON"), and cvcpkg ships Boost shared-only.  Isolated
with a probe project:

    PROBE before:    Boost_USE_STATIC_LIBS=''
    PROBE after cvc: Boost_USE_STATIC_LIBS='ON'

so this is not the recipe's own -DBUILD_SHARED_LIBS=OFF.

Set CGAL_Boost_USE_STATIC_LIBS=OFF rather than Boost_USE_STATIC_LIBS=OFF:
CGAL assigns the latter as a normal variable, which shadows the cache entry a
-D would create, so the obvious spelling silently does nothing.

Configure now succeeds and the build proceeds to linking.
@transfix
transfix merged commit 7aa4c00 into master Aug 21, 2026
12 checks passed
transfix added a commit that referenced this pull request Aug 21, 2026
The cvcgl-examples recipe has been in the tree since #204 but was never
wired into publish-cvcpkg.yml, so the example commands never reached the
catalog: the workflow only knew about libcvc, libcvc-cuda, cvcgl and the
pycvc columns.

Add a linux release step alongside cvcgl, plus a cvcgl_examples output on
compute-revisions so the revision is chosen the same way as every other
package (`cvcpkg next-revision`).  Nothing links the examples, so unlike
cvcgl this runs only in the pyver-311 column rather than in every column.

The step invokes the recipe's own build.sh instead of repeating its cmake
in YAML.  Duplicating it would leave two sources of truth for flags like
the -DCGAL_Boost_USE_STATIC_LIBS=OFF workaround (#207) -- and a recipe
drifting from what CI actually runs is exactly how one passes `cvcpkg
validate` while being broken.  build.sh takes its prefixes from a single
CVC_DEPS_PREFIX, and CMAKE_PREFIX_PATH is a list, so the three prefixes
this job spreads its dependencies across are handed over as one
semicolon-separated value (verified: cvc + Boost both resolve from a
multi-prefix list passed through build.sh's quoting).

The nav demos need cvc::nav, which exists only in libcvc >= the nav
kernels (#198) -- newer than the published bundle.  That resolves itself
here because the job builds and installs libcvc from this tree into
$STAGE before this step runs; publishing the examples from anywhere else
needs a libcvc republish first.

The recipe's `platform: wasm` entry (the browser build under
share/cvcgl-examples/web/) is deliberately NOT wired up: it needs emsdk,
the wasm dependency closure, and a rendering-enabled wasm vtk on the
catalog.  Left as a TODO in the step.
@transfix
transfix deleted the fix/cvcgl-examples-boost-variant branch October 29, 2026 20:53
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