Skip to content

fix(release): self-contained SDK archives on all platforms, proved by a consumer smoke test; build tools from cvcpkg - #587

Merged
transfix merged 10 commits into
masterfrom
fix/release-sdk-self-contained
Oct 11, 2026
Merged

transfix merged 10 commits into
masterfrom
fix/release-sdk-self-contained

Conversation

@transfix

@transfix transfix commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Builds on #585 (merged).

Problem

release.yml's header promises self-contained SDK archives. They are not.

  • Linux. The stage step still copies libboost_*, libhdf5*, libgsl* and liblog4cplus* plus headers from apt's dirs. The job no longer installs any of those. The v3.5.0 tarball holds libcvc.so*, libxmlrpc.a and the runner's preinstalled libfftw3*, which libcvc no longer even links.
  • macOS static. The stage step copies whatever *.a files the shared cvcpkg prefix happens to have. That is a partial set with no Boost thread/filesystem and no dylibs, even though a static libcvc links its deps as shared libraries.
  • All platforms. No archive ships the deps' CMake package configs that cvcConfig.cmake find_dependency()s.

What every archive bundles now (Linux, macOS, Windows; shared and static)

Each archive is libcvc's install tree plus every cvcpkg bundle libcvc uses, as whole bundles: libraries, headers, lib/cmake, lib/pkgconfig, and the tools some configs reference.

sdk-bundle-deps.sh runs cvcpkg install on every bundle in the build prefix's lockfile. Each bundle is pinned to the version libcvc was built against, so cvcpkg serves it from the download cache. It skips the bundles the release build never links:

  • the gRPC stack: abseil, c-ares, grpc, protobuf, re2
  • openssl, openblas, gsl, levmar, log4cplus, yaml
  • the build tools cmake and ninja

cvcpkg still pulls in anything a kept bundle requires; on Windows that brings back openssl (needed by curl) plus cmake and ninja. The script then fails if the SDK's bundles drift from the build's. Deps come to 343 MB on Linux, and 506 MB instead of 1.5 GB on Windows.

Why whole bundles rather than an ldd closure. A shipped package config only loads if every file its export set names exists. hdf5-targets.cmake FATAL_ERRORs on a missing bin/h5diff or lib/libhdf5.a. Boost's per-component configs silently drop any variant whose library is gone.

Why pinned install rather than copy + cvcpkg uninstall. uninstall cannot read the Windows bundles: they are zip files named .tar.zst. install handles them; uninstall's tar reader crashes.

Runtime lookup.

  • Linux: shared libcvc gets $ORIGIN.
  • macOS: shared libcvc gets @loader_path, plus an ad-hoc re-sign. dylibbundler is gone.
  • Windows: the DLLs sit beside cvc.dll in bin/, with the MSVC runtime.

Packaging-time check. sdk-check-closure.sh walks everything the shared libcvc loads. It reads ELF NEEDED entries, Mach-O load commands, or PE imports; the PE imports come from a small pe_imports.py, since the Windows runner has no objdump. It fails the stage step on anything outside the SDK or the base system. On Windows it also fails if the MSVC runtime isn't shipped in bin/.

Verified, not assumed: sdk-smoke

A new job takes each of the 6 Release archives onto a fresh runner (ubuntu, macos, windows-2022). It configures, builds and runs a find_package(cvc CONFIG) consumer with only the extracted archive on CMAKE_PREFIX_PATH (sdk-smoke-test.sh):

  • no LD_LIBRARY_PATH or DYLD_* is set;
  • on Windows, PATH is cut down to the SDK's bin/ plus the Windows directories.

Runner images ship libraries of their own, so it also fails if any of these came from outside the archive:

  1. a loaded package config;
  2. a link-line path that is not the compiler, platform SDK or CUDA, or on Linux not a glibc/GCC-runtime library by name;
  3. a library the loader mapped that isn't part of the base system.

The release job now requires every leg to pass.

Fixes the checks found

