build: cmake --install fails after --target deploy #32007

issue fanquake opened this issue on March 6, 2025
  1. fanquake commented at 10:42 AM on March 6, 2025: member

    Somewhat similar to #31745. If you build --target deploy and then try and cmake --install, it will fail:

    cmake -B build --toolchain /root/ci_scratch/depends/x86_64-w64-mingw32/toolchain.cmake -DCMAKE_INSTALL_PREFIX=/root/testing
    cmake --build build --target deploy
    
    cmake --install build
    -- Install configuration: "RelWithDebInfo"
    -- Installing: /root/testing/bin/bitcoin-wallet.exe
    -- Installing: /root/testing/share/man/man1/bitcoin-wallet.1
    -- Installing: /root/testing/bin/bitcoind.exe
    -- Installing: /root/testing/share/man/man1/bitcoind.1
    -- Installing: /root/testing/bin/bitcoin-cli.exe
    -- Installing: /root/testing/share/man/man1/bitcoin-cli.1
    -- Installing: /root/testing/bin/bitcoin-tx.exe
    -- Installing: /root/testing/share/man/man1/bitcoin-tx.1
    -- Installing: /root/testing/bin/bitcoin-util.exe
    -- Installing: /root/testing/share/man/man1/bitcoin-util.1
    -- Installing: /root/testing/bin/bitcoin-qt.exe
    -- Installing: /root/testing/share/man/man1/bitcoin-qt.1
    CMake Error at build/src/qt/test/cmake_install.cmake:41 (file):
      file INSTALL cannot find
      "/root/ci_scratch/build/src/qt/test/test_bitcoin-qt.exe": No such file or
      directory.
    Call Stack (most recent call first):
      build/src/qt/cmake_install.cmake:56 (include)
      build/src/cmake_install.cmake:142 (include)
      build/cmake_install.cmake:52 (include)
    

    Maybe this isn't a supported workflow? Not completely sure, but I can imagine someone running into this after using the Windows build docs. I did testing #32002.

  2. hebasto commented at 7:45 AM on March 7, 2025: member

    I think this behaviour is expected since test_bitcoin-qt.exe is not part of the Windows installer and is not required for the deploy target.

    Additionally, in WINDOWS BUILD NOTES, cmake --install build follows cmake --build build, and this sequence always works.

  3. fanquake commented at 9:37 AM on March 7, 2025: member

    Note that this isn't Windows specific. The same happens for macOS build.

  4. willcl-ark added the label Build system on Mar 19, 2025
  5. hebasto commented at 3:30 PM on May 8, 2025: member

    From the CMake docs:

    By default, the install target depends on the all target. This has the effect, that when make install is invoked or INSTALL is built, first the all target is built, then the installation starts.

    On the other hand, the cmake --install <dir> command:

    ... may be used after building a project to run installation without using the generated build system or the native build tool.

    Therefore, I’d say that the workflow described in the OP is unsupported. However, the user could instead use the following one:

    cmake -B build --toolchain /root/ci_scratch/depends/x86_64-w64-mingw32/toolchain.cmake -DCMAKE_INSTALL_PREFIX=/root/testing
    cmake --build build --target deploy
    cmake --build build --target install
    
  6. fanquake closed this on May 8, 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: 2026-04-17 03:12 UTC

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