Skip to content

Window Installer Qt6 fix - #7996

Merged
jpfeuffer merged 5 commits into
OpenMS:developfrom
cbielow:installer_dll_fix
Apr 28, 2025
Merged

jpfeuffer merged 5 commits into
OpenMS:developfrom
cbielow:installer_dll_fix

Conversation

@cbielow

@cbielow cbielow commented Apr 24, 2025 •

Copy link
Copy Markdown
Contributor

Description

according to https://github.com/jurplel/install-qt-action?tab=readme-ov-file#arch
the current Qt6 we use ('6.7.2') is build using win64_msvc2015_64, which is probably why we see our GUI tools not starting up when installed using the OpenMS Windows Installer.
This is a jab at using identical compilers for Qt6 and OpenMS.
Nicely complements #7995.

Checklist

  • Make sure that you are listed in the AUTHORS file
  • Add relevant changes and new features to the CHANGELOG file
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes
  • Updated or added python bindings for changed or new classes (Tick if no updates were necessary.)

How can I get additional information on failed tests during CI

Click to expand If your PR is failing you can check out

Advanced commands (admins / reviewer only)

Click to expand
  • /reformat (experimental) applies the clang-format style changes as additional commit. Note: your branch must have a different name (e.g., yourrepo:feature/XYZ) than the receiving branch (e.g., OpenMS:develop). Otherwise, reformat fails to push.
  • setting the label "NoJenkins" will skip tests for this PR on jenkins (saves resources e.g., on edits that do not affect tests)
  • commenting with rebuild jenkins will retrigger Jenkins-based CI builds

⚠️ Note: Once you opened a PR try to minimize the number of pushes to it as every push will trigger CI (automated builds and test) and is rather heavy on our infrastructure (e.g., if several pushes per day are performed).

Summary by CodeRabbit

  • Chores
    • Updated Windows build environment to use a fixed MSVC toolset version and clarified toolset version ranges.
    • Upgraded Qt version for Windows builds and specified the architecture to ensure compatibility with the MSVC 2022 compiler.

@coderabbitai

coderabbitai Bot commented Apr 24, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

The Windows build workflow configuration was updated to explicitly set the MSVC toolset version to 14.36 and to clarify the mapping between Visual Studio versions and toolset numbers through comments. The workflow also now installs Qt version 6.8.3 instead of 6.7.2 and specifies the architecture as win64_msvc2022_64, aligning the Qt installation with the MSVC 2022 compiler toolset used in the matrix. Additionally, a trailing whitespace line was removed from the CMake package general script without affecting functionality.

Changes

File(s) Change Summary
.github/workflows/openms_ci_matrix_full.yml Set MSVC toolset to 14.36, added explanatory comments, updated Qt version to 6.8.3, specified architecture as win64_msvc2022_64.
cmake/package_general.cmake Removed trailing whitespace line after setting POST_EXCLUDE variable for Windows; no functional change.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub Actions
    participant Windows Runner
    participant Qt Installer

    GitHub Actions->>Windows Runner: Start workflow with MSVC toolset 14.36
    Windows Runner->>Windows Runner: Configure environment for MSVC 2022
    Windows Runner->>Qt Installer: Install Qt 6.8.3 (win64_msvc2022_64)
    Qt Installer-->>Windows Runner: Qt 6.8.3 installed
    Windows Runner->>Windows Runner: Build project with specified toolset and Qt version
Loading

Possibly related PRs

Suggested labels

Review effort 1/5

Suggested reviewers

  • pjones
  • timosachsenberg

Poem

A hop and a skip, the toolset aligns,
Qt 6.8.3 now brightly shines.
Windows builds with clarity anew,
Comments guide what’s old and what’s true.
With every commit, we leap ahead—
The carrot of progress, always fed! 🥕


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 13aa5d0 and 0c65221.

📒 Files selected for processing (2)
  • .github/workflows/openms_ci_matrix_full.yml (2 hunks)
  • cmake/package_general.cmake (0 hunks)
💤 Files with no reviewable changes (1)
  • cmake/package_general.cmake
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/openms_ci_matrix_full.yml

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@cbielow cbielow changed the title Installer dll fix Window Installer Qt6 fix Apr 24, 2025
@timosachsenberg
timosachsenberg requested a review from pjones April 24, 2025 15:12
@timosachsenberg

Copy link
Copy Markdown
Contributor

looks good to me

@pjones

pjones commented Apr 25, 2025

Copy link
Copy Markdown
Contributor

I'll have GitHub build and installer from this branch and try it out in my Windows 10 VM.

@jpfeuffer

jpfeuffer commented Apr 25, 2025 •

Copy link
Copy Markdown
Contributor

Note that setting a compiler version in our matrix has currently no effect except for visualization in CDash (but maybe that was your goal). But I know that you can choose a toolset version on GHA if you want to implement that.

Also note that you might want to set the contrib_compiler_version which is currently on 14.2 if you really want to download a contrib that wasbuilt with the same compiler (not sure if necessary here). And it is also very likely that the contrib build is just mislabeled since the contrib GHA has not been updated in a long while and I doubt the msvc version is extracted from somewhere automatically.

