mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-31 18:51:14 +02:00
Merge bitcoin/bitcoin#30997: build: Switch to Qt 6
f00345727b
doc: Update `dependencies.md` for Qt 6 (Hennadii Stepanov)80b917991e
build, msvc: Update `vcpkg.json` for Qt 6 (Hennadii Stepanov)30dd1f1644
ci: Update for Qt 6 (Hennadii Stepanov)629d292f4d
test: Update sanitizer suppressions for Qt 6 (Hennadii Stepanov)551e13abf8
guix: Adjust for Qt 6 (Hennadii Stepanov)c3e9bd086c
qt: Fix compiling for Windows (Hennadii Stepanov)ab399c4db2
depends: Add `native_qt` package (Hennadii Stepanov)248613eb3e
depends: Factor out Qt modules' details (Hennadii Stepanov)0268f52a4c
depends: Introduce customizable `$(package)_patches_path` variables (Hennadii Stepanov)5e794e6202
depends: Bump `qt` package up to 6.7.3 (Hennadii Stepanov)6d4214925f
cmake: Require Qt 6 to build GUI (Hennadii Stepanov) Pull request description: The currently used Qt 5.15 is approaching [EOL](https://www.qt.io/blog/qt-5.15-extended-support-for-subscription-license-holders) and will reach it before the Bitcoin Core v30 release. The recent migration of the build system to CMake makes it possible to switch to Qt 6. This PR updates the OS runtime compatibility requirements for the Bitcoin Core GUI as follows: ### 1. Linux Starting with Qt 6.5.0, the `libxcb-cursor0` package is required to be installed at runtime. ### 2. Windows Cross-compiling does not support LTO. We have to re-add it in a follow-up. A new style plugin causes minor visual glitches, such as  which will be fixed in follow-ups. ### 3. macOS `bitcoin-qt` now uses the [Metal](https://developer.apple.com/metal/) backend. --- **IMPORTANT.** Don't forget to install [Ninja](https://ninja-build.org/). --- For historical context, please refer to: - https://github.com/bitcoin/bitcoin/issues/20627 - https://github.com/bitcoin/bitcoin/pull/24798 --- UPD 2024-10-09. Qt 6.8 has been [released](https://www.qt.io/blog/qt-6.8-released), but it has some [drawbacks](https://github.com/bitcoin/bitcoin/pull/30997#issuecomment-2402990346) for us. As a result, this PR will stick to Qt 6.7. UPD 2025-03-18: [Standard support for Qt 5.15 will end after 26th of May 2025](https://www.qt.io/blog/extended-security-maintenance-for-qt-5.15-begins-may-2025) ACKs for top commit: laanwj: re-ACKf00345727b
hodlinator: re-ACKf00345727b
Tree-SHA512: 367f722e6c3ea4700b5395871c40b6df8c8062fdc822107090449ea4ae4ad2db75cc53a982a678f4c48ce8f9b2d43ed10e6d23b06165ab78713f161db712d895
This commit is contained in:
@@ -62,13 +62,13 @@ sh/bash: export BDB_PREFIX=[path displayed above]
|
||||
```
|
||||
|
||||
#### GUI Dependencies
|
||||
###### Qt5
|
||||
###### Qt6
|
||||
|
||||
Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compile the GUI, we need to install
|
||||
the necessary parts of Qt, the libqrencode and pass `-DBUILD_GUI=ON`. Skip if you don't intend to use the GUI.
|
||||
|
||||
```bash
|
||||
pkg install qt5-buildtools qt5-core qt5-gui qt5-linguisttools qt5-testlib qt5-widgets
|
||||
pkg install qt6-buildtools qt6-core qt6-gui qt6-linguisttools qt6-testlib qt6-widgets
|
||||
```
|
||||
|
||||
###### libqrencode
|
||||
|
@@ -64,13 +64,13 @@ pkgin install db4
|
||||
```
|
||||
|
||||
#### GUI Dependencies
|
||||
###### Qt5
|
||||
###### Qt6
|
||||
|
||||
Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compile the GUI, we need to install
|
||||
the necessary parts of Qt, the libqrencode and pass `-DBUILD_GUI=ON`. Skip if you don't intend to use the GUI.
|
||||
|
||||
```bash
|
||||
pkgin install qt5-qtbase qt5-qttools
|
||||
pkgin install qt6-qtbase qt6-qttools
|
||||
```
|
||||
|
||||
###### libqrencode
|
||||
|
@@ -56,13 +56,13 @@ export BDB_PREFIX="[path displayed above]"
|
||||
```
|
||||
|
||||
#### GUI Dependencies
|
||||
###### Qt5
|
||||
###### Qt6
|
||||
|
||||
Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compile the GUI, we need to install
|
||||
the necessary parts of Qt, the libqrencode and pass `-DBUILD_GUI=ON`. Skip if you don't intend to use the GUI.
|
||||
|
||||
```bash
|
||||
pkg_add qtbase qttools
|
||||
pkg_add qt6-qtbase qt6-qttools
|
||||
```
|
||||
|
||||
###### libqrencode
|
||||
@@ -100,7 +100,7 @@ pkg_add python py3-zmq # Select the newest version of the python package if nec
|
||||
There are many ways to configure Bitcoin Core, here are a few common examples:
|
||||
|
||||
##### Descriptor Wallet and GUI:
|
||||
This enables descriptor wallet support and the GUI, assuming SQLite and Qt 5 are installed.
|
||||
This enables descriptor wallet support and the GUI, assuming SQLite and Qt 6 are installed.
|
||||
|
||||
```bash
|
||||
cmake -B build -DBUILD_GUI=ON
|
||||
|
@@ -92,11 +92,9 @@ Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compi
|
||||
Qt, libqrencode and pass `-DBUILD_GUI=ON`. Skip if you don't intend to use the GUI.
|
||||
|
||||
``` bash
|
||||
brew install qt@5
|
||||
brew install qt@6
|
||||
```
|
||||
|
||||
Note: Building may fail if Qt 6 is installed (`qt` or `qt@6`)
|
||||
|
||||
Note: Building with Qt binaries downloaded from the Qt website is not officially supported.
|
||||
See the notes in [#7714](https://github.com/bitcoin/bitcoin/issues/7714).
|
||||
|
||||
|
@@ -73,11 +73,13 @@ GUI dependencies:
|
||||
Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compile the GUI, we need to install
|
||||
the necessary parts of Qt, the libqrencode and pass `-DBUILD_GUI=ON`. Skip if you don't intend to use the GUI.
|
||||
|
||||
sudo apt-get install qtbase5-dev qttools5-dev qttools5-dev-tools
|
||||
sudo apt-get install qt6-base-dev qt6-tools-dev qt6-l10n-tools
|
||||
|
||||
For Qt 6.5 and later, the `libxcb-cursor0` package must be installed at runtime.
|
||||
|
||||
Additionally, to support Wayland protocol for modern desktop environments:
|
||||
|
||||
sudo apt install qtwayland5
|
||||
sudo apt install qt6-wayland
|
||||
|
||||
The GUI will be able to encode addresses in QR codes unless this feature is explicitly disabled. To install libqrencode, run:
|
||||
|
||||
@@ -121,11 +123,13 @@ GUI dependencies:
|
||||
Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compile the GUI, we need to install
|
||||
the necessary parts of Qt, the libqrencode and pass `-DBUILD_GUI=ON`. Skip if you don't intend to use the GUI.
|
||||
|
||||
sudo dnf install qt5-qttools-devel qt5-qtbase-devel
|
||||
sudo dnf install qt6-qtbase-devel qt6-qttools-devel
|
||||
|
||||
For Qt 6.5 and later, the `xcb-util-cursor` package must be installed at runtime.
|
||||
|
||||
Additionally, to support Wayland protocol for modern desktop environments:
|
||||
|
||||
sudo dnf install qt5-qtwayland
|
||||
sudo dnf install qt6-qtwayland
|
||||
|
||||
The GUI will be able to encode addresses in QR codes unless this feature is explicitly disabled. To install libqrencode, run:
|
||||
|
||||
|
@@ -30,7 +30,7 @@ Bitcoin Core requires one of the following compilers.
|
||||
| [Fontconfig](../depends/packages/fontconfig.mk) (gui) | [link](https://www.freedesktop.org/wiki/Software/fontconfig/) | [2.12.6](https://github.com/bitcoin/bitcoin/pull/23495) | 2.6 | Yes |
|
||||
| [FreeType](../depends/packages/freetype.mk) (gui) | [link](https://freetype.org) | [2.11.0](https://github.com/bitcoin/bitcoin/commit/01544dd78ccc0b0474571da854e27adef97137fb) | 2.3.0 | Yes |
|
||||
| [qrencode](../depends/packages/qrencode.mk) (gui) | [link](https://fukuchi.org/works/qrencode/) | [4.1.1](https://github.com/bitcoin/bitcoin/pull/27312) | N/A | No |
|
||||
| [Qt](../depends/packages/qt.mk) (gui) | [link](https://download.qt.io/official_releases/qt/) | [5.15.16](https://github.com/bitcoin/bitcoin/pull/30774) | [5.11.3](https://github.com/bitcoin/bitcoin/pull/24132) | No |
|
||||
| [Qt](../depends/packages/qt.mk) (gui) | [link](https://download.qt.io/archive/qt/) | [6.7.3](https://github.com/bitcoin/bitcoin/pull/30997) | [6.2](https://github.com/bitcoin/bitcoin/pull/30997) | No |
|
||||
| [ZeroMQ](../depends/packages/zeromq.mk) (notifications) | [link](https://github.com/zeromq/libzmq/releases) | [4.3.4](https://github.com/bitcoin/bitcoin/pull/23956) | 4.0.0 | No |
|
||||
| [Berkeley DB](../depends/packages/bdb.mk) (legacy wallet) | [link](https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html) | 4.8.30 | 4.8.x | No |
|
||||
| [SQLite](../depends/packages/sqlite.mk) (wallet) | [link](https://sqlite.org) | [3.38.5](https://github.com/bitcoin/bitcoin/pull/25378) | [3.7.17](https://github.com/bitcoin/bitcoin/pull/19077) | No |
|
||||
|
Reference in New Issue
Block a user