The first dry run (37839885257) caught each of these:

  • Static consumers could not resolve cvc's private deps. A STATIC cvc exports its PRIVATE imported-target links (yaml-cpp::yaml-cpp, ftxui::*, nlohmann_json_schema_validator::validator, CURL::libcurl; gRPC/protobuf when enabled) as $<LINK_ONLY:...>. cvcConfig.cmake never found those packages. src/cvc/CMakeLists.txt now records them and the config find_dependency()s them, for a static cvc only.
  • Host libraries leaked through the ImageMagick delegate closure. cvcConfig.cmake appended the codec delegates with unrestricted find_library for every consumer. The macOS static smoke leg linked and loaded Homebrew's libbrotlidec that way. The closure is now applied only for a static MagickCore (wasm), the only case that needs it.
  • The Windows -static archive always shipped a DLL. PowerShell passed -DBUILD_SHARED_LIBS=$shared to cmake as the literal text $shared, which CMake reads as true; configure printed BUILD_SHARED_LIBS=$shared. The Windows Configure step now quotes its -D arguments, so -static builds a real static cvc.lib.
  • A static cvc leaked build-local targets into its export, twice.
    • MSVC wrote cvc-cli's import library over the static cvc.lib (LNK1149). It's now named cvc-cli.
    • The ImageMagick delegate probe linked eleven PkgConfig::_im_dep_* targets to cvc PRIVATE, and a static library exports PRIVATE links. They now hang off the build-local ImageMagick::MagickCore.
  • cvc.dll needs a DLL nobody may ship. The new Windows closure check found that cvc.dll imports libomp140.x86_64.dll, which no Windows SDK has ever contained; see "Still outside cvcpkg".
  • Tool contamination. Covered under build tools below.

Build tools from cvcpkg

.github/actions/cvcpkg-build-tools installs cmake, ninja and pkg-config (plus patchelf on Linux) from cvcpkg, and every apt and Homebrew step is gone.

cmake has to be copied into a clean tree holding only the tools. CMake searches its own install prefix for packages, and run from the cvcpkg tools prefix it handed libcvc that prefix's static libcurl.a. In the first dry run that produced undefined OpenSSL symbols in libcvc.so.

