Skip to content

fix: exclude MSVC runtime DLLs from dependency resolution (CMake 4.x) - #8880

Merged
timosachsenberg merged 1 commit into
developfrom
fix/windows-packaging-vcruntime-conflict
Mar 11, 2026
Merged

timosachsenberg merged 1 commit into
developfrom
fix/windows-packaging-vcruntime-conflict

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Mar 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Fix nightly Windows CI Package step failure caused by CMake 4.2.3 (installed via chocolatey on windows-2025 runners) treating conflicting runtime dependency paths as fatal errors
  • VCRUNTIME140.dll is found in both C:/Miniconda/envs/ci/Library/bin/ and contrib/bin/, causing install(RUNTIME_DEPENDENCY_SET ...) to fail with "Multiple conflicting paths"
  • Added MSVC runtime DLLs (vcruntime, msvcp, concrt, vccorlib, ucrtbase) to PRE_EXCLUDE_REGEXES in package_general.cmake — these are already installed separately by InstallRequiredSystemLibraries in package_nsis.cmake

Details

The error in CI:

CMake Error at cmake_install.cmake:77 (file):
  file Multiple conflicting paths found for VCRUNTIME140.dll:
    C:/Miniconda/envs/ci/Library/bin/vcruntime140.dll
    D:/a/OpenMS/OpenMS/OpenMS/contrib/bin/vcruntime140.dll

This started on Mar 10 when the windows-2025 runner image updated CMake from 3.x to 4.2.3. CMake 4.x changed file(GET_RUNTIME_DEPENDENCIES) to report conflicts as fatal errors instead of silently picking the first match.

The existing TODO comment on the old code even mentioned vcruntime issues:

TODO I have found that sometimes vcruntime140_1.dll cannot be resolved (but vcruntime140.dll is found). Maybe add it here too?

Test plan

  • Verify Windows nightly CI Package step passes with this change
  • Verify the NSIS installer still contains the MSVC runtime DLLs (they come from InstallRequiredSystemLibraries, not from RUNTIME_DEPENDENCY_SET)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated Windows package build configuration to properly exclude MSVC runtime DLLs from the packaged application, ensuring cleaner and more efficient deployment artifacts.

…ake 4.x compat)

CMake 4.2.3 (installed via chocolatey on windows-2025 runners) now treats
conflicting runtime dependency paths as fatal errors. The packaging step
fails because VCRUNTIME140.dll is found in both the Conda environment
(C:/Miniconda/envs/ci/Library/bin/) and the contrib directory.

These DLLs are already installed separately by InstallRequiredSystemLibraries
in package_nsis.cmake, so excluding them from the runtime dependency set
resolution is both safe and correct.

Fixes nightly Windows CI Package step failure since 2026-03-10.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@coderabbitai

coderabbitai Bot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0f5b2620-16f7-4112-8a0d-6840bb45b3ff

📥 Commits

Reviewing files that changed from the base of the PR and between cf6631d and 2fa0b24.

📒 Files selected for processing (1)
  • cmake/package_general.cmake

📝 Walkthrough

Walkthrough

The PRE_EXCLUDE list in cmake/package_general.cmake is extended on Windows to explicitly exclude MSVC runtime DLLs (vcruntime, msvcp, concrt, vccorlib, ucrtbase) with explanatory comments, refining how runtime dependencies are collected during packaging.

Changes

Cohort / File(s) Summary
Windows MSVC Runtime DLL Exclusion
cmake/package_general.cmake
Extended PRE_EXCLUDE to explicitly exclude five MSVC runtime DLLs with clarifying comments, improving Windows packaging dependency collection.

Possibly related PRs

Suggested reviewers

  • jpfeuffer
  • pjones

Poem

🐰 A rabbit twirls through CMake so fine,
Adding MSVC DLLs to the exclude line,
vcruntime and friends now neatly dismissed,
Windows packages cleaned with a flick of the wrist,
Cleaner builds hopping along, I insist! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly summarizes the main change: excluding MSVC runtime DLLs from dependency resolution in CMake, which matches the core objective of fixing the Windows packaging conflict.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/windows-packaging-vcruntime-conflict

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@timosachsenberg
timosachsenberg merged commit 8b864c8 into develop Mar 11, 2026
13 of 14 checks passed
@timosachsenberg
timosachsenberg deleted the fix/windows-packaging-vcruntime-conflict branch March 11, 2026 07:40
github-actions Bot pushed a commit that referenced this pull request Mar 17, 2026
Add missing changelog entries for changes merged in the past 7 days:

- PyOpenMS: PeptideAndProteinQuant.getPeptideResults/getProteinResults exposed (#8543)
- PyOpenMS BREAKING: zero-copy _mv methods renamed to _view (#8857)
- TOPP BREAKING: FeatureFinderMultiplex/MultiplexResolver parameter missed_cleavages renamed to max_nr_labelled_aas (#8911)
- TOPP: MaRaClusterAdapter annotates consensus spectra with native IDs and cluster metadata (#8864)
- TOPP: MetaboliteAdductDecharger adds multimer detection (#8888)
- OpenMS Library BREAKING: ChromatogramPeak::IntensityType changed double -> float (#8857)
- Build: CMake 4.x compat fix for Windows packaging (#8880)
- Build: Fix pyOpenMS dev build RPATH (#8892)
- Build: Correctly locate locally installed nanobind (#8874)

Co-authored-by: Copilot <[email protected]>
timosachsenberg pushed a commit that referenced this pull request Mar 17, 2026
Add missing changelog entries for changes merged in the past 7 days:

- PyOpenMS: PeptideAndProteinQuant.getPeptideResults/getProteinResults exposed (#8543)
- PyOpenMS BREAKING: zero-copy _mv methods renamed to _view (#8857)
- TOPP BREAKING: FeatureFinderMultiplex/MultiplexResolver parameter missed_cleavages renamed to max_nr_labelled_aas (#8911)
- TOPP: MaRaClusterAdapter annotates consensus spectra with native IDs and cluster metadata (#8864)
- TOPP: MetaboliteAdductDecharger adds multimer detection (#8888)
- OpenMS Library BREAKING: ChromatogramPeak::IntensityType changed double -> float (#8857)
- Build: CMake 4.x compat fix for Windows packaging (#8880)
- Build: Fix pyOpenMS dev build RPATH (#8892)
- Build: Correctly locate locally installed nanobind (#8874)

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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.

2 participants