Skip to content

Conversation

BlockMechanic
Copy link
Contributor

This PR reworks the way Qt dependency is built :-

  1. Introduces a top level config/build which
  2. Simplifies the way Qt is built, removing confusing lines
  3. Resolves static build for WIP: Qt: add QML based mobile GUI #16883
  4. Mimic how Qt is built from repo/all-in-one
  5. Is related to build: use more legible (q)make commands in qt package #20504 which makes (q)make commands simpler
  6. Continuation/Completion of icota@683710e which had incomplete dependency chain.

While trying to add Qml/QtQuick i took a closer look at how QT builds and found that it uses a top level qt.pro which by far simplifies the build process.

@maflcko
Copy link
Member

maflcko commented Dec 8, 2020

The ci doesn't pass, but this looks like a major rewrite, so it would be better to wait for some Concept ACKs from the build people

@sipa
Copy link
Member

sipa commented Dec 8, 2020

so it would be better to wait for some Concept ACKs from the build people

Seven, to the Build People, great miners and craftsmen of the mountain halls.

@DrahtBot
Copy link
Contributor

DrahtBot commented Dec 8, 2020

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

Conflicts

Reviewers, 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.

Remove Debug line
@jonasschnelli
Copy link
Contributor

Concept ACK on adding support for Qml/QtQuick.
Haven't studied the code in deep but the submodule part seems messy.