@pjones

pjones commented Apr 25, 2025

Copy link
Copy Markdown
Contributor

@jpfeuffer Speaking of contrib, is there any reason why we don't build and cache contrib from within the OpenMS action?

I was doing that on a branch and I had no problems with it. I also liked that it ensured contrib was built with the same compiler as OpenMS and used the version of contrib from the git submodule instead of what ever happens to be the latest release.

@jpfeuffer

Copy link
Copy Markdown
Contributor

I think mostly time and cache size limits. Although we are caching the download, too, right?
Too much caches are not good because then our compiler caches get evicted earlier (due to GitHub limits) and things take longer again.
It's a trade-off in the end.

@pjones

pjones commented Apr 28, 2025

Copy link
Copy Markdown
Contributor

@cbielow I was finally able to build an installer from your branch. The installer still included DWrite.dll and others. After I removed them this is the error message I received when starting TOPPView:

C:\Users\Peter\AppData\Local\OpenMS-3.4.0-pre-pjones-cbielow-installer-dll-fix-2025-04-25\bin>TOPPView.exe
qt.core.plugin.factoryloader: checking directory path "C:/Users/Peter/AppData/Local/OpenMS-3.4.0-pre-pjones-cbielow-installer-dll-fix-2025-04-25/bin/plugins/platforms" ...
qt.core.plugin.factoryloader: looking at "qwindows.dll"
qt.core.plugin.loader: Found metadata in lib C:/Users/Peter/AppData/Local/OpenMS-3.4.0-pre-pjones-cbielow-installer-dll-fix-2025-04-25/bin/plugins/platforms/qwindows.dll, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "windows"
        ]
    },
    "archlevel": 0,
    "className": "QWindowsIntegrationPlugin",
    "debug": false,
    "version": 395264
}


qt.core.plugin.factoryloader: Got keys from plugin meta data QList("windows")
qt.core.plugin.factoryloader: checking directory path "C:/Users/Peter/AppData/Local/OpenMS-3.4.0-pre-pjones-cbielow-installer-dll-fix-2025-04-25/bin/platforms" ...
qt.core.library: "C:/Users/Peter/AppData/Local/OpenMS-3.4.0-pre-pjones-cbielow-installer-dll-fix-2025-04-25/bin/plugins/platforms/qwindows.dll" cannot load: Cannot load library C:\Users\Peter\AppData\Local\OpenMS-3.4.0-pre-pjones-cbielow-installer-dll-fix-2025-04-25\bin\plugins\platforms\qwindows.dll: The specified procedure could not be found.
qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "C:/Users/Peter/AppData/Local/OpenMS-3.4.0-pre-pjones-cbielow-installer-dll-fix-2025-04-25/bin/plugins/platforms/qwindows.dll" : "Cannot load library C:\\Users\\Peter\\AppData\\Local\\OpenMS-3.4.0-pre-pjones-cbielow-installer-dll-fix-2025-04-25\\bin\\plugins\\platforms\\qwindows.dll: The specified procedure could not be found."
qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: windows.

This is with QT_DEBUG_PLUGINS=1 set. Do you want me to try anything else?

@cbielow

cbielow commented Apr 28, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for testing this @pjones .
A bit disappointing that it did not work.
What I find most surprising is that Dll's are still included. The GHA machines must be something very special...

I'm sure there are other projects doing GHA with Qt6. How are they doing it? Can't think of anything else.

We could also merge this PR and then look at the nightly installers, just to make sure nothing got lost, since the PR's a bit messy at this point.

@jpfeuffer

Copy link
Copy Markdown
Contributor

Can't we just trigger the Action from this branch and tick "Create package"? Then test the artifacts.

@jpfeuffer

Copy link
Copy Markdown
Contributor

Ah your branch needs to be under the OpenMS fork though.

@jpfeuffer

Copy link
Copy Markdown
Contributor

Let's merge and try on dev.

@jpfeuffer

jpfeuffer commented Apr 28, 2025 •

Copy link
Copy Markdown
Contributor

Upping Qt6 and specifying the same msvc version as in contrib is definitely the right direction.
See https://github.com/jurplel/install-qt-action?tab=readme-ov-file#arch

@jpfeuffer
jpfeuffer merged commit fe2f2c3 into OpenMS:develop Apr 28, 2025
@jpfeuffer

Copy link
Copy Markdown
Contributor

@jpfeuffer

Copy link
Copy Markdown
Contributor

It finished and the dlls are not in the installer. Everything seems fine. I have no windows to install it however.

@cbielow

cbielow commented Apr 29, 2025

Copy link
Copy Markdown
Contributor Author

Tested an artifact from this morning (https://github.com/OpenMS/OpenMS/actions/runs/14722214620/job/41317969899) on a Win10 VM:

image

Works out of the box.
Nice side effect of our changes: the installer is a lot smaller (175 MB vs. previously 230 MB)

@pjones

pjones commented Apr 29, 2025

Copy link
Copy Markdown
Contributor

I can confirm that it's working on my Windows 10 VM as well.

Thank you so much @cbielow!

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.

4 participants