Skip to content

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.

@laanwj
Copy link
Member Author

laanwj commented May 17, 2024

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.

@laanwj laanwj closed this May 17, 2024
@willcl-ark
Copy link
Member

Thanks @laanwj

Perhaps we close #19950 with the same rationale?

@laanwj
Copy link
Member Author

laanwj commented May 17, 2024

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.

@hebasto
Copy link
Member

hebasto commented May 17, 2024

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

@laanwj
Copy link
Member Author

laanwj commented May 17, 2024

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.

@bitcoin bitcoin locked and limited conversation to collaborators May 17, 2025
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

4 participants