doc: Add hint about avoiding spaces in paths when building on Windows #32397

pull Brotcrunsher wants to merge 1 commits into bitcoin:master from Brotcrunsher:HintNoSpace changing 1 files +2 −0
  1. Brotcrunsher commented at 5:34 pm on May 1, 2025: contributor

    When running the configuration step

    cmake -B build --preset vs2022-static
    

    from a directory with spaces in its path, CMake issues the following warning:

    Warning: Paths with embedded space may be handled incorrectly by configure
    

    The build subsequently fails with error code 77.

    While the underlying issue should ideally be resolved, this hint may help users avoid related build failures in the meantime.

  2. DrahtBot commented at 5:34 pm on May 1, 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/32397.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  3. DrahtBot added the label Docs on May 1, 2025
  4. laanwj commented at 6:44 pm on May 1, 2025: member

    That’s too bad, we’d finally solved all the build-with-spaces issues with the old build system.

    But yes i suppose it doesn’t hurt too add a warning in the meantime…

  5. hebasto commented at 7:19 pm on May 1, 2025: member

    from a directory with spaces in its path, CMake issues the following warning:

    0Warning: Paths with embedded space may be handled incorrectly by configure
    

    This is a vcpkg upstream issue. Another one has already been documented: https://github.com/bitcoin/bitcoin/blob/5b8046a6e893b7fad5a93631e6d1e70db31878af/doc/build-windows-msvc.md?plain=1#L61-L71

    This is not specific to CMake in general, nor to the Bitcoin Core build system.

  6. hebasto added the label Upstream on May 1, 2025
  7. Add hint about avoiding spaces in paths when building on Windows
    When running the configuration step
        cmake -B build --preset vs2022-static
    from a directory with spaces in its path, vcpkg issues the following warning:
    
        Warning: Paths with embedded space may be handled incorrectly by configure
    
    The build subsequently fails with error code 77.
    
    While the underlying issue should ideally be resolved, this hint may help users avoid related build failures in the meantime.
    204128483f
  8. Brotcrunsher force-pushed on May 1, 2025
  9. Brotcrunsher commented at 7:29 pm on May 1, 2025: contributor
    @hebasto Thanks for your feedback! I fixed the wording in the commit message to mention vcpkg instead of CMake. I agree that this isn’t Bitcoin Cores fault, but IMO it would still be “nice” for new devs to have a warning in place. Might save them a minor headache.
  10. hebasto added the label Windows on May 1, 2025
  11. laanwj commented at 11:05 am on May 2, 2025: member

    This is not specific to CMake in general, nor to the Bitcoin Core build system.

    Happy about that. i know it was something we explicitly considered and tested when going to CMake so hence my surprise.

    In general, Windows users are the most likely to have spaces in any path they’re allowed to write to. For example, from that iconv vcpkg issue:

    That would require me to reinstall my entire operating system (Windows 11 setup asks you for your name and then sets the user folder name to that, including spaces). Not sure if that is something that should be accounted for within vcpkg or within Windows itself

    So hope this will get resolved upstream sooner than this documentation change would make it into a release.

  12. Brotcrunsher commented at 11:18 am on May 2, 2025: contributor
    @laanwj I don’t think that the time of the next release is necessarily the important thing here. This is documentation about how to build bitcoin core, which I assume is often done with the master of this repo.
  13. fanquake commented at 12:04 pm on May 2, 2025: member
    It’s not clear what is failing to build? If it is libiconv, how is that related to our build; is this something we can just avoid? In either case, please adjust the hint to be explcit about spaces being unsupported, and remove vaugeries like “they have been known to cause build issues.”. Either spaces are supported, in which case we can test the behaviour, or they are not supported.
  14. hebasto commented at 12:25 pm on May 2, 2025: member

    It’s not clear what is failing to build? If it is libiconv, how is that related to our build; is this something we can just avoid?

    libiconv is listed as a direct dependency of the qt package (see the output of vcpkg depend-info qt).

  15. hebasto commented at 1:19 pm on May 2, 2025: member
    According to the vcpkg docs, the default install directory (${CMAKE_BINARY_DIR}\vcpkg_installed) can be overridden by setting the VCPKG_INSTALLED_DIR variable to a path that contains no spaces. This resolves the issue.

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-05-05 12:12 UTC

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