-
Notifications
You must be signed in to change notification settings - Fork 187
build: Depends qt6 and cmake compatibility #2826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: Depends qt6 and cmake compatibility #2826
Conversation
55bba96 to
aa5d8ba
Compare
587dc29 to
84e507b
Compare
|
Thanks! I have also made an attempt to make the depends system work with cmake (#2812 (comment)) but never finished it. Some results can be seen here: https://github.com/CyberTailor/Gridcoin-Research/tree/my-depends-cmake
This seems to be easy: When I have free time, I'll look at this. |
|
I have got Windows building correctly now and also checked native cmake compile for regression and it works. Going to work on Linux depends next. You and Div72 can handle the NSIS part and also the realignment of CI. |
8524cf1 to
c0bbf03
Compare
|
As of e31f7bb I have all three major targets working correctly with cmake. Linux native build with cmake. Also, here are the Gridcoin startup timings to show that the SSE/SHANI detection is working properly. Note the CMAKE_BUILD_TYPE flags must be used to get autotools default like performance, because cmake by default uses NO optimization, whereas autotools uses -02. |
a4c1737 to
22b7cfa
Compare
Updates dependency installation logic to support optional GUI builds
and better handle Qt versioning.
Changes to install_dependencies.sh:
- Added `WITH_GUI` parameter to `install_deps` function.
- Conditional Qt Installation:
- Only installs Qt packages if `WITH_GUI="true"`.
- Supports `USE_QT6="false"` on macOS by installing `qt@5`.
- Skips Qt installation on Linux if `USE_QT6="false"`, printing a warning
that Qt5 dependencies must be managed manually (due to EOL status on
many distros).
- Ensures `PKGS_BASE` (build-essential, cmake, etc.) is always installed.
- Minor tweaks to other files to adjust.
afc5be3 to
8a5a3e3
Compare
- Replace legacy build instructions with the modern CMake workflow. - Add specific `pkg_add` dependency lists for both Headless and GUI builds. - specific instructions for enabling Qt6 and XFCE integration. - Include necessary system configuration steps (doas/sudo, wheel group, and messagebus).
Changes summary: 1. Add WINDRES 2. Make sure OBJCOPY and OBJDUMP are set 3. Make sure DEPENDS_COMPILE_DEFINITIONS are actually used 4. Add library search path to default LDFLAGS 5. Always restrict pkg-config search path to depends 6. Remove irrelevant conditions
|
Yes. Without it many icons will not appear in the depends builds.Sent from my iPhoneOn Dec 6, 2025, at 5:00 AM, Anna ***@***.***> wrote:
@CyberTailor commented on this pull request.
In CMakeLists.txt:
@@ -123,7 +135,7 @@ option(BUNDLED_QT5 "Use the bundled version of Qt 5" ${HUNTER_ENABLED})
set(QT5_MINIMUM_VERSION 5.9.5)
set(QT6_MINIMUM_VERSION 6.2.0)
-set(QT_COMPONENTS Core Concurrent Gui LinguistTools Network Widgets)
+set(QT_COMPONENTS Core Concurrent Gui LinguistTools Network Widgets Svg)
Is QtSvg a runtime dependency of Gridcoin?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
|
I want to make a point to the reviewers. Many of the tweaks over the past week have been due to testing in different scenarios to ensure that the builds work across a wide variety of conditions. This is not limited to the CI checks, which themselves have posed a challenge. This includes testing on bare iron development machines with many libraries installed (good hermeticity checks), and VM's of various operating systems. The CI checks themselves have posed challenges in terms of the correct dependencies. Additional complexity was generated by ensuring that the CI works in both act and Github actions, because the base runner images in Github are slightly different than the base containers used in act. |
|
If I want to add my commits to this PR, should I sumbit each PR to the source branch individually or simply push new commits on top of a single PR? |
|
I have only a little bit more work to do on this unless you see something glaring. I am trying to get Ubuntu 22.04 to do the depends build for Windows (this is not for CI, since we use 24.04 in the runners). 22.04 has mingw 8, which has an incomplete set of headers for DirectX 12, and so is proving to be a big challenge with the Qt compile. I also am pushing today updated documentation for OpenBSD and FreeBSD since I got both working using the native compile. I am not going to do any more rebases or force pushes. The commits so far are the commits. Therefore you are good to base your work on the source branch for this PR. I hope you agree this gives a good boost for us. I am sure you can see improvements to be made though. |
|
I don't think you have push permission to my branch on my fork, so you would have to do a PR to my fork at the moment. We could also merge this and then you could do a fresh branch off of development. Quite frankly this should be merged, as it is much better than what we have currently and we need it for the next testnet builds to lead up to the Natasha release. |
…epts -n parameter
Also add wine package to ensure tests run correctly.
This commit fixes a logic error in the package download fallback mechanism within funcs.mk. Previously, fallback attempts (e.g., to S3 or bitcoind-depends-sources) requested the upstream filename/URL `$(3)`. This works when the upstream name matches the local name, but fails for packages that rely on query strings or renaming (e.g., `CMakeLists.txt?h=6.7.3`). Mirrors are populated with the sanitized, locally-stored filenames `$(4)`. This change forces fallback attempts to request `$(4)` instead of `$(3)`, ensuring the request matches the storage convention on the mirrors and preventing 403/404 errors during primary download failures.
Use CPack to generate NSIS installer
aff1683 to
e134a81
Compare
This adds an OS_REF environment variable in the cmake_production.yml file and then uses that at the front of the depends cache key. This is to ensure that prior cached depends using a differnt runner OS are invalidated rather than inappropriately reused.
…s builds This is the final cleanup for the Ubuntu 22.04 issue.
This updates build.md to make sure the path is specified for the Windows installer command, and provides an Ubuntu 22.04 workaround procedure for building the win64 in Ubuntu 22.04.
This PR updates critical components of the depends environment to Bitcoin Core 30.0, including the updating of depends Qt to Qt6 (currently at 6.7.3, the same as Bitcoin Core). Note that it also makes the necessary changes to the depends system to emit toolchain.cmake, and overhauls the cmake build system to be completely ready for the pending removal of the autotools build system. Currently Qt5 is still supported in a local build (for local use or packaging) via cmake on Linux, but this will be removed in the future once Qt5 is sunsetted.
Key Changes:
align closer with the current depends in Bitcoin Core v30.0.
Linux Native, Linux Static (depends), Windows Cross-Compile, and macOS Native
targets with a single consistent workflow.
by conditionally applying dynamic/static linkage macros based on
the target. Tests now build and pass on all platforms.
src/test/CMakeLists.txtand dependenciesto correctly handle transitive dependencies for static builds.
boost.mkto ensure the Unit Test Frameworklibrary is compiled and installed correctly.
CI/CD & Build System Updates (Summary)
As part of the CMake migration, the CI pipelines have been overhauled to be hermetic, reproducible, and developer-friendly.
1. Clear separation of purpose with CI configuration files
2. Hermetic Windows Cross-Compilation
moc,rcc), causing failures when the runner environment didn't match thedependssystem exactly.QT_HOST_PATHandQT_HOST_PATH_CMAKE_DIRin the CMake configuration.depends/<host>/native, completely ignoring the host OS environment. This guarantees consistency between CI and local builds.3. Local Execution Support (
act)act) spawned ~72 concurrent compilation threads, causing swap exhaustion and UI freezes on developer workstations.Setup Concurrencystep to all workflows.CMAKE_BUILD_PARALLEL_LEVELif injected externally.run-local-ci.shwrapper that auto-scales threads (e.g.,nproc / # of jobs) when running multiple jobs in parallel.4. Test Stability (Wine/Windows)
WINEARCH=win64and installedwine64packages to fix "Bad EXE format" errors.QT_QPA_PLATFORM=offscreento prevent crashes when tests attempt to create GUI windows on headless runners.winebootto prevent timeouts during test execution.5. Packaging Fixes
src/qt/CMakeLists.txtto use absolute paths (${CMAKE_CURRENT_SOURCE_DIR}) for icons and desktop files. This resolves CPack errors on macOS and Linux where relative paths were resolving incorrectly during theinstallphase.5. Continuous Deployment
deployjob that triggers only on version tags (v*). It aggregates artifacts from Linux/Windows/macOS builds and publishes a Draft Release with checksums.Documentation:
doc/build.mdas the canonical build guide.explaining build types (RelWithDebInfo vs Release) and flags.
doc/build-windows.mdto feature WSL cross-compilation.doc/build-msys2.mdanddoc/build-unix.md.The removal of autotools style build capability will be in in a separate PR.
@CyberTailor @div72 if you want to help out on this, please put up PR's against my source branch for this PR on my repo clone, and when I accept them they will flow to this one. In particular @div72, we need to adjust CI to add the windows builds to the cmake CI side and remove the depends builds from the non-cmake CI side.Update: I have now done the core of the CI revisions. Please see the comments on the three new files below.
The complete removal of the non-cmake CI jobs should be reserved for the separate PR for the retirement of the autotools build for Gridcoin.The old CI files have been deactivated and new CD has been integrated into CI.
Also, we need to get the Windows installer packaging working.Integration of the existing share/setup.nsis.in script has been done with a custom cmake target "deploy".