build: cmake installs empty manpages for non-configured targets #31762

issue stickies-v openend this issue on January 30, 2025
  1. stickies-v commented at 10:38 am on January 30, 2025: contributor

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    When configuring cmake with a subset of targets (e.g. kernel-only), a blanket cmake --install will still install the placeholder manpages files for all other targets.

    For example:

    0cmake -B build -DBUILD_KERNEL_LIB=ON -DBUILD_BENCH=OFF -DBUILD_DAEMON=OFF -DBUILD_CLI=OFF -DBUILD_GUI=OFF -DBUILD_FUZZ_BINARY=OFF -DBUILD_TESTS=OFF -DBUILD_TX=OFF -DBUILD_UTIL=OFF -DBUILD_UTIL_CHAINSTATE=OFF -DBUILD_WALLET_TOOL=OFF -DENABLE_WALLET=OFF
    1cmake --build build -j
    2cmake --install build
    

    yields:

     0% cmake --install build
     1-- Install configuration: "RelWithDebInfo"
     2-- Installing: /usr/local/lib/pkgconfig/libbitcoinkernel.pc
     3-- Installing: /usr/local/lib/libbitcoinkernel.dylib
     4-- Up-to-date: /usr/local/share/man/man1
     5-- Installing: /usr/local/share/man/man1/bitcoin-util.1
     6-- Installing: /usr/local/share/man/man1/bitcoin-tx.1
     7-- Installing: /usr/local/share/man/man1/bitcoin-wallet.1
     8-- Installing: /usr/local/share/man/man1/bitcoin-qt.1
     9-- Installing: /usr/local/share/man/man1/bitcoin-cli.1
    10-- Installing: /usr/local/share/man/man1/bitcoind.1
    

    The manpages are just placeholders:

    0% cat /usr/local/share/man/man1/bitcoin-util.1
    1.TH BITCOIN-UTIL "1"
    2.SH NAME
    3bitcoin-util \- manual page for bitcoin-util
    4
    5This is a placeholder file. Please follow the instructions in \fIcontrib/devtools/README.md\fR to generate the manual pages after a release.
    

    This can be avoided by specifying the component, e.g. cmake --install build --component Kernel, but that shouldn’t be necessary.

    Expected behaviour

    The manpages of non-configured targets should not be installed.

    Steps to reproduce

    Described under “current behaviour”.

    Relevant log output

    No response

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    809d7e763cc9bdfff3288860a1c530460c76ffff

    Operating system and version

    macOS 14.3

    Machine specifications

    No response

  2. stickies-v renamed this:
    bug: cmake installs empty manpages for non-configured targets
    build: cmake installs empty manpages for non-configured targets
    on Jan 30, 2025
  3. fanquake added this to the milestone 29.0 on Jan 30, 2025
  4. fanquake added the label Build system on Jan 30, 2025
  5. fanquake closed this on Feb 14, 2025

  6. fanquake referenced this in commit 73e2ec1373 on Feb 14, 2025


stickies-v

Labels
Build system

Milestone
29.0


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