cvcpkg has since republished cmake as relocatable (3.31.7+cvc.8, cy-pca/cvcpkg#143), so the Linux-static and macOS-rpath workarounds are gone (7e6278b, from the cmake-relocation session).

Still outside cvcpkg

  • Compiler: the runner image's GCC, Xcode clang and VS 2022.
  • CUDA toolkit: NVIDIA's network installer, because cvcpkg has no toolkit recipe. Consumers of the CUDA-enabled Linux and Windows SDKs need the toolkit too, since the public headers include <cuda_runtime.h> under CVC_USING_CUDA. The Linux and Windows smoke legs install it for that reason.
  • Windows OpenMP runtime, temporarily. MSVC builds of cvc use -openmp:llvm, whose runtime libomp140.x86_64.dll Microsoft documents as not redistributable, so the SDK cannot ship it. Any machine that loads the Windows SDK's cvc still needs Visual Studio's copy, as every Windows release so far has. sdk-check-closure.sh reports this one DLL as a warning. The Windows smoke run adds Visual Studio's copy to PATH and accepts nothing else from outside the archive. The fix is to link cvc to LLVM's redistributable libomp from cvcpkg, which first needs a Windows build of cvcpkg's openmp recipe (follow-up).

Validation

Dry runs via gh workflow run release.yml --ref fix/release-sdk-self-contained:

  • 37839885257 (dbdfb7e4) found the CURL contamination, the macOS rpath over-check and the two static-smoke leaks.
  • 37845766765 (3bd396cd):
    • all 8 Linux/macOS build lanes passed, including stage, bundling and closure check;
    • all 4 Linux/macOS sdk-smoke legs passed: shared and static each configured, built and ran a consumer with every config, link input and loaded library in the archive or the base system;
    • both Windows lanes failed on libomp140, and the release gate refused accordingly.
  • 37970829003 (884906d7, on master after fix(release): unblock tag releases -- release/shared deps for every lane, Debug best-effort #585, plus relocatable cmake, the real Windows static build, the cvc-cli import-library fix and the libomp140 interim):
    • all 10 build lanes passed, including the first truly static Windows build;
    • 5 of 6 sdk-smoke legs passed: Linux shared/static, macOS shared/static and Windows shared;
    • Windows static failed at generate time on PkgConfig::_im_dep_bzip2: the static export carried 11 ImageMagick codec targets. Fixed in 5184ce65.
  • 38090700629 (5184ce65): fully green. All 10 build lanes passed, all 6 sdk-smoke legs passed (Linux, macOS and Windows, shared and static), and the release job's "Check artifact set" passed.
  • 38097076403 (6b5c734a, also strips vcpkg leftovers, including vcpkg's debug/ tree, from the SDKs): fully green. All 10 build lanes passed, all 6 sdk-smoke legs passed, and the release gate passed. Both Windows archives contain 0 vcpkg files and no debug/ tree. (38094266881 on 3110461c was cancelled as superseded.)

Earlier dry runs 37961531550 and 37963500243 were cancelled as superseded: the head moved on while their macOS jobs waited for runners.

No release, tag or existing run was created, edited or deleted.

Follow-ups noticed

  • cvcpkg packaging:
    • cvcpkg uninstall can't read the zip-format Windows bundles;
    • Windows bundles pull cmake and ninja in as runtime deps;
    • boost's macOS libboost_iostreams loads Homebrew zstd, and its Linux libboost_locale needs the build host's ICU 70;
    • grpc's macOS dylibs load OpenSSL from a builder temp dir.
  • Windows OpenMP: add a Windows build of cvcpkg's openmp recipe, link cvc to its libomp.dll (with /NODEFAULTLIB:libomp.lib), and remove the libomp140 interim.
  • vcpkg-built Windows gmp and mpfr: cvcpkg's Windows gmp 6.3.0+cvc.1 and mpfr 4.2.1+cvc.1 are repackaged vcpkg builds, the only two of the 37 bundles in libcvc's Windows closure. The current native recipes were never republished for Windows. This PR strips their vcpkg files (share/vcpkg-*, vcpkg* SBOMs) and vcpkg's debug/ tree, and fails if any vcpkg file reaches an SDK. Native Windows rebuilds of both are in progress in cvcpkg.
  • Licenses: most cvcpkg bundles ship no license texts, so the SDK archives redistribute dependency binaries without them. That was already true before this PR.
  • CUDA headers: a CUDA-enabled libcvc makes CUDA headers part of its public API. Making the CUDA parts of voxels.h / cuda_utils.h private would remove the toolkit requirement for consumers.

@transfix transfix changed the title fix(release): self-contained Linux/macOS SDK archives, proved by a consumer smoke test; build tools from cvcpkg fix(release): self-contained SDK archives on all platforms, proved by a consumer smoke test; build tools from cvcpkg Oct 8, 2026
…rove it

The release.yml header promised self-contained SDK archives, but the Linux
stage step still copied Boost/HDF5/GSL/log4cplus from apt's dirs, which the
job no longer installs (v3.5.0's tarballs shipped libcvc plus the runner's
fftw3 and nothing else). macOS static copied a partial set of .a files from
the cvcpkg prefix. No platform shipped the deps' CMake configs that
cvcConfig.cmake find_dependency()s.

Bundling (Linux shared + static, macOS shared + static):
- .github/scripts/sdk-bundle-deps.sh copies the cvcpkg prefix libcvc was
  built against into the SDK and `cvcpkg uninstall`s the 11 bundles the
  release build never links (gRPC stack, OpenSSL, OpenBLAS, GSL, levmar,
  log4cplus, libyaml), which is about half the prefix. Bundling is per whole
  cvcpkg bundle, not per file: a shipped package config only loads if every
  file its export set names is present (hdf5-targets.cmake FATAL_ERRORs on a
  missing bin/h5diff), so an ldd closure alone cannot ship working configs.
- Shared libcvc gets $ORIGIN (patchelf) / @loader_path (install_name_tool +
  ad-hoc re-sign); cvcpkg's own libraries already carry them. dylibbundler is
  gone.
- .github/scripts/sdk-check-closure.sh walks what libcvc.so/.dylib loads and
  fails the stage step on anything outside the SDK or the base system.

Verification: a new sdk-smoke job extracts each Release archive on a fresh
runner and builds and runs a find_package(cvc CONFIG) consumer with only the
archive on CMAKE_PREFIX_PATH (.github/scripts/sdk-smoke-test.sh). It fails
if any package config, linked library or loaded library came from outside
the archive. The release job requires it to pass.

Config fix the smoke test needs: a STATIC cvc exports its PRIVATE
imported-target links as $<LINK_ONLY:yaml-cpp::yaml-cpp> etc. (also ftxui,
nlohmann_json_schema_validator, CURL, gRPC/protobuf), and cvcConfig.cmake
never found those packages, so every static consumer failed at generate
time. src/cvc/CMakeLists.txt now records them and cvcConfig.cmake.in
find_dependency()s them for a static cvc only.

Build tools come from cvcpkg too: .github/actions/cvcpkg-build-tools
installs cmake, ninja, pkg-config and patchelf into their own prefix and
puts only those on PATH. The apt and Homebrew steps are gone from every
lane. Workarounds for cvcpkg's cmake bundles: Linux uses the static build
(the shared one has a builder-absolute RUNPATH). On macOS, cvcpkg's curl
and openssl are installed next to cmake and cmake gets an rpath to them,
because the bundle neither declares curl nor has a usable rpath.

Still outside cvcpkg: the compiler (runner image) and the CUDA toolkit
(NVIDIA's installer). Linux SDK consumers need the toolkit, because the
public headers include <cuda_runtime.h> under CVC_USING_CUDA. Windows
archives are unchanged apart from cmake/pkg-config coming from cvcpkg; they
still lack the deps' CMake configs and are not smoke-tested.
… dry run

The first dry run (37839885257) failed both shared Linux lanes, the shared
macOS stage check and both static smoke legs. Each failure was a real problem:

- cvcpkg's cmake ran from the tools prefix, and CMake adds its own install
  prefix to every find_package/find_library search. libcvc's
  find_package(CURL) found the tools' static libcurl.a and linked it without
  OpenSSL (undefined SSL_*/X509_* in libcvc.so), and the Linux static
  smoke leg flagged the same libcurl.a on its link line.
  cvcpkg-build-tools now copies cmake (plus its share/cmake-X.Y) into a clean
  tree that holds nothing but the tools, so cmake's own prefix is empty. On
  Windows that also stops curl.exe/openssl.exe shadowing the runner's.
- cvcConfig.cmake appended ImageMagick's codec-delegate closure with
  unrestricted find_library for every consumer. On macOS that put Homebrew's
  libbrotlidec on the link line and loaded it at run time (macOS static smoke
  leg). It is only needed for a static MagickCore (wasm), so it is now gated on
  that.
- sdk-check-closure.sh required an @loader_path rpath on every macOS dylib with
  @rpath loads. dyld resolves @rpath through the whole load chain, so only
  libcvc itself needs one.

Windows, now bundled and smoke-tested like Linux/macOS:
- sdk-bundle-deps.sh now runs `cvcpkg install` on every bundle in the build
  prefix's lockfile except the unused ones, each pinned to its lockfile version
  (served from the download cache). It replaces copy + `cvcpkg uninstall`,
  which cannot read the Windows bundles: they are zip files named .tar.zst. It
  then fails if the SDK's bundles drift from the build's. cmake and ninja join
  the unused list. The Windows SDK deps shrink from 1.5 GB to 506 MB.
- The Windows stage step calls the bash scripts through Git Bash. The closure
  check reads PE imports with a small python reader (pe_imports.py; the runner
  has no objdump) and requires the MSVC runtime to ship in bin/.
- That check is what found the missing DLL: cvc.dll imports
  libomp140.x86_64.dll (built with -openmp:llvm), but
  InstallRequiredSystemLibraries only knows vcomp140.dll, so no Windows SDK
  ever shipped it. CMakeLists.txt now installs it from the MSVC redist.
- sdk-smoke gains windows-2022 legs: VS generator, PATH cut to the SDK's bin/
  plus the Windows directories, and the consumer lists its own loaded modules.

Smoke checks tightened: link-line paths outside the SDK must be toolchain
paths (compiler, platform SDK, CUDA) or, on Linux, base-system libraries by
name. Loaded libraries outside the SDK must be base-system libraries.
/usr/lib is no longer allowed wholesale.

Diagnostic: the Windows "static" lane has been producing cvc.dll. configure
now prints cvc's library type so the next run shows why.
…rpath workaround

cvcpkg republished cmake as 3.31.7+cvc.8 (cy-pca/cvcpkg#143): RUNPATH
$ORIGIN/../lib on Linux, LC_RPATH @executable_path/../lib on macOS, and curl
plus openssl declared as runtime dependencies. So cvcpkg-build-tools no
longer needs to:
- install the Linux tools --link static to dodge the builder-absolute RUNPATH
  of the shared cmake (+cvc.6);
- install curl and openssl next to cmake on macOS, add an absolute LC_RPATH
  to cmake/ctest/cpack and re-sign them.

Both platforms install the shared tools. The copies in $RUNNER_TEMP/cvcpkg-tools
find their libraries in that tree's lib/, which holds only the versioned
runtime names (libcurl.so.4.8.0, libssl.3.dylib, ...), so find_library() still
finds nothing there. The step now fails if a tool loads a library the tree ships
from anywhere else (dyld's fallback search can quietly take
/usr/lib/libcurl.4.dylib).

On Linux this moves pkg-config from 0.29.2 (the only static build) to pkgconf
3.0.4, the version the macOS jobs already use.
…40 install

- PowerShell does not expand a variable inside an unquoted -DNAME=$var
  argument. The Windows Configure step passed the literal text $shared, which
  CMake reads as true, so the -static lane has always built and shipped a shared
  cvc.dll (dry run 37845766765 printed "cvc is a SHARED_LIBRARY
  (BUILD_SHARED_LIBS=$shared)"). Quote BUILD_SHARED_LIBS and CVC_USING_XMLRPC.
- Remove the libomp140 install rule added in the previous commit, and correct
  the comment it sat under. MSVC's LLVM OpenMP runtime (libomp140.<arch>.dll,
  needed by cvc built with -openmp:llvm) is not in the VS redist, and Microsoft
  documents it as not redistributable, so it cannot be installed. The Windows
  SDK still fails the closure check on it; how cvc should get its OpenMP runtime
  on Windows is being decided separately.
cvc built by MSVC with -openmp:llvm imports libomp140.x86_64.dll, which
Microsoft does not allow redistributing, so the Windows SDK cannot ship it.
Until cvc links cvcpkg's LLVM libomp instead (that needs a Windows build of
cvcpkg's openmp recipe), this one DLL is an explicit, temporary exception:

- sdk-check-closure.sh reports libomp140 as a warning rather than an error.
  Every other MSVC runtime DLL must still ship in bin/.
- sdk-smoke-test.sh's Windows run puts Visual Studio's libomp140 directory on
  PATH and accepts only that file from outside the SDK and Windows; it is
  listed as TEMP, everything else is checked as before.
- The release.yml header documents the exception. Until then, Windows SDK
  consumers need Visual Studio on the host, as every Windows release so far
  has required.
@transfix
transfix force-pushed the fix/release-sdk-self-contained branch from ec5c340 to f9d262e Compare October 9, 2026 16:51
@transfix
transfix changed the base branch from fix/release-workflow-deps to master October 9, 2026 16:51
… loads

The first dry run failed every macOS job with
  cmake loads /usr/lib/libcurl.4.dylib, not the tree's lib/libcurl.4.dylib
cmake did load the tree's libcurl through @rpath; the system frameworks it
links (CoreServices, SystemConfiguration) also load the OS's copy by absolute
path, and the check rejected any copy outside the tree. On macOS, check what
matters instead: each @rpath load of the tool, and of the tree libraries it
pulls in (libcurl -> libssl, libcrypto), resolves into the tree. A missed
@rpath load, which dyld's fallback search turns into the OS copy, still fails.
Linux keeps the ldd check, where no second copy is loaded.
The first truly static Windows build (dry run 37963500243, now that the
-static lane really passes BUILD_SHARED_LIBS=OFF) failed linking cvc-cli:

    LINK : fatal error LNK1149: output filename matches input filename
    'D:\a\libcvc\libcvc\build\lib\Release\cvc.lib'

Linked against a static libcvc, the executable exports symbols, so MSVC writes
an import library for it named after OUTPUT_NAME (cvc) in
CMAKE_ARCHIVE_OUTPUT_DIRECTORY, which is the static cvc.lib it is linking.
Set ARCHIVE_OUTPUT_NAME to cvc-cli. Only Windows import libraries are named by
it; the installed cvc / cvc.exe is unchanged.
The static Windows smoke leg (dry run 37970829003) failed at generate time:

    The link interface of target "cvc::cvc" contains:
      PkgConfig::_im_dep_bzip2
    but the target was not found.

On the raw-libs FindImageMagick path, the pkg-config probe linked each codec
delegate (bzip2, libjpeg, libwebp*, libsharpyuv, libtiff-4, libxml-2.0, liblzma,
lerc) to cvc PRIVATE. That stays inside a shared cvc.dll, but a STATIC cvc
exports private links as $<LINK_ONLY:...>, so all eleven build-local
PkgConfig::_im_dep_* targets ended up in cvcTargets.cmake.

Hang them off the synthesised ImageMagick::MagickCore instead, as the
find_library fallback right below already does. It is an imported (build-local)
target, cvc's export names only ImageMagick::MagickCore, and cvcConfig.cmake.in
rebuilds it for the consumer. The plain PRIVATE link remains only for the
last-ditch case where no MagickCore library was found.
libcvc builds nothing with vcpkg, but one bundle in its Windows closure is a
repackaged vcpkg build: cvcpkg's gmp 6.3.0+cvc.1 for windows (the current
gmp recipe, cvc.9, builds natively but was never republished for Windows).
It carries vcpkg's port helpers (share/vcpkg-cmake, share/vcpkg-cmake-get-vars,
share/vcpkg-make) and its SBOM files (share/gmp/vcpkg.spdx.json,
vcpkg_abi_info.txt). The old Windows staging copied only .lib/.dll/headers, so
these never shipped; bundling whole bundles put them in the Windows SDK.

sdk-bundle-deps.sh now removes them and then fails if any vcpkg-named file is
left in an SDK, so another vcpkg-built bundle cannot slip in unnoticed. The
real fix, a native Windows gmp built from cvcpkg's current recipe, is being
done in cvcpkg.

(-mindepth 1 keeps both finds off the SDK directory itself. Without it an SDK
root whose own name matched would be deleted, as a scratch test showed.)
The vcpkg strip in 3110461 covered gmp only, because the scan that found gmp
only read zip-format bundles. Windows mpfr 4.2.1+cvc.1 is a .tar.zst and is a
vcpkg build too: 116 vcpkg-named files and a 41-file debug/ tree. Both bundles
also install vcpkg's debug/ layout at the prefix root (debug/bin/*.dll,
debug/lib/*.lib, debug/lib/pkgconfig/*.pc), which the Windows SDK shipped:
libcvc-3.5.0-windows-x86_64-release-static.zip in dry run 38094266881 held
debug/bin/gmp-10.dll, mpfr-6.dll, etc. A Release SDK has no use for it, so
drop debug/ as well. A full scan of all 37 Windows bundles, reading both zip and
tar.zst, finds vcpkg traces in gmp and mpfr only. Native Windows builds of both
are being done in cvcpkg.
@transfix
transfix merged commit b6ffb63 into master Oct 11, 2026
31 checks passed
transfix added a commit that referenced this pull request Oct 12, 2026
…ption

MSVC builds of cvc compile with -openmp:llvm (voxels.cpp needs OpenMP 3.0), so
cvc.dll imported libomp140.x86_64.dll, which Microsoft does not allow
redistributing. #587 shipped the Windows SDK with that as a documented,
temporary exception. This removes it:

- cvc links LLVM's own libomp from cvcpkg's `openmp` bundle (Windows build in
  cy-pca/cvcpkg#146): lib/libomp-llvm.lib by full path, plus
  /NODEFAULTLIB:libomp.lib and libompd.lib, through a build-local imported
  target LLVMOpenMP::omp. cvc.dll then imports libomp.dll, which the SDK ships
  from that bundle. Without the bundle, cvc still builds, falls back to
  libomp140 and warns at configure time.
- A STATIC cvc exports $<LINK_ONLY:LLVMOpenMP::omp>; cvcConfig.cmake.in
  recreates it from the package's lib/libomp-llvm.lib, so static consumers bind
  LLVM's libomp too.
- The recipe adds `openmp` and `mingw-w64-runtime` as Windows runtime deps.
  The latter supplies libmcfgthread-2.dll, which cvcpkg's native Windows mpfr
  (cy-pca/cvcpkg#156) needs.
- sdk-check-closure.sh now fails any SDK whose cvc imports libomp140, instead
  of warning. sdk-smoke-test.sh's Windows run no longer adds Visual Studio's
  libomp140 to PATH: the SDK's bin/ and the Windows directories only. The
  release.yml header and the top-level CMakeLists.txt comment are updated.
transfix added a commit that referenced this pull request Oct 12, 2026
…ption (#607)

MSVC builds of cvc compile with -openmp:llvm (voxels.cpp needs OpenMP 3.0), so
cvc.dll imported libomp140.x86_64.dll, which Microsoft does not allow
redistributing. #587 shipped the Windows SDK with that as a documented,
temporary exception. This removes it:

- cvc links LLVM's own libomp from cvcpkg's `openmp` bundle (Windows build in
  cy-pca/cvcpkg#146): lib/libomp-llvm.lib by full path, plus
  /NODEFAULTLIB:libomp.lib and libompd.lib, through a build-local imported
  target LLVMOpenMP::omp. cvc.dll then imports libomp.dll, which the SDK ships
  from that bundle. Without the bundle, cvc still builds, falls back to
  libomp140 and warns at configure time.
- A STATIC cvc exports $<LINK_ONLY:LLVMOpenMP::omp>; cvcConfig.cmake.in
  recreates it from the package's lib/libomp-llvm.lib, so static consumers bind
  LLVM's libomp too.
- The recipe adds `openmp` and `mingw-w64-runtime` as Windows runtime deps.
  The latter supplies libmcfgthread-2.dll, which cvcpkg's native Windows mpfr
  (cy-pca/cvcpkg#156) needs.
- sdk-check-closure.sh now fails any SDK whose cvc imports libomp140, instead
  of warning. sdk-smoke-test.sh's Windows run no longer adds Visual Studio's
  libomp140 to PATH: the SDK's bin/ and the Windows directories only. The
  release.yml header and the top-level CMakeLists.txt comment are updated.
@transfix
transfix deleted the fix/release-sdk-self-contained branch October 29, 2026 20:54
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