Skip to content

Fix missing Arrow/Parquet DLLs in Windows MSVC builds and packaging - #8273

Closed
poshul with Copilot wants to merge 4 commits into
developfrom
copilot/extend-dll-copying-logic
Closed

poshul with Copilot wants to merge 4 commits into
developfrom
copilot/extend-dll-copying-logic

Conversation

Copilot AI commented Oct 9, 2025 •

Copy link
Copy Markdown
Contributor
  • Explore repository structure and understand current DLL copying logic
  • Identify relevant files: cmake/add_library_macros.cmake, cmake/package_general.cmake
  • Analyze how TARGET_RUNTIME_DLLS works with Arrow/Parquet dependencies
  • Add explicit DLL copying logic for Arrow/Parquet and transitive dependencies
  • Extend packaging logic to include Arrow DLL directory in dependency search
  • Fix packaging conflict: Remove copying to output folder to avoid duplicate DLL paths
    • Removed the section that copied DLLs to $<TARGET_FILE_DIR:OpenMS>
    • This was causing "Multiple conflicting paths found" errors during packaging
    • DLLs are now only copied to test and doc folders for build-time use
    • Packaging finds DLLs via RUNTIME_DEPENDENCY_SET with Arrow directory in DIRECTORIES

Summary of Final Solution

Build-Time (cmake/add_library_macros.cmake)

  • Copies Arrow/Parquet DLLs to test and doc folders only
  • Does NOT copy to output folder to avoid packaging conflicts

Packaging-Time (cmake/package_general.cmake)

  • Adds Arrow DLL directory to RUNTIME_DEP_DIRECTORIES
  • install(RUNTIME_DEPENDENCY_SET) finds DLLs in their original location
  • Avoids "Multiple conflicting paths found" errors
Original prompt

Recent builds fail during packaging or testing on Windows MSVC due to missing DLLs introduced by enabling Parquet (Apache Arrow/Parquet) support. The missing DLLs include abseil_dll.dll, aws-cpp-sdk-core.dll, aws-cpp-sdk-s3.dll, brotlidec.dll, brotlienc.dll, crc32c.dll, and related dependencies.

