doc: build: Fix instructions for msvc gui builds #31851

pull davidgumberg wants to merge 1 commits into bitcoin:master from davidgumberg:2-12-25-msvc-docs changing 1 files +11 −0
  1. davidgumberg commented at 9:01 pm on February 12, 2025: contributor

    If the instructions in doc/build-windows-msvc.md are followed as-is, and “Developer (PowerShell|Command Prompt) for VS 2022” is used to execute the suggested build commands, the root directory of vcpkg (e.g. in VS 2022 Community edition: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\vcpkg), is too long, and when vcpkg attempts to build any of the QT packages, it will fail because of build steps that require path lengths greater than Windows’ MAX_PATH 260 character limit. This can be avoided without needing to move the vcpkg root dir by setting --x-buildtrees-root to a short path, like C:\vcpkg.

    See e.g. https://github.com/microsoft/vcpkg/issues/28451, https://github.com/microsoft/vcpkg/issues/28083, https://github.com/microsoft/vcpkg/issues/24751.

  2. doc: build: Fix instructions for msvc gui builds
    If the instructions are followed as-is, and "Developer
    (PowerShell|Command Prompt) for VS 2022" is used to execute the
    suggested build commands, the root directory of vcpkg (e.g. in VS 2022
    Community edition: `C:\Program Files\Microsoft Visual
    Studio\2022\Community\VC\vcpkg`), is too long, and when vcpkg attempts
    to build any of the QT packages, it will fail because of build steps
    that require path lengths greater than Windows' `MAX_PATH` 260 character
    limit. This can be avoided without needing to move the vcpkg root dir by
    setting `--x-buildtrees-root` to a short path, like `C:\vcpkg`.
    c3fa043ae5
  3. DrahtBot commented at 9:01 pm on February 12, 2025: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31851.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK hebasto, TheCharlatan, achow101

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  4. DrahtBot added the label Docs on Feb 12, 2025
  5. hebasto added the label Windows on Feb 13, 2025
  6. hebasto added the label Build system on Feb 13, 2025
  7. hebasto commented at 8:21 am on February 13, 2025: member

    My only concern is that --x-buildtrees-root=<path> is labeled as:

    an experimental feature of vcpkg which may change or be removed at any time.

  8. davidgumberg commented at 5:20 am on February 14, 2025: contributor
    I considered that, but this solution is much more sane than any of the others I managed to come up with, and the flag has been around for at least 4 years (https://github.com/microsoft/vcpkg/issues/13789#issuecomment-700140607) , and this is only documentation, if there is a better solution, especially one that doesn’t require the user to intervene in any way, that would be ideal.
  9. hebasto approved
  10. hebasto commented at 7:42 am on February 14, 2025: member
    ACK c3fa043ae560289759b6f836ac62736d97ba91bf.
  11. TheCharlatan approved
  12. TheCharlatan commented at 9:08 am on February 14, 2025: contributor

    ACK c3fa043ae560289759b6f836ac62736d97ba91bf

    Am I misremembering or was this, or a similar workaround, part of the previous build instructions at some point?

  13. davidgumberg commented at 8:40 pm on February 14, 2025: contributor

    ACK c3fa043

    Am I misremembering or was this, or a similar workaround, part of the previous build instructions at some point?

    Yep, #29048 added a similar note to the old build_msvc/README.md, which had instructions for doing a static build of Qt, but I guess during the cmake transition, there was a switch from manually building Qt to using vcpkg, but sadly, the same problem still exists.

  14. achow101 commented at 10:11 pm on February 14, 2025: member
    ACK c3fa043ae560289759b6f836ac62736d97ba91bf
  15. achow101 merged this on Feb 14, 2025
  16. achow101 closed this on Feb 14, 2025


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: 2025-02-22 06:12 UTC

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