Skip to content
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

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

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

laanwj
Copy link
Member

@laanwj laanwj commented Apr 25, 2024

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.

$ readelf -a src/qt/bitcoin-qt |grep '(NEEDED)'

 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.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):

2024-04-25T07:13:54Z Bitcoin Core version v27.99.0-4d5957ddc638-dirty (release build)
2024-04-25T07:13:54Z Qt 5.15.13 (static), plugin=wayland (static)
2024-04-25T07:16:43Z Static plugins:
2024-04-25T07:16:43Z  QXcbIntegrationPlugin, version 331520
2024-04-25T07:16:43Z  QWaylandIntegrationPlugin, version 331520
2024-04-25T07:16:43Z  QWaylandEglClientBufferPlugin, version 331520
2024-04-25T07:16:43Z  QWaylandBradientDecorationPlugin, version 331520
2024-04-25T07:16:43Z  QWaylandXdgShellIntegrationPlugin, version 3315202

When launching with DISPLAY=...:

2024-04-25T07:16:43Z Bitcoin Core version v27.99.0-4d5957ddc638-dirty (release build)
2024-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.

laanwj and others added 13 commits April 20, 2024 17:18
Doesn't cause problems because we don't use FT on windows, but leave it
alone just to be sure.
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.
No need to defer this, simplifies initialization.
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
@DrahtBot
Copy link
Contributor

DrahtBot commented Apr 25, 2024

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.

@laanwj laanwj marked this pull request as draft April 25, 2024 07:55
@hebasto
Copy link
Member

hebasto commented Apr 25, 2024

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 :)

@DrahtBot
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Linux] Add wayland support
3 participants