A previously merged PR (#8244) simplified DLL copying logic for test and docs on MSVC systems to solve a similar problem for other dependencies. However, the current logic does not ensure that all additional runtime DLLs needed by Arrow/Parquet (and their transitive dependencies) are copied alongside the OpenMS binaries.

Task:

  • Extend the DLL copying logic added in PR Simplify DLL copying logic for test and docs on MSVC systems #8244 to also copy all required Arrow/Parquet (and their transitive) DLLs (including abseil, aws, brotli, crc32c, etc.) into the appropriate binary and package directories during the build and packaging steps on MSVC.
  • Ensure that this happens for both tests and documentation builds, mirroring the approach used in Simplify DLL copying logic for test and docs on MSVC systems #8244 for other DLLs.
  • The solution should be robust to additional DLLs in future Arrow/Parquet versions (i.e., glob or list all relevant DLLs from the Arrow/Parquet and dependency packages, not just hardcode a fixed list).

References:

Include comments in the code referencing the related error and the previous PR for clarity.

This pull request was created as a result of the following prompt from Copilot chat.

Recent builds fail during packaging or testing on Windows MSVC due to missing DLLs introduced by enabling Parquet (Apache Arrow/Parquet) support. The missing DLLs include abseil_dll.dll, aws-cpp-sdk-core.dll, aws-cpp-sdk-s3.dll, brotlidec.dll, brotlienc.dll, crc32c.dll, and related dependencies.

A previously merged PR (#8244) simplified DLL copying logic for test and docs on MSVC systems to solve a similar problem for other dependencies. However, the current logic does not ensure that all additional runtime DLLs needed by Arrow/Parquet (and their transitive dependencies) are copied alongside the OpenMS binaries.

Task:

  • Extend the DLL copying logic added in PR Simplify DLL copying logic for test and docs on MSVC systems #8244 to also copy all required Arrow/Parquet (and their transitive) DLLs (including abseil, aws, brotli, crc32c, etc.) into the appropriate binary and package directories during the build and packaging steps on MSVC.
  • Ensure that this happens for both tests and documentation builds, mirroring the approach used in Simplify DLL copying logic for test and docs on MSVC systems #8244 for other DLLs.
  • The solution should be robust to additional DLLs in future Arrow/Parquet versions (i.e., glob or list all relevant DLLs from the Arrow/Parquet and dependency packages, not just hardcode a fixed list).

References:

Include comments in the code referencing the related error and the previous PR for clarity.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@coderabbitai

coderabbitai Bot commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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

Copilot AI and others added 2 commits October 9, 2025 12:11
- Extend DLL copying logic to handle Arrow/Parquet and transitive dependencies
- Add support for abseil, aws-cpp-sdk, brotli, crc32c, and other Arrow deps
- Use glob patterns to be robust to future version changes
- Mirror approach from PR #8244 for other dependencies
- Copy DLLs to output, test, and doc directories when WITH_PARQUET is enabled

Co-authored-by: poshul <[email protected]>
… search

- Add Arrow DLL directory to RUNTIME_DEPENDENCY_SET search paths for Windows
- Ensures CMake can find and package all Arrow/Parquet transitive dependencies
- Complements the build-time DLL copying in add_library_macros.cmake

Co-authored-by: poshul <[email protected]>
Copilot AI changed the title [WIP] Extend DLL copying logic for Arrow/Parquet support Fix missing Arrow/Parquet DLLs in Windows MSVC builds and packaging Oct 9, 2025
Copilot AI requested a review from poshul October 9, 2025 12:15
@jpfeuffer

Copy link
Copy Markdown
Contributor

I think this should be fixed upstream in vcpkg if their CMake is broken again.

@jpfeuffer

Copy link
Copy Markdown
Contributor

OR: since we are using vcpkg, just disable non-required features, and require static linking on Windows.

@jpfeuffer

Copy link
Copy Markdown
Contributor

I would be interested how messed up their CMake config is again.. If someone can upload it.

@jpfeuffer

Copy link
Copy Markdown
Contributor

Wait, who says that DLLs are not copied?
This?
https://github.com/OpenMS/OpenMS/actions/runs/18331840365/job/52208081554#step:21:49534

NSIS never complains about missing DLLs. It copies DLLs via a wildcard. It must be missing something that it is specifically expecting.

@poshul

poshul commented Oct 9, 2025

Copy link
Copy Markdown
Collaborator

Wait, who says that DLLs are not copied? This? https://github.com/OpenMS/OpenMS/actions/runs/18331840365/job/52208081554#step:21:49534

NSIS never complains about missing DLLs. It copies DLLs via a wildcard. It must be missing something that it is specifically expecting.
Here in CDASH:
https://cdash.seqan.de/viewBuildError.php?buildid=451871

@jpfeuffer

jpfeuffer commented Oct 9, 2025 •

Copy link
Copy Markdown
Contributor

Ok! That means that the CMake config is probably correct but CMake is not finding those files. install Runtime Dependencies usually looks in the same path of the target, system32 and everything we specify in DIRECTORIES. I assume something is missing for DIRECTORIES (e.g. all the CMAKE_PREFIX_PATH entries concatenated with their bin folders)

Here:

DIRECTORIES $<TARGET_FILE_DIR:OpenMS>)

@jpfeuffer

Copy link
Copy Markdown
Contributor

Yeah, actually, if we make sure the files are also always copied next to the OpenMS.dll it should be fine.

@jpfeuffer

Copy link
Copy Markdown
Contributor

But if the code in/around #8244 does not copy everything, it might really mean that CMake config is messed up. Impossible to see without a Windows PC.

@poshul

poshul commented Oct 9, 2025

Copy link
Copy Markdown
Collaborator

@copilot Closer, but now this fails with:

  file Multiple conflicting paths found for abseil_dll.dll:

    C:/Miniconda/envs/openms-parquet/Library/bin/abseil_dll.dll
    /.../OpenMS/bld/bin/abseil_dll.dll


CPack Error: Error when generating package: OpenMS
ninja: build stopped: subcommand failed.

Remove copying of Arrow/Parquet DLLs to OpenMS output directory. This was causing
"Multiple conflicting paths found" errors during packaging because CMake's
install(RUNTIME_DEPENDENCY_SET) would find the same DLLs in both the original
location and the copied location.

DLLs are still copied to test and doc folders for build-time executables.
For packaging, install(RUNTIME_DEPENDENCY_SET) now finds them in their original
location via the DIRECTORIES parameter in package_general.cmake.

Co-authored-by: poshul <[email protected]>

Copilot AI commented Oct 9, 2025

Copy link
Copy Markdown
Contributor Author

@copilot Closer, but now this fails with:

  file Multiple conflicting paths found for abseil_dll.dll:

...

Fixed in commit df0ddc1 (amended). The issue was that copying DLLs to the output folder caused CMake's install(RUNTIME_DEPENDENCY_SET) to find the same DLLs in both the original location and the copied location during packaging.

The solution: Only copy DLLs to test and doc folders for build-time use. For packaging, install(RUNTIME_DEPENDENCY_SET) finds them in their original location via the DIRECTORIES parameter we added in package_general.cmake.

@poshul

poshul commented Oct 10, 2025

Copy link
Copy Markdown
Collaborator

This looks like it's currently choking on long paths.

@jpfeuffer

Copy link
Copy Markdown
Contributor

nonono, this will be a nightmare to maintain. Either the automatic resolution works or we build it statically.

@jpfeuffer

Copy link
Copy Markdown
Contributor

Please someone just test this on windows.

@jpfeuffer jpfeuffer mentioned this pull request Oct 11, 2025
@poshul poshul closed this Dec 18, 2025
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.

3 participants