-
Notifications
You must be signed in to change notification settings - Fork 38.7k
depends: Remove Qt build-time dependencies #29923
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
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
534b230 to
6cd5e8a
Compare
|
Instead of Qt's dependencies, maybe we should wrap Qt itself this way? Or do C++ templates break that too much? |
This is basically not possible with a C++ library. It is thanks to C's lack of name mangling and its straightforward linkage model that makes this possible. Also Qt has a ton of symbols compared to these libraries. And even if you narrow it down to only the used symbols, it's much harder to keep track of. Conceptually, a few low-level X11 (or in the future, Wayland) and font libraries are much more likely to be on the user's system than a compatible version of Qt. That will only become worse with Qt 5 versus 6. This PR, as is, doesn't change the needed libraries, only how they're imported. |
|
One important thing to test here is that the resulting There's no inherent reason to assume this will make compatibility worse, but it currently loads all symbols from the headers for the respective libraries (https://github.com/laanwj/qtsowrap?tab=readme-ov-file#versions) which might enforce the lower bound on version stronger than used to be done. Might consider downgrading the headers, if this turns out to be a problem. Or add a list in the descriptor per library of the functions actually used. But this is more work to maintain than a list of version numbers. |
|
Ubuntu 22.04 has the following version of libxcb-xfixes: 1.14. That's kind of strange! That's the same one we have. Edit: that was it! Ubuntu 22.04 now works. |
Guix builds (on x86_64)
|
|
i've added some review notes for the Qt patch here: https://github.com/laanwj/qtsowrap?tab=readme-ov-file#patching-qt What is important to ensure is that |
39e891d to
eb60c77
Compare
|
@maflcko Thank you for testing! Force-push: trivial rebase for Android removal from build system |
|
Closed on purpose? |
|
i was a bit tired of seeing "you need to rebase" messages, will get around to this 😄 |
This was required by xkbcommon build, which is no longer a dependency for build.
|
Force-push: rebased to master for qt version bump. Trivial changes to depends, didn't need to change qt patch. |
|
🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the Possibly this is due to a silent merge conflict (the changes in this pull request being Leave a comment here, if you need help tracking down a confusing failure. |
These are indirect dependencies of Qt and don't necessarily need to be mentioned here. Fix "target filename not found" md linter error.
|
🐙 This pull request conflicts with the target branch and needs rebase. |
|
closing due to lack of interest |



In the spirit of the halving, let's (approximately) halve the number of packages in depends. Remove the following packages:
This is done by loading all of Qt's system dependencies at run-time, replacing them with an auto-generated wrapper library
qtsowrap:See https://github.com/laanwj/qtsowrap for details.
After this,
bitcoin-qthas the same direct linking dependencies asbitcoindand other binaries:(libdl.so.X needed too depending on the libc version)
For comparison,
bitcoin-qtfrom release 27.0 has the following:This does not affect Windows or MacOS, which already do not have this problem of having to build half the OS in the dependency chain.
This will make it possible to add Wayland support to the release binaries without requiring the Wayland (or X) libraries to be installed on every system that runs them.
Reviewing/Testing
bitcoin-qtbinaries work on a range of different Linux distributions (also older ones that people still care about).initialize_happens before any calls to a library, as calling early will cause a crash. Forgetting to wrap a header will be found during linking, as the symbol will be wrong, so it's not a review concern.TODOs (all done)
(before merge, probably)