Skip to content

build, qt: Add Wayland support for Linux builds with depends#22708

Closed
hebasto wants to merge 5 commits intobitcoin:masterfrom
hebasto:210815-wayland
Closed

build, qt: Add Wayland support for Linux builds with depends#22708
hebasto wants to merge 5 commits intobitcoin:masterfrom
hebasto:210815-wayland

Conversation

@hebasto
Copy link
Member

@hebasto hebasto commented Aug 15, 2021

This PR adds the QtWayland module into the qt package in depends.

This change allows to build release binaries for Linux systems that can run natively—as a Wayland client—on modern desktops with Wayland compositors.

Closes #19950.


The diff for Qt "Configure summary" in depends:

@@ -85,11 +85,11 @@
     MarkdownReader ....................... yes
       Using system libmd4c ............... no
     MarkdownWriter ....................... no
-  EGL .................................... no
+  EGL .................................... yes
   OpenVG ................................. no
   OpenGL:
     Desktop OpenGL ....................... no
-    OpenGL ES 2.0 ........................ no
+    OpenGL ES 2.0 ........................ yes
     OpenGL ES 3.0 ........................ no
     OpenGL ES 3.1 ........................ no
     OpenGL ES 3.2 ........................ no
@@ -157,6 +157,24 @@
   WinRT Runner Tool ...................... no
 Qt Tools:
   QDoc ................................... no
+Qt Wayland Drivers:
+  EGL .................................... yes
+  Raspberry Pi ........................... no
+  XComposite EGL ......................... no
+  XComposite GLX ......................... no
+  DRM EGL ................................ no
+  libhybris EGL .......................... no
+  Linux dma-buf server buffer integration . no
+  Vulkan-based server buffer integration . no
+  Shm emulation server buffer integration . no
+Qt Wayland Client Shell Integrations:
+  xdg-shell .............................. yes
+  xdg-shell unstable v5 (deprecated) ..... no
+  xdg-shell unstable v6 .................. no
+  ivi-shell .............................. no
+  wl-shell (deprecated) .................. no
+Qt Wayland Client ........................ yes
+Qt Wayland Compositor .................... no
 
 Note: Also available for Linux: linux-clang linux-icc
 

Here is an excerpt from the log on Ubuntu 22.04 + GNOME:

$ QT_QPA_PLATFORM=wayland ./src/qt/bitcoin-qt -printtoconsole
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
2022-04-04T11:11:26Z Bitcoin Core version v23.99.0-8ffd5cae0b8a (release build)
2022-04-04T11:11:26Z Qt 5.15.3 (static), plugin=wayland (static)
2022-04-04T11:11:26Z Static plugins:
2022-04-04T11:11:26Z  QXcbIntegrationPlugin, version 331520
2022-04-04T11:11:26Z  QWaylandIntegrationPlugin, version 331520
2022-04-04T11:11:26Z  QWaylandEglClientBufferPlugin, version 331520
2022-04-04T11:11:26Z  QWaylandBradientDecorationPlugin, version 331520
2022-04-04T11:11:26Z  QWaylandXdgShellIntegrationPlugin, version 331520
2022-04-04T11:11:26Z Style: fusion / QFusionStyle
2022-04-04T11:11:26Z System: Ubuntu Jammy Jellyfish (development branch), x86_64-little_endian-lp64
2022-04-04T11:11:26Z Screen: eDP-1 1920x1080, pixel ratio=1.0
...

Please note that for the simplicity sake Wayland 1.19.0 has been used as in Wayland 1.20.0:

  • The autotools build system has been dropped. Meson has replaced it.

Notes about new runtime dependencies

Wayland compositor infrastructure:

Vendor neutral GL dispatch libraries:

https://ubuntu.com/security/cves and https://security-tracker.debian.org/tracker/ have no records about the packages mentioned above.

More details:

@hebasto hebasto force-pushed the 210815-wayland branch 3 times, most recently from 5aa6bc7 to d233a7c Compare August 15, 2021 22:03
@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 15, 2021

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #24798 ([POC] build: Hello Qt 6 by hebasto)
  • #24283 (build: Add show-% target for multi-line variables and debug info by hebasto)
  • #23969 (build: remove use of TARGET_OS and BUILD_OS by fanquake)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@laanwj
Copy link
Member

laanwj commented Aug 16, 2021

Concept ACK. Thanks for working on this.

Adding a hard dependency on Mesa's OpenGL ES2 driver for building the dependencies is kind of meh here.

Speaking of which, does this add any NEEDED libraries to the bitcoin-qt binary? (e.g., does this pass the symbols check)? Or does it figure out that wayland/EGL/OpenGL ES2 is optional at least at run time, if not at build time?

