Built on PR #29923. Loosely based on PR #22708.
This is a proof-of-concept of using the same methodology as in #29923 to support both Wayland and X11 windowing backends, for the Linux release binary, without any extra build-time nor fixed run-time dependencies. It results in a bitcoin-qt
binary that “just works” on systems that have only one of them installed, or both.
Everything (including libEGL) is loaded dynamically at run time if needed.
0$ readelf -a src/qt/bitcoin-qt |grep '(NEEDED)'
1
2 0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
3 0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
4 0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
5 0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
6 0x0000000000000001 (NEEDED) Shared library: [ld-linux-x86-64.so.2]
(libdl.so.1
also when building with older GLIBC, as for guix)
When launching with WAYLAND_DISPLAY=...
(takes priority):
02024-04-25T07:13:54Z Bitcoin Core version v27.99.0-4d5957ddc638-dirty (release build)
12024-04-25T07:13:54Z Qt 5.15.13 (static), plugin=wayland (static)
22024-04-25T07:16:43Z Static plugins:
32024-04-25T07:16:43Z QXcbIntegrationPlugin, version 331520
42024-04-25T07:16:43Z QWaylandIntegrationPlugin, version 331520
52024-04-25T07:16:43Z QWaylandEglClientBufferPlugin, version 331520
62024-04-25T07:16:43Z QWaylandBradientDecorationPlugin, version 331520
72024-04-25T07:16:43Z QWaylandXdgShellIntegrationPlugin, version 3315202
When launching with DISPLAY=...
:
02024-04-25T07:16:43Z Bitcoin Core version v27.99.0-4d5957ddc638-dirty (release build)
12024-04-25T07:16:43Z Qt 5.15.13 (static), plugin=xcb (static)
Will make this a draft. This is not ready for review: the Qt patch can potentially be cleaned up a lot with regard to generated wayland code. But it works. Please review #29923 instead, which needs to go in first anyway.
Closes #19950.
qtsowrap
wayland branch: https://github.com/laanwj/qtsowrap/tree/wayland
Co-authored-by: Hennadii Stepanov
Notes
- If you get an error that a
qtwayland-...
is missing while runningmake
independs
, remove thedepends/sources/.download-stamps/.*qt*
files to make sure it re-attempts to download missing files.