[PoC] qt, depends: Add wayland support without build-time nor fixed run-time deps #29959

pull laanwj wants to merge 14 commits into bitcoin:master from laanwj:2024-04-qtsowrap-wayland changing 23 files +26509 −439
  1. laanwj commented at 7:55 am on April 25, 2024: member

    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.

    Co-authored-by: Hennadii Stepanov

    Notes

    • If you get an error that a qtwayland-... is missing while running make in depends, remove the depends/sources/.download-stamps/.*qt* files to make sure it re-attempts to download missing files.
  2. depends: Add qtsowrap, make Qt build depend on it bad189b9e3
  3. depends: Add qtsowrap patch for Qt 8117e45070
  4. contrib: Remove qt dependency libraries from symbol check 0437bb72ef
  5. depends: Actually remove Qt dependencies packages 6cd5e8afdc
  6. squashme: Bump qtsowrap e10a6f1556
  7. fixup: don't patch qwindowsfontdatabase_ft.cpp
    Doesn't cause problems because we don't use FT on windows, but leave it
    alone just to be sure.
    afdb73b9d6
  8. fixup: Don't patch libinput platform
    We don't use the libinput platform, and we don't really care about it
    (it's for very low level embedded devices use, which render on the screen
    without windowing env). Remove unnecessary code from the patch.
    22253bf2c9
  9. fixup: Move xkbcommon initialization to xcb plugin load
    No need to defer this, simplifies initialization.
    eb60c77ab5
  10. depends: Change qtsowrap to wayland branch e63a8c6456
  11. depends: Update qt.mk to add Linux wayland module build 6fa6966efc
  12. depends: Adapt Qt qtsowrap patches for wayland 5b0f4f107c
  13. build: Update static Qt build to use wayland plugin
    Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
    8acb4519d1
  14. qt: Add static wayland plugins
    Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
    655bd39378
  15. laanwj added the label GUI on Apr 25, 2024
  16. laanwj added the label Linux/Unix on Apr 25, 2024
  17. laanwj added the label Build system on Apr 25, 2024
  18. DrahtBot commented at 7:55 am on April 25, 2024: contributor

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

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept ACK hebasto

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #29985 (depends: Fix build of Qt for 32-bit platforms with recent glibc by laanwj)
    • #29923 (depends: Remove Qt build-time dependencies by laanwj)
    • #29895 (guix: remove bzip2 from deps by fanquake)
    • #29880 (depends: build FreeType with CMake by fanquake)
    • #29878 (depends: build expat with CMake 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.

  19. laanwj marked this as a draft on Apr 25, 2024
  20. hebasto commented at 8:43 am on April 25, 2024: member

    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.

    Concept ACK on this.

    Obviously :)

  21. DrahtBot added the label CI failed on Apr 25, 2024
  22. laanwj force-pushed on Apr 25, 2024
  23. fixup: bump qtsowrap 82ed822f3a
  24. laanwj force-pushed on Apr 25, 2024
  25. DrahtBot added the label Needs rebase on Apr 29, 2024
  26. DrahtBot commented at 2:16 am on April 29, 2024: contributor

    🐙 This pull request conflicts with the target branch and needs rebase.

  27. laanwj commented at 8:37 am on May 17, 2024: member
    Closing for now. It exists as a PoC, if anyone is truly interested in wayland support in bitcoin core’s binary releases, and interested in helping test and review, let me know. Right now, it seems something people mostly ask about just to ask about.
  28. laanwj closed this on May 17, 2024

  29. willcl-ark commented at 8:39 am on May 17, 2024: member

    Thanks @laanwj

    Perhaps we close #19950 with the same rationale?

  30. laanwj commented at 8:44 am on May 17, 2024: member

    Perhaps we close #19950 with the same rationale?

    i’m not sure. Pretty sure it’s something that people will open new issues about endlessly and then forget about them. Might as well leave this one open so there’s context.

  31. hebasto commented at 9:17 am on May 17, 2024: member

    @laanwj

    Closing for now. It exists as a PoC, if anyone is truly interested in wayland support in bitcoin core’s binary releases, and interested in helping test and review, let me know.

    I’m sorry for not paying attention to this great PR. I just don’t have time to focus on it at the moment. It is about to be changed soon :)

  32. laanwj commented at 9:34 am on May 17, 2024: member
    Thank you. To be clear that wasn’t aimed at you. i know you’re busy enough. Just at the wider FOSS community, who are always full of talk about the next big thing but when push comes to shove (heck, just trying some code is often too much)… In any case we can pick this up at some point. #29923 is basically complete so this would be the next step in the particular progression.

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-06-29 07:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me