@@ -0,0 +1,50 @@
[submodule "qtbase"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure what this does. Does this make qt submodules of our repository?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
No, it does not make qt submodule of bitcoin. The file is just used by qt.pro to determine which qt modules to build, and what their dependencies are. Perhaps, i can rename the file to prevent confusion ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laanwj I've renamed the files to prevent confusion

@icota
Copy link
Contributor

icota commented Dec 10, 2020

Concept ACK but:

  • changing the way we build Qt and (subsequent) enabling of QML modules should probably be two separate PRs
  • .configure is a script so doesn't really belong in patches (actually none of the added files do)

@BlockMechanic
Copy link
Contributor Author

Concept ACK but:

  • changing the way we build Qt and (subsequent) enabling of QML modules should probably be two separate PRs
  • .configure is a script so doesn't really belong in patches (actually none of the added files do)

Yeah, none of them are strictly patches. I was avoiding making a separate folder to maintain general logic/structure.

@@ -0,0 +1,17 @@
#! /bin/sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This files looks to be stripped of its licence (LGPL). It's better to extract the file (and others) directly from the submodules. If the files have been slightly modified from the Qt source add a patchfile - to be in line with the current practice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These specific files are not within the submodules unfortunately nor are they listed in the download directory see :- https://download.qt.io/official_releases/qt/5.9/5.9.8/submodules. They are only in the all-in-one or the git, so I had copied them separately to avoid downloading the whole all-in-one only to extract these three files and then duplicate the work by separately downloading each module.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case I vote for downloading the all-in-one. It would reduce this PR by three files and most of its lines. It would also simplify existing code. The download would take a bit longer but if we want QML I think it's worth it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm already working on that approach @icota. Also worth noting that single file was the old approach, and it was changed in ab67dd7, maybe @theuni had a motivation for using modules.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@promag I have an all in one build already functional, should i open a PR and we collaborate ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BlockMechanic sure! Happy to review and compare with my change.

@hebasto
Copy link
Member

hebasto commented Dec 10, 2020

Concept ACK on adding QML support.

@hebasto
Copy link
Member

hebasto commented Dec 13, 2020

@icota

  • changing the way we build Qt and (subsequent) enabling of QML modules should probably be two separate PRs

The first part is implemented in #20641.

@DrahtBot
Copy link
Contributor

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

Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".

@fanquake
Copy link
Member

I'm not a fan of this approach. It's also unclear exactly what's going on, or why this is being done this way from a quick glance, as most of the commits have no useful title or description. I'm going to close this in favour of #20641, as it seems that achieves the same goal, and is going to be far more maintainable in the long term.

@fanquake fanquake closed this Dec 17, 2020
fanquake added a commit to bitcoin-core/gui that referenced this pull request Jul 18, 2021
1155978 build, qt: Do not install *.prl files (Hennadii Stepanov)
763793b build, qt: Fix wrong cross-compiling detection on macOS (Hennadii Stepanov)
3098272 build, qt: Force bootstrap while building linguist tools (Hennadii Stepanov)
689320e build, qt: Drop translations.pro hack (Hennadii Stepanov)
6a1f98f build, qt: Drop lrelease dependency patch (Hennadii Stepanov)
39e561e build, qt: Add linguist_tools list (Hennadii Stepanov)
27d3def build: Use Qt top-level build facilities (Hennadii Stepanov)

Pull request description:

  This PR:
  - uses Qt top-level build facilities without the need to download all-in-one archive
  - is based on **BlockMechanic**'s [idea](bitcoin/bitcoin#20600), and is an alternative to #20600
  - makes it easy to integrate [new modules](bitcoin/bitcoin#16883) into static builds
  - has the minimal diff
  - makes the qt package build process streamlined by dropping some patches and hacks (an alternative to  #21420 and #20642)

  Fixes #18536 (a non-intrusive alternative to #21589 and #19785).

  Fixes #14648.

  Fixes #21588 (a non-intrusive alternative to #21591).

  Required for adding [Wayland support](bitcoin/bitcoin#19950) on Linux.

  ---

  **Note for reviewers**: With 9046de8a4cbc3899fed9eae084115f423e7ac5bd from #21995 it is easy to verify that there are no changes in the resulted `qt` package archive on the per commit basis. For example, for `HOST=i686-pc-linux-gnu` no commit in this PR introduces any changes.

ACKs for top commit:
  fanquake:
    ACK 1155978

Tree-SHA512: 667b06b72cb7ff26d68b9b88e8dddb51084783ca9e3d80b3392710794c1dc7fd77bbcc3ccf4ccece9919d33b9bf8fce13c5059502bd228021dc7c93fdb87ca7a
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jul 23, 2021
1155978 build, qt: Do not install *.prl files (Hennadii Stepanov)
763793b build, qt: Fix wrong cross-compiling detection on macOS (Hennadii Stepanov)
3098272 build, qt: Force bootstrap while building linguist tools (Hennadii Stepanov)
689320e build, qt: Drop translations.pro hack (Hennadii Stepanov)
6a1f98f build, qt: Drop lrelease dependency patch (Hennadii Stepanov)
39e561e build, qt: Add linguist_tools list (Hennadii Stepanov)
27d3def build: Use Qt top-level build facilities (Hennadii Stepanov)

Pull request description:

  This PR:
  - uses Qt top-level build facilities without the need to download all-in-one archive
  - is based on **BlockMechanic**'s [idea](bitcoin#20600), and is an alternative to bitcoin#20600
  - makes it easy to integrate [new modules](bitcoin#16883) into static builds
  - has the minimal diff
  - makes the qt package build process streamlined by dropping some patches and hacks (an alternative to  bitcoin#21420 and bitcoin#20642)

  Fixes bitcoin#18536 (a non-intrusive alternative to bitcoin#21589 and bitcoin#19785).

  Fixes bitcoin#14648.

  Fixes bitcoin#21588 (a non-intrusive alternative to bitcoin#21591).

  Required for adding [Wayland support](bitcoin#19950) on Linux.

  ---

  **Note for reviewers**: With 9046de8 from bitcoin#21995 it is easy to verify that there are no changes in the resulted `qt` package archive on the per commit basis. For example, for `HOST=i686-pc-linux-gnu` no commit in this PR introduces any changes.

ACKs for top commit:
  fanquake:
    ACK 1155978

Tree-SHA512: 667b06b72cb7ff26d68b9b88e8dddb51084783ca9e3d80b3392710794c1dc7fd77bbcc3ccf4ccece9919d33b9bf8fce13c5059502bd228021dc7c93fdb87ca7a
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
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.

10 participants