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

issue fanquake openend 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:

     0cmake -B build --toolchain /root/ci_scratch/depends/x86_64-w64-mingw32/toolchain.cmake -DCMAKE_INSTALL_PREFIX=/root/testing
     1cmake --build build --target deploy
     2
     3cmake --install build
     4-- Install configuration: "RelWithDebInfo"
     5-- Installing: /root/testing/bin/bitcoin-wallet.exe
     6-- Installing: /root/testing/share/man/man1/bitcoin-wallet.1
     7-- Installing: /root/testing/bin/bitcoind.exe
     8-- Installing: /root/testing/share/man/man1/bitcoind.1
     9-- Installing: /root/testing/bin/bitcoin-cli.exe
    10-- Installing: /root/testing/share/man/man1/bitcoin-cli.1
    11-- Installing: /root/testing/bin/bitcoin-tx.exe
    12-- Installing: /root/testing/share/man/man1/bitcoin-tx.1
    13-- Installing: /root/testing/bin/bitcoin-util.exe
    14-- Installing: /root/testing/share/man/man1/bitcoin-util.1
    15-- Installing: /root/testing/bin/bitcoin-qt.exe
    16-- Installing: /root/testing/share/man/man1/bitcoin-qt.1
    17CMake Error at build/src/qt/test/cmake_install.cmake:41 (file):
    18  file INSTALL cannot find
    19  "/root/ci_scratch/build/src/qt/test/test_bitcoin-qt.exe": No such file or
    20  directory.
    21Call Stack (most recent call first):
    22  build/src/qt/cmake_install.cmake:56 (include)
    23  build/src/cmake_install.cmake:142 (include)
    24  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:

    0cmake -B build --toolchain /root/ci_scratch/depends/x86_64-w64-mingw32/toolchain.cmake -DCMAKE_INSTALL_PREFIX=/root/testing
    1cmake --build build --target deploy
    2cmake --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: 2025-05-11 15:12 UTC

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