@hebasto hebasto force-pushed the 210815-wayland branch 2 times, most recently from 1fe7d4e to 2ad38d8 Compare August 16, 2021 17:15
@fanquake
Copy link
Member

Speaking of which, does this add any NEEDED libraries to the bitcoin-qt binary?

Yes it does. This change in it's current state adds the following runtime dependencies to bitcoin-qt:

qt/bitcoin-qt: NEEDED library libwayland-egl.so.1 is not allowed
qt/bitcoin-qt: NEEDED library libGLESv2.so.2 is not allowed
qt/bitcoin-qt: NEEDED library libwayland-cursor.so.0 is not allowed
qt/bitcoin-qt: NEEDED library libwayland-client.so.0 is not allowed
qt/bitcoin-qt: NEEDED library libEGL.so.1 is not allowed

@hebasto
Copy link
Member Author

hebasto commented Aug 17, 2021

@MarcoFalke Guix builds for the current state of this PR seem useless, so the "DrahtBot Guix build requested" label could be dropped.

maflcko pushed a commit that referenced this pull request Aug 19, 2021
…anged

f52a72a ci: Invalidate depends caches when sources have been changed (Hennadii Stepanov)
939640f ci: Reorder scripts to make git available before depends_sources_cache (Hennadii Stepanov)

