build: lrelease requires xml if not cross-building #19785

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:200823-xml changing 1 files +8 −4
  1. hebasto commented at 3:59 pm on August 23, 2020: member

    On macOS 10.15.6 (19G2021):

    0% make -C depends qt
    1...
    2Project ERROR: Unknown module(s) in QT: xml
    3...
    

    The same issue was reported in #14648 for macOS 10.13.6. #18536 reports about the similar issue on ARM 32bit.

    Fix #14648 Fix #18536

  2. DrahtBot added the label Build system on Aug 23, 2020
  3. DrahtBot commented at 1:04 am on August 24, 2020: member

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

    Conflicts

    No conflicts as of last run.

  4. DrahtBot added the label Needs rebase on Aug 27, 2020
  5. build: lrelease requires xml if not cross-building eb185da00a
  6. hebasto force-pushed on Aug 27, 2020
  7. hebasto commented at 11:10 am on August 27, 2020: member
    Rebased 1f168e6297c151d49d5c0244bc43493000bb73cd -> eb185da00a5ef7de5ad86f8f490e02cd5244392e (pr19785.01 -> pr19785.02) due to the conflict with #19761.
  8. hebasto commented at 11:11 am on August 27, 2020: member
    @fanquake Mind reviewing this PR?
  9. DrahtBot removed the label Needs rebase on Aug 27, 2020
  10. fanquake commented at 1:05 pm on August 27, 2020: member

    ~0

    % make -C depends qt Project ERROR: Unknown module(s) in QT: xml

    I think the issue here is more nuanced, otherwise macOS depends builds would be completely broken. I can recreate the failure (and have seen it before), but only when using a newer version of GNU make than I normally would for building. i.e I can build depends (2562d5d23863b6ef6cbdd9c34db5e485d9dc8406) using the stock macOS GNU Make 3.81 no problem. If I switch to using a brew installed GNU Make 4.3, that’s when I see the same failure in qt as you:

    0Info: creating stash file /Users/michael/github/fanquake-bitcoin/depends/work/build/x86_64-apple-darwin19.6.0/qt/5.9.8-cecb3adcd3c/qttranslations/.qmake.stash
    1Info: creating stash file /Users/michael/github/fanquake-bitcoin/depends/work/build/x86_64-apple-darwin19.6.0/qt/5.9.8-cecb3adcd3c/qttools/.qmake.stash
    2Project ERROR: Unknown module(s) in QT: xml
    3gmake: *** [funcs.mk:263: /Users/michael/github/fanquake-bitcoin/depends/work/build/x86_64-apple-darwin19.6.0/qt/5.9.8-cecb3adcd3c/qtbase/.stamp_configured] Error 3
    4gmake: Leaving directory '/Users/michael/github/fanquake-bitcoin/depends'
    

    So, it seems that when you’re using make 3.8, lrelease doesn’t need xml, and I’d like to think it’s unlikely that the tool dependencies would differ dependent on the version of make being used.

    Maybe there’s a make related quirk somewhere in Qt that is causing it to break when using newer versions? In any case, without investigating further I’m not convinced this is required to fix the problem. Ideally it might just be something make related, and hopefully a bit less involved. Will try and have a look soon. Might also be worth testing if this also just goes away with the 5.15 bump.

  11. hebasto commented at 2:14 pm on August 27, 2020: member

    FWIW, the Qt 5.9.8 code explicitly points to xml dependency:

    1. linguist/lrelease/lrelease.pro:
    0include(../shared/formats.pri)
    1include(../shared/proparser.pri
    
    1. linguist/shared/formats.pri:
    0QT *= xml
    
  12. laanwj commented at 9:12 am on September 8, 2020: member

    For the sake of keeping the Qt build as small as possible. I would really prefer a solution that doesn’t require enabling xml.

    This looks like an upstream issue?

  13. hebasto commented at 9:16 am on September 8, 2020: member

    This looks like an upstream issue?

    I don’t think so. Actually, *.ts files that are parsed by lrelease are XML files.

  14. fanquake commented at 7:08 am on September 15, 2020: member
    For another data point here. I’ve tested #19716 (updated to qt 5.15.1 but not yet pushed) with make 3.81 and make 4.3 and both build fine on macOS without any additional xml related changes. So this might be something that is just going to “fix itself”.
  15. fanquake commented at 7:20 am on October 1, 2020: member
    I don’t think we are going to go ahead with this change. This has been “broken” for some time now, and hasn’t really been much of an inconvenience. As mentioned above, this will also be fixed with seemingly no additional changes when we move to qt 5.15, so I’m going to close this PR for now. I any case if we were to merge a change like this, I’d really like to know why master currently works with one version of make, and not another.
  16. fanquake closed this on Oct 1, 2020

  17. hebasto commented at 3:31 am on April 4, 2021: member

    @fanquake

    … I’d really like to know why master currently works with one version of make, and not another.

    Hope, #21589 is an answer :)

  18. fanquake referenced this in commit 4315dc02a1 on Jul 18, 2021
  19. sidhujag referenced this in commit 4a59fda74b on Jul 23, 2021
  20. DrahtBot locked this on Aug 18, 2022

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-11-17 09:12 UTC

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