Pull request description:

  On master (502d22c) the Cirrus CI do _not_ invalidate depends caches when their sources has been changed, i.e. source version updates, a new dependency etc.

  This behavior causes:
  - breaking CI build for Android APK  (see #22708)
  - the cache sizes growing

  It is assumed that caches could be invalidated via Cirrus CI API/GUI, but it is inconvenient and it does not work as expected in all cases.

  The common part of `fingerprint_key`s for both `depends_sources_cache` and `depends_built_cache` is the recent commit that changes sources in the `src/depends` sub-directory.

  For `depends_built_cache` additionally `CIRRUS_TASK_NAME` is used to avoid sharing of the same cache between tasks with different OSes and different `DEP_OPTS`.

  ---

  The `depends_sources` cache:
  - in master (502d22c)

  ![Screenshot from 2021-08-16 11-10-17](https://user-images.githubusercontent.com/32963518/129532207-56c09e06-c8d0-4f1e-a692-f198da011b20.png)

  - with this PR

  ![Screenshot from 2021-08-16 11-10-42](https://user-images.githubusercontent.com/32963518/129532253-f5426814-4f58-448f-ad52-da26cc312af7.png)

ACKs for top commit:
  MarcoFalke:
    cr ACK f52a72a
  Zero-1729:
    crACK f52a72a

Tree-SHA512: 0d14814ff308317c7c18cc725cf69055139030c207200af003872068f5567bd4b9c1f6783845d11742e314ebcc1dc5cae16aa86475376b623d921af5fcda14dd
@hebasto
Copy link
Member Author

hebasto commented Aug 19, 2021

Rebased 2ad38d8 -> ec94b62 (pr22708.06 -> pr22708.07) due to the conflict with #22710.

@hebasto
Copy link
Member Author

hebasto commented Sep 2, 2021

Rebased ec94b62 -> 2b4c1ca (pr22708.07 -> pr22708.08) due to the conflict with #22418.

@luke-jr
Copy link
Member

luke-jr commented Sep 16, 2021

  • Raspberry Pi ........................... no

Maybe we want that for ARM/AArch64 builds?

@hebasto
Copy link
Member Author

hebasto commented Apr 4, 2022

Rebased bc0411a -> 8ffd5ca (pr22708.23 -> pr22708.24) due to the conflict with #24668.

PR description has been updated.

Friendly ping @A6GibKm @fanquake @jarolrod @prusnak

@hebasto
Copy link
Member Author

hebasto commented Apr 4, 2022

Guix builds on arm64:

# find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
bb082311c5352737a2494330b6b00968e9858eb5fc11e311db67651b2e027874  guix-build-8ffd5cae0b8a/output/arm-linux-gnueabihf/SHA256SUMS.part
8cf6635b1c47014ff1ad067afbbddbf81389f0ae2af5b33a7e04bd8d63788c9d  guix-build-8ffd5cae0b8a/output/arm-linux-gnueabihf/bitcoin-8ffd5cae0b8a-arm-linux-gnueabihf-debug.tar.gz
dfd8a4150538f0dd724a66318282393716fd53e7be8cdab6c3d8fe1480d962b1  guix-build-8ffd5cae0b8a/output/arm-linux-gnueabihf/bitcoin-8ffd5cae0b8a-arm-linux-gnueabihf.tar.gz
7bf2416a6bddf65958abe676e53c0a69dcf145f30f614e254b14ffa490cf7ceb  guix-build-8ffd5cae0b8a/output/arm64-apple-darwin/SHA256SUMS.part
1d3a7d3133822f78dc20f14cbf0bb3b141ca64a878ae1a228f8366b7debd73c3  guix-build-8ffd5cae0b8a/output/arm64-apple-darwin/bitcoin-8ffd5cae0b8a-arm64-apple-darwin-unsigned.dmg
e038a92bef7e103388e75343c31838079d834caf78714454196934cd8c94e854  guix-build-8ffd5cae0b8a/output/arm64-apple-darwin/bitcoin-8ffd5cae0b8a-arm64-apple-darwin-unsigned.tar.gz
73ace3a36f3662074b2323618847fee567a6d599ab1cc93b14dbdbfd787ce738  guix-build-8ffd5cae0b8a/output/arm64-apple-darwin/bitcoin-8ffd5cae0b8a-arm64-apple-darwin.tar.gz
5966dd04a530bedb7a69591bf494b96234f2ce4a2dd72e5cecde0cb01a843afe  guix-build-8ffd5cae0b8a/output/dist-archive/bitcoin-8ffd5cae0b8a.tar.gz
8fb5e72f51637d115f65d8e1bfe82398e7073f5af103afc3b47974afd033e291  guix-build-8ffd5cae0b8a/output/powerpc64-linux-gnu/SHA256SUMS.part
3f42ea0d895f7120ce0416c7b17ddb170fcfeb68e3f316db3c568be4ae2876d8  guix-build-8ffd5cae0b8a/output/powerpc64-linux-gnu/bitcoin-8ffd5cae0b8a-powerpc64-linux-gnu-debug.tar.gz
14d0295ea41ce3a0e82b10734fd44df28286fb26e9f97770bb0330a8ae61b84d  guix-build-8ffd5cae0b8a/output/powerpc64-linux-gnu/bitcoin-8ffd5cae0b8a-powerpc64-linux-gnu.tar.gz
939ece3bc696ff2f8991b93d33dfee11a763c0e15695a3e2948e7b5b19223f60  guix-build-8ffd5cae0b8a/output/powerpc64le-linux-gnu/SHA256SUMS.part
6f531f09926ae67a6ad69ea32181893a1e66b0ab6577737ca675d616b92fad59  guix-build-8ffd5cae0b8a/output/powerpc64le-linux-gnu/bitcoin-8ffd5cae0b8a-powerpc64le-linux-gnu-debug.tar.gz
edc8bd0b3628c9ef6652748d75372ca51693726eaca29ddc8c2ea6448d1741e6  guix-build-8ffd5cae0b8a/output/powerpc64le-linux-gnu/bitcoin-8ffd5cae0b8a-powerpc64le-linux-gnu.tar.gz
9eb2b766880d9c8c32aa94176961bff8b47415c2eae40b7b85ce6f65c6687634  guix-build-8ffd5cae0b8a/output/riscv64-linux-gnu/SHA256SUMS.part
b1197b44f5c2ce35955d2e509097bc6a5070ec9aebf94b0e7401a143d7e0fbb9  guix-build-8ffd5cae0b8a/output/riscv64-linux-gnu/bitcoin-8ffd5cae0b8a-riscv64-linux-gnu-debug.tar.gz
8e88bd64f98851c4785e2bb45488243b09f4bf6ba9c24f6f4cac45faf9ba29c0  guix-build-8ffd5cae0b8a/output/riscv64-linux-gnu/bitcoin-8ffd5cae0b8a-riscv64-linux-gnu.tar.gz
dc51e86e305aba3c91d5bc80dd12449272f25a7a8ae8bc1e9f34b94b5c961fef  guix-build-8ffd5cae0b8a/output/x86_64-apple-darwin/SHA256SUMS.part
ecc2d6701b425a35358035f23d69feaa032f0a1a61df69ed07965e758a720233  guix-build-8ffd5cae0b8a/output/x86_64-apple-darwin/bitcoin-8ffd5cae0b8a-x86_64-apple-darwin-unsigned.dmg
e853c9b2f83d0eda2a32c30151f978716718ec474c10a5522421bb99550b26aa  guix-build-8ffd5cae0b8a/output/x86_64-apple-darwin/bitcoin-8ffd5cae0b8a-x86_64-apple-darwin-unsigned.tar.gz
bfaeac0e032efb3ade95d7c3558080f80aed8c3efbd48f588874978ccb2c8ad5  guix-build-8ffd5cae0b8a/output/x86_64-apple-darwin/bitcoin-8ffd5cae0b8a-x86_64-apple-darwin.tar.gz
7e97627d66eed7af5e4467bd9cbb559d58f5e2f5b969fd97b0d637c6a2985e29  guix-build-8ffd5cae0b8a/output/x86_64-linux-gnu/SHA256SUMS.part
ff15ea8693bf7f4ace18b0f1bddf75a45071b74a5c2357fb8e17abe41622efb7  guix-build-8ffd5cae0b8a/output/x86_64-linux-gnu/bitcoin-8ffd5cae0b8a-x86_64-linux-gnu-debug.tar.gz
7b0f0be478d0396882b3934df33130ad66d6247261d375bed2492ed8a459e865  guix-build-8ffd5cae0b8a/output/x86_64-linux-gnu/bitcoin-8ffd5cae0b8a-x86_64-linux-gnu.tar.gz
ea48c6308c90dd379e6e4a5780f300abdc393ade1160836e5c1f27347c132b15  guix-build-8ffd5cae0b8a/output/x86_64-w64-mingw32/SHA256SUMS.part
942c7c2789e1307ffc7741ffbe8c139dfd8a0538a3331df928b766304af92817  guix-build-8ffd5cae0b8a/output/x86_64-w64-mingw32/bitcoin-8ffd5cae0b8a-win64-debug.zip
315a3b9aafaba15f9995872c06120275f899b672611e3a4f445e817730eb8d80  guix-build-8ffd5cae0b8a/output/x86_64-w64-mingw32/bitcoin-8ffd5cae0b8a-win64-setup-unsigned.exe
b2c60797c523f036c38804961096cd343e49aad2c9775f23462b0cfa9f0f0a03  guix-build-8ffd5cae0b8a/output/x86_64-w64-mingw32/bitcoin-8ffd5cae0b8a-win64-unsigned.tar.gz
bfb60d484ba8fabe573df5ca55a985b372d68b6738c9b52c960a84afeeb8f93a  guix-build-8ffd5cae0b8a/output/x86_64-w64-mingw32/bitcoin-8ffd5cae0b8a-win64.zip

@hebasto
Copy link
Member Author

hebasto commented Apr 4, 2022

Guix builds on x86_64:

$ find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
161e60c2562bf6b6113c851ec627d1c2bf763b5a2bdd666315ae4be83f14be42  guix-build-8ffd5cae0b8a/output/aarch64-linux-gnu/SHA256SUMS.part
26535f862e6d1559ccf771c9ea774f8693106d2afac8e1b4ad987f5ea950231c  guix-build-8ffd5cae0b8a/output/aarch64-linux-gnu/bitcoin-8ffd5cae0b8a-aarch64-linux-gnu-debug.tar.gz
56e7337e28364ea1f2e97cba75854b00465a658971f6887a0c33b7f7ed071668  guix-build-8ffd5cae0b8a/output/aarch64-linux-gnu/bitcoin-8ffd5cae0b8a-aarch64-linux-gnu.tar.gz
603db2a8db0b189fad87a2f284de0a595d2fb238104c32d2409a103139b1b999  guix-build-8ffd5cae0b8a/output/arm-linux-gnueabihf/SHA256SUMS.part
093bc1369d9e6bf63e35b18b6a6ef66cc899e9d0f0c158499df8b63f12e20001  guix-build-8ffd5cae0b8a/output/arm-linux-gnueabihf/bitcoin-8ffd5cae0b8a-arm-linux-gnueabihf-debug.tar.gz
f6c47764b38201767b2ec0ca31f2f018e18ce3321532ea441763b713a4fa5451  guix-build-8ffd5cae0b8a/output/arm-linux-gnueabihf/bitcoin-8ffd5cae0b8a-arm-linux-gnueabihf.tar.gz
9b0e26aecfe8a7da8c8d8a35205c30ededdd26b21734573f9c0e3fa29bbfd4d6  guix-build-8ffd5cae0b8a/output/arm64-apple-darwin/SHA256SUMS.part
ed7c449416337a2bf952bac104478565a2a7c147e63aff7694121dc3551cae52  guix-build-8ffd5cae0b8a/output/arm64-apple-darwin/bitcoin-8ffd5cae0b8a-arm64-apple-darwin-unsigned.dmg
aefb9148fbd490dcd3ba9e019b068dfab4dcbb9c31e681721f007e521749ea4f  guix-build-8ffd5cae0b8a/output/arm64-apple-darwin/bitcoin-8ffd5cae0b8a-arm64-apple-darwin-unsigned.tar.gz
429b9aaf68a394423a7612214ab1ef76c06cbc4473262ff87a208fb88584c57a  guix-build-8ffd5cae0b8a/output/arm64-apple-darwin/bitcoin-8ffd5cae0b8a-arm64-apple-darwin.tar.gz
5966dd04a530bedb7a69591bf494b96234f2ce4a2dd72e5cecde0cb01a843afe  guix-build-8ffd5cae0b8a/output/dist-archive/bitcoin-8ffd5cae0b8a.tar.gz
e73984e4bac4383091606dc0e3051b3564c6df07aadfbf2ccf14aedf4acf8ba2  guix-build-8ffd5cae0b8a/output/powerpc64-linux-gnu/SHA256SUMS.part
0ec9542b68d60db5777477c44febc88d76b61999a9bcf7014f978a6e0ee3bc9e  guix-build-8ffd5cae0b8a/output/powerpc64-linux-gnu/bitcoin-8ffd5cae0b8a-powerpc64-linux-gnu-debug.tar.gz
eefac40a3cdf7a3a4a4568d3bf5d5ad23114ad280e7b14c813baf6b8fcc9ba9b  guix-build-8ffd5cae0b8a/output/powerpc64-linux-gnu/bitcoin-8ffd5cae0b8a-powerpc64-linux-gnu.tar.gz
891fa8f04c6b6cff6d56d7b996d1bd5003f86afc52f75ea9424a1fa1c2cfe84a  guix-build-8ffd5cae0b8a/output/powerpc64le-linux-gnu/SHA256SUMS.part
02bb0867c34833b43b0191437084f0479c7d31ba5f1b814415968e5e6288640c  guix-build-8ffd5cae0b8a/output/powerpc64le-linux-gnu/bitcoin-8ffd5cae0b8a-powerpc64le-linux-gnu-debug.tar.gz
2b524ea49552a58835cec9ed2e7e9bdb8dc4f855e61527e45d203828709b68db  guix-build-8ffd5cae0b8a/output/powerpc64le-linux-gnu/bitcoin-8ffd5cae0b8a-powerpc64le-linux-gnu.tar.gz
5e9d7a95a76d2c0a294357b3df6be923ae1cf3d45f79c36463256bbd5f33709d  guix-build-8ffd5cae0b8a/output/riscv64-linux-gnu/SHA256SUMS.part
ad0474adea549d1abf9076b2837466a07e8612e19b1f12dcf1548d2106f5d343  guix-build-8ffd5cae0b8a/output/riscv64-linux-gnu/bitcoin-8ffd5cae0b8a-riscv64-linux-gnu-debug.tar.gz
38b95e6442a9294e8f7cdd54ff5aedd4cb7656fb78180585adda2550f56ff730  guix-build-8ffd5cae0b8a/output/riscv64-linux-gnu/bitcoin-8ffd5cae0b8a-riscv64-linux-gnu.tar.gz
7d301f771d459fdbf2156f2a8bd6a1e9cad44287e72091eade25f5e2755d00d1  guix-build-8ffd5cae0b8a/output/x86_64-apple-darwin/SHA256SUMS.part
ecc2d6701b425a35358035f23d69feaa032f0a1a61df69ed07965e758a720233  guix-build-8ffd5cae0b8a/output/x86_64-apple-darwin/bitcoin-8ffd5cae0b8a-x86_64-apple-darwin-unsigned.dmg
a457829c8dee90205cc3f1fc4f47af4131a47bd3f03fc2e0f81024726e2f8c03  guix-build-8ffd5cae0b8a/output/x86_64-apple-darwin/bitcoin-8ffd5cae0b8a-x86_64-apple-darwin-unsigned.tar.gz
bfaeac0e032efb3ade95d7c3558080f80aed8c3efbd48f588874978ccb2c8ad5  guix-build-8ffd5cae0b8a/output/x86_64-apple-darwin/bitcoin-8ffd5cae0b8a-x86_64-apple-darwin.tar.gz
ff357a530e8d572ccea0861afdba776894796e3639223af755e0bbb7e8628f98  guix-build-8ffd5cae0b8a/output/x86_64-linux-gnu/SHA256SUMS.part
e813dadb78d08157ded9f2eeedd02cdd9a5fbc36fbbeba963edd01fd37023cff  guix-build-8ffd5cae0b8a/output/x86_64-linux-gnu/bitcoin-8ffd5cae0b8a-x86_64-linux-gnu-debug.tar.gz
947dca5725341c1a440f596d444dba68369e66fc8d9dd09aaa157931255c618a  guix-build-8ffd5cae0b8a/output/x86_64-linux-gnu/bitcoin-8ffd5cae0b8a-x86_64-linux-gnu.tar.gz
5a4aecf2ee24e2b9103d075f0809f473f4b6df7d0eb441748275940d34ea2d92  guix-build-8ffd5cae0b8a/output/x86_64-w64-mingw32/SHA256SUMS.part
af4af53675eb7af1a9c50ac4d113e6527304e9e0b6e41c9bc06dd124e0002e04  guix-build-8ffd5cae0b8a/output/x86_64-w64-mingw32/bitcoin-8ffd5cae0b8a-win64-debug.zip
315a3b9aafaba15f9995872c06120275f899b672611e3a4f445e817730eb8d80  guix-build-8ffd5cae0b8a/output/x86_64-w64-mingw32/bitcoin-8ffd5cae0b8a-win64-setup-unsigned.exe
b2c60797c523f036c38804961096cd343e49aad2c9775f23462b0cfa9f0f0a03  guix-build-8ffd5cae0b8a/output/x86_64-w64-mingw32/bitcoin-8ffd5cae0b8a-win64-unsigned.tar.gz
d81110c7e8658707ca9fd67d43866f89b416e57ca6e2f35ccd808686d01c3679  guix-build-8ffd5cae0b8a/output/x86_64-w64-mingw32/bitcoin-8ffd5cae0b8a-win64.zip

@fanquake
Copy link
Member

fanquake commented Apr 7, 2022

It would be great if the changes were a bit more comprehensively explained. The PR adds a number of new dependencies (host and native) to depends, but doesn't mention:

  • How does this effect our release binaries and/or runtime requirements:

    • Will our Qt binary run on more or less systems compared to now?
    • Will users be required to install dependencies before being able to run the binaries?
    • If a system doesn't support wayland, does this automatically fallback to using the xcb backend?
      • Are we then maintaining both on a continually more outdated / unsupported version of Qt?
    • Does the introduction of new runtime dependencies increase Qt attack vectors in any way?
  • What are the new dependencies:

    • What do they do and why are they required?
    • Why do we need to bring them into depends as opposed to using system packages?
    • When should / how often do these new dependencies need updating?

It's unfortunate that from the get-go we're already an older version one package, because of a want to avoid meson. What is the effect of that? Is there a plan for solving this longer term, i.e just using the meson versions, or are we going to stay pinned to this older version forever?

  • How would / does any of this change with Qt 6?
    • Would be better off waiting until we are Qt 6 only before doing this?

@DrahtBot DrahtBot mentioned this pull request Apr 8, 2022
5 tasks
@hebasto
Copy link
Member Author

hebasto commented Apr 10, 2022

  • What are the new dependencies:

    • What do they do and why are they required?

    • Why do we need to bring them into depends as opposed to using system packages?

    • When should / how often do these new dependencies need updating?

I've updated the PR description with the new dependencies details.

@hebasto
Copy link
Member Author

hebasto commented Apr 10, 2022

Updated 8ffd5ca -> 46cfa61 (pr22708.24 -> pr22708.25):

  • pruned unused wayland artifacts in depends
  • code cleanups

@hebasto
Copy link
Member Author

hebasto commented Apr 10, 2022

Will our Qt binary run on more or less systems compared to now?

The former. It can run on Wayland desktops which do not support native X11 applications (tbh, I'm not aware of any such system).

If a system doesn't support wayland, does this automatically fallback to using the xcb backend?

A backend automatically depends on the XDG_SESSION_TYPE environment variable (which is ignored on GNOME), and can be overridden by the QT_QPA_PLATFORM environment variable. With this PR our release bitcoin-qt binary supports two values of the QT_QPA_PLATFORM environment variable: "xcb" and "wayland".

Will users be required to install dependencies before being able to run the binaries?

The runtime dependencies required to run bitcoin-qt natively on Wayland have already been described in doc/build-unix.md:

$ sudo apt install qtwayland5

I guess that Wayland-aware desktops already have this package been installed.

Does the introduction of new runtime dependencies increase Qt attack vectors in any way?

Hardly. There are no related CVEs so far.

How would / does any of this change with Qt 6?

I've looked through git log --oneline --no-merges 5.15..6.2.4 | grep -v 'Update dependencies' and https://bugreports.qt.io, and have not found anything significant.

@fanquake
Copy link
Member

Hardly. There are no related CVEs so far.

If you're loading more libraries at runtime your attack surface is increased.

How would / does any of this change with Qt 6?

I'm asking about Wayland support in general. Does it make a difference / would it be easier if we only supported it for Qt 6 onwards.

@hebasto
Copy link
Member Author

hebasto commented Apr 11, 2022

Updated 46cfa61 -> df5d7ae (pr22708.25 -> pr22708.26):

  • switched to the system libffi package instead of building it in depends

@hebasto
Copy link
Member Author

hebasto commented Apr 11, 2022

Updated 46cfa61 -> df5d7ae (pr22708.25 -> pr22708.26):

  • switched to the system libffi package instead of building it in depends

Reverted back as the libffi package must have host's architecture when cross-compiling.

@hebasto
Copy link
Member Author

hebasto commented Apr 11, 2022

Updated 46cfa61 -> 95bc748 (pr22708.25 -> pr22708.27):

  • switched to the system expat package instead of building the native_expat one in depends
  • minor cleanups

@hebasto
Copy link
Member Author

hebasto commented Apr 12, 2022

Guix builds on x86_64:

$ find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
d7febdff788ca87ce49c596c89bb8f9eabf92315184de9b23646887e3aa7fac5  guix-build-95bc74861315/output/aarch64-linux-gnu/SHA256SUMS.part
aa2a19ef7757c5629080ea8d5708e0ae577d3328aa19de0441543d9f5e4084f6  guix-build-95bc74861315/output/aarch64-linux-gnu/bitcoin-95bc74861315-aarch64-linux-gnu-debug.tar.gz
980de5ec642448c3b0c1e8dabe7180ecc5ab5fba4db80de9ee5adf6c256c7de7  guix-build-95bc74861315/output/aarch64-linux-gnu/bitcoin-95bc74861315-aarch64-linux-gnu.tar.gz
e7e702a1a427e40ef1ffe9fc8220dc36e27eb02e780b7140ac079db7958bd901  guix-build-95bc74861315/output/arm-linux-gnueabihf/SHA256SUMS.part
f5501c0afb4e38a87c74c712de8e08407f2d6c3bb7a3c326be3a92d794444c0d  guix-build-95bc74861315/output/arm-linux-gnueabihf/bitcoin-95bc74861315-arm-linux-gnueabihf-debug.tar.gz
43ccf701c97b382029c39704fe4fe2872c81974aa86d12d9913e8f2bf7ece52a  guix-build-95bc74861315/output/arm-linux-gnueabihf/bitcoin-95bc74861315-arm-linux-gnueabihf.tar.gz
94ef635b19b47dec8696788bbb0696cdb94f81bb763b37e30db256314123be4e  guix-build-95bc74861315/output/arm64-apple-darwin/SHA256SUMS.part
bcb0826e49ea67db787de78e5b88ab7331a76bfb54d12abd6eed177e18d55589  guix-build-95bc74861315/output/arm64-apple-darwin/bitcoin-95bc74861315-arm64-apple-darwin-unsigned.dmg
f3714ede1c40f0523926218a1fba32278f07d3d69295327dbef0feabb8d09339  guix-build-95bc74861315/output/arm64-apple-darwin/bitcoin-95bc74861315-arm64-apple-darwin-unsigned.tar.gz
40911c6c30da3ab6a85fd6c2ddff35140c8758b21e2a443e60f8d37fcd7199b7  guix-build-95bc74861315/output/arm64-apple-darwin/bitcoin-95bc74861315-arm64-apple-darwin.tar.gz
cb8791f4022c457692fc3744e7f5b240654e92093d6ab8eaea7c76650a55e349  guix-build-95bc74861315/output/dist-archive/bitcoin-95bc74861315.tar.gz
ff020b442ecd53e17ad9eb2350fa865a69094a99add786957c96d065d4dc9ce5  guix-build-95bc74861315/output/powerpc64-linux-gnu/SHA256SUMS.part
6cd72afe5b1f653dc1677cc0e610c198abdb45185d2e9f2d878fc7b3a7047ba5  guix-build-95bc74861315/output/powerpc64-linux-gnu/bitcoin-95bc74861315-powerpc64-linux-gnu-debug.tar.gz
688aac2906be71ca49091347d956de2cd447dad8df4ec6e7934855f02483c765  guix-build-95bc74861315/output/powerpc64-linux-gnu/bitcoin-95bc74861315-powerpc64-linux-gnu.tar.gz
297f43dccae5557fe9445a1c530f9bd03e65fe38a5766091bdd90741e9b6788f  guix-build-95bc74861315/output/powerpc64le-linux-gnu/SHA256SUMS.part
f00c6d35d63e370677c7d0c063e7563894a204f31003eefc0bc614a4ea77b7f0  guix-build-95bc74861315/output/powerpc64le-linux-gnu/bitcoin-95bc74861315-powerpc64le-linux-gnu-debug.tar.gz
13d0f3195eadfd5c1ae6d67044fea9e2000d2dd36b35a3e1d63728c3277b382f  guix-build-95bc74861315/output/powerpc64le-linux-gnu/bitcoin-95bc74861315-powerpc64le-linux-gnu.tar.gz
38c38c3012fa1b1bcfcf66d8afd75284b80a6672f6e329875c900a564d9d5775  guix-build-95bc74861315/output/riscv64-linux-gnu/SHA256SUMS.part
b2eb65d25a68f9635589d2b2343879c02768b28d6423f2ee140bbc873c3c083d  guix-build-95bc74861315/output/riscv64-linux-gnu/bitcoin-95bc74861315-riscv64-linux-gnu-debug.tar.gz
a98d56423305710e1567f21a8dda2f22bd37e5519d36b0edbda12be2ca34a1a6  guix-build-95bc74861315/output/riscv64-linux-gnu/bitcoin-95bc74861315-riscv64-linux-gnu.tar.gz
f018cc36c74b54e6b3e906d6860c1f419af197c43661b86fd0f05cd9b236863c  guix-build-95bc74861315/output/x86_64-apple-darwin/SHA256SUMS.part
0969d06078e177acac3e6775b48c194df6516b6598a0f84fea0baf38df564322  guix-build-95bc74861315/output/x86_64-apple-darwin/bitcoin-95bc74861315-x86_64-apple-darwin-unsigned.dmg
8814cde98bc048e2a1b9a1bb40b1097d50ae34524441008116853f73ae4fbda0  guix-build-95bc74861315/output/x86_64-apple-darwin/bitcoin-95bc74861315-x86_64-apple-darwin-unsigned.tar.gz
42d42cad94130a56183f6e6d871b674ecabf5ee3074e54c7476c8f0f7a655fb2  guix-build-95bc74861315/output/x86_64-apple-darwin/bitcoin-95bc74861315-x86_64-apple-darwin.tar.gz
a165db4eff6b8917375ae6296e2944668c46d9d8bbd2b9dd1e37c4aca53d89d7  guix-build-95bc74861315/output/x86_64-linux-gnu/SHA256SUMS.part
c1c85afbf630deee79e7ae8e425e0e3a1f9b2d57cc3997ec747a14e21a36b18e  guix-build-95bc74861315/output/x86_64-linux-gnu/bitcoin-95bc74861315-x86_64-linux-gnu-debug.tar.gz
b6588a01b020df0e57cd94ebb24e0d413a758f081dc0070c024027d92ce180bd  guix-build-95bc74861315/output/x86_64-linux-gnu/bitcoin-95bc74861315-x86_64-linux-gnu.tar.gz
1edae9c35b4bb998df51474f87f8cf38e3521e5fa685c63369ff0ece52c001b4  guix-build-95bc74861315/output/x86_64-w64-mingw32/SHA256SUMS.part
d7e9ec896fc93010d337556b29ec13bf69ecc508b5779990b1b9e01a9723b32c  guix-build-95bc74861315/output/x86_64-w64-mingw32/bitcoin-95bc74861315-win64-debug.zip
19b969d82224cc5f9f4fabdd970e991d300a2254e1b38bc336eb13619c97249f  guix-build-95bc74861315/output/x86_64-w64-mingw32/bitcoin-95bc74861315-win64-setup-unsigned.exe
51414e682194324bc3bc68ea1ae2eda5ccc51451600c57713eac243b0769fecb  guix-build-95bc74861315/output/x86_64-w64-mingw32/bitcoin-95bc74861315-win64-unsigned.tar.gz
ff8f1e36746e93aaa09a5e384509b41b1e8c44da5dd91fd73b03fd8bb62f374b  guix-build-95bc74861315/output/x86_64-w64-mingw32/bitcoin-95bc74861315-win64.zip

@fanquake
Copy link
Member

Concept ~0. Without some sort of plan / outline for what we are doing with Qt going forward, I'm not convinced this should be merged. For many years we've been trying to reduce the number of dependencies we need to manage, and the scope of features/things that need to be maintained in this repository, and this change moves us in the opposite direction.

Not only are we now supposedly going to return to supporting two major versions of Qt simultaneously (the benefit of which is not clear given basically all system packages of Qt 6 are currently unusable in our build system), but at the same time, this change introduces a second Linux graphics backend to support, along with more packages in depends, new runtime dependencies, and the scope for adding even more drivers/features in the future.

If there was some overwhelming demand for us to support it (which I don't see, and the majority of people who care about this are likely already self-compiling), and a plan to migrate towards say just supporting qt6+wayland, then this may be more interesting.

@hebasto
Copy link
Member Author

hebasto commented Apr 17, 2022

Concept ~0. Without some sort of plan / outline for what we are doing with Qt going forward, I'm not convinced this should be merged. For many years we've been trying to reduce the number of dependencies we need to manage, and the scope of features/things that need to be maintained in this repository, and this change moves us in the opposite direction.

Not only are we now supposedly going to return to supporting two major versions of Qt simultaneously (the benefit of which is not clear given basically all system packages of Qt 6 are currently unusable in our build system), but at the same time, this change introduces a second Linux graphics backend to support, along with more packages in depends, new runtime dependencies, and the scope for adding even more drivers/features in the future.

If there was some overwhelming demand for us to support it (which I don't see, and the majority of people who care about this are likely already self-compiling), and a plan to migrate towards say just supporting qt6+wayland, then this may be more interesting.

Even reducing new packages in depends to wayland and libglvnd only does not invalidate other mentioned points.

@hebasto
Copy link
Member Author

hebasto commented Oct 1, 2024

This PR might be reconsidered along with #29914.

@hebasto
Copy link
Member Author

hebasto commented Dec 4, 2025

Also: bitcoin-core/gui#916.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Linux] Add wayland support

7 participants