build: Create `noinst_LTLIBRARIES` conditionally #25037

pull hebasto wants to merge 4 commits into bitcoin:master from hebasto:220429-targets changing 2 files +44 −5
  1. hebasto commented at 10:54 PM on April 29, 2022: member

    After #24322, libraries, which were promoted from EXTRA_LIBRARIES to noinst_LTLIBRARIES, are built regardless whether they are actually required as dependencies.

    This PR makes build system to create such libraries conditionally.

    Some other improvements of configure.ac are incorporated in this PR.

    A use case example:

    • on master (9ba73758c908ce0c49f1bd9727ea496958e24d54)
    ./configure \
      --disable-tests \
      --disable-bench \
      --without-libs \
      --without-daemon \
      --without-gui \
      --disable-fuzz-binary \
      --without-utils \
      --enable-util-util
    ...
    configure: error: No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui --enable-fuzz(-binary) --enable-bench or --enable-tests
    
    • with this PR the configure script finishes successfully, and the bitcoin-util binary can be built.
  2. DrahtBot added the label Build system on Apr 30, 2022
  3. DrahtBot commented at 4:20 AM on April 30, 2022: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #26824 (build: fix configuring with only bitcoin-util by fanquake)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  4. maflcko added the label DrahtBot Guix build requested on Jun 22, 2022
  5. DrahtBot added the label Needs rebase on Jun 22, 2022
  6. build: Add `UPDATE_TARGET_LIST` macro 00b70f005b
  7. build: Improve "No targets" detection
    This change fixes detection of situation when a user provides no targets
    to build. For example, now it is possible to build `bitcoin-util` only.
    48e7803f2d
  8. build: Refactor evaluation of `use_boost` variable d15b34d446
  9. build: Create `noinst_LTLIBRARIES` conditionally
    Otherwise, they are built regardless whether they are required as
    dependencies.
    6f77d03c5a
  10. hebasto force-pushed on Jul 27, 2022
  11. hebasto commented at 10:55 AM on July 27, 2022: member

    Rebased 64343397fafa3f2587f1334c411b7d65ef3edb13 -> 6f77d03c5a40e05c9ee81a79e380af8eacdf8fc7 (pr25037.01 -> pr25037.02) due to the conflict with #24291.

  12. DrahtBot removed the label Needs rebase on Jul 27, 2022
  13. DrahtBot commented at 8:52 AM on July 28, 2022: contributor

    <!--9cd9c72976c961c55c7acef8f6ba82cd-->

    Guix builds

    File commit 207a22877330709e4462e6092c265ab55c8653ac<br>(master) commit 0f8a36e961bc9b05cbdb4c158770514658cbcba3<br>(master and this pull)
    SHA256SUMS.part 6b3102ab53e0b793... 8f92726f91679db3...
    *-aarch64-linux-gnu-debug.tar.gz 8ec54e2536417257... cb0958694be0a860...
    *-aarch64-linux-gnu.tar.gz 0dda4b9ddb6e3723... 394965e6747a1224...
    *-arm-linux-gnueabihf-debug.tar.gz 0ab423a33c337179... 9e2908b225f7c1b3...
    *-arm-linux-gnueabihf.tar.gz 406cbba0aaa2f1da... 8e1e93dc390de9ec...
    *-arm64-apple-darwin-unsigned.dmg d27c92781e3ed97d... 6662b4228a1a1e36...
    *-arm64-apple-darwin-unsigned.tar.gz 793c142ecbf1232e... 18ef21fe71a943e5...
    *-arm64-apple-darwin.tar.gz 3d4d8ab65302a535... e35f98d68300ff01...
    *-powerpc64-linux-gnu-debug.tar.gz a50ac273219e388a... 4bb488f0f822ac72...
    *-powerpc64-linux-gnu.tar.gz 3422cd46c6173a46... 43451d474edac71c...
    *-powerpc64le-linux-gnu-debug.tar.gz 0868d8e2e8fdd9a7... 9ed6be06f75ada1a...
    *-powerpc64le-linux-gnu.tar.gz 23e33691640c7ac8... e164b61b99b72d2e...
    *-riscv64-linux-gnu-debug.tar.gz 2f5bb7e276245b55... c23050cd67727af8...
    *-riscv64-linux-gnu.tar.gz 4ee836f63bf92751... 5f0f0441198448ae...
    *-win64-debug.zip e147a82769c2e3ba... 6bdf01d1c14f41e2...
    *-win64-setup-unsigned.exe 9051cb9870b5330e... 3583542e8871012d...
    *-win64-unsigned.tar.gz 3561608217c7f504... b00259331245f0cc...
    *-win64.zip 37ba8b813661cec2... dc8b64207e5a0ed8...
    *-x86_64-apple-darwin-unsigned.dmg 80891b5bbbe61d46... 34836371903353f4...
    *-x86_64-apple-darwin-unsigned.tar.gz 716c1ed695d78460... 3c86da170a5b05dd...
    *-x86_64-apple-darwin.tar.gz fccf2ccded08c6cf... f783a4d5c14d6c25...
    *-x86_64-linux-gnu-debug.tar.gz ad1d6eeed71d8a6a... 9723e0e0a1199d62...
    *-x86_64-linux-gnu.tar.gz 2154cfe4a1459ffc... dfbc407817503f90...
    *.tar.gz df32b01715124731... 4af6f2809addb1a6...
    guix_build.log be2f97f8040e337a... 1a5e81ad25b57d42...
    guix_build.log.diff 1361bd92fbebaa1b...
  14. DrahtBot removed the label DrahtBot Guix build requested on Jul 28, 2022
  15. jarolrod commented at 9:07 AM on November 21, 2022: member

    GUIX hashes

    x86:

    cfa84024dae05de0c5f0330bb85c38c7bb10a6e70232fc13277b729d97924b37  guix-build-6f77d03c5a40/output/aarch64-linux-gnu/SHA256SUMS.part
    3b5616e879009fc55f3c9952083cb5372ad360f997ac4c0e1adb1c08c0cb18c0  guix-build-6f77d03c5a40/output/aarch64-linux-gnu/bitcoin-6f77d03c5a40-aarch64-linux-gnu-debug.tar.gz
    1f5732b5c46ec950472392b272c70aad3929b51537d1c9e17e5c97771726f20f  guix-build-6f77d03c5a40/output/aarch64-linux-gnu/bitcoin-6f77d03c5a40-aarch64-linux-gnu.tar.gz
    c7eed7f5ab292c17c35468b008593edddb5eb79878d791df5e60aa86ab45be1b  guix-build-6f77d03c5a40/output/arm-linux-gnueabihf/SHA256SUMS.part
    e8f44f3440833580078c03b8b2f3f1cc7e3da5b427c04260403a438b47c9f0db  guix-build-6f77d03c5a40/output/arm-linux-gnueabihf/bitcoin-6f77d03c5a40-arm-linux-gnueabihf-debug.tar.gz
    47892f328189b72e9fce4ea6b924629433f44bfb09be1af841604e9866ad265a  guix-build-6f77d03c5a40/output/arm-linux-gnueabihf/bitcoin-6f77d03c5a40-arm-linux-gnueabihf.tar.gz
    0c62238cc0bc039c9ae491b6d284424dd934ac34689490fbc19f41bf71aae3a6  guix-build-6f77d03c5a40/output/arm64-apple-darwin/SHA256SUMS.part
    2cafdef84531ec6ad90b7e05f138e6d72d67d3960f58555f9dba9469bf759f74  guix-build-6f77d03c5a40/output/arm64-apple-darwin/bitcoin-6f77d03c5a40-arm64-apple-darwin-unsigned.dmg
    f95b9969128cec7ce4e4be194f07a97b4e46bc79d454598a5fecb97ba95e0e18  guix-build-6f77d03c5a40/output/arm64-apple-darwin/bitcoin-6f77d03c5a40-arm64-apple-darwin-unsigned.tar.gz
    bfd351156e265dfe6afcfdd078072108a4207be002f746a13774047bf26f9a26  guix-build-6f77d03c5a40/output/arm64-apple-darwin/bitcoin-6f77d03c5a40-arm64-apple-darwin.tar.gz
    cdadd8db8791f31b1e6308eabeb5cb71c2ee9928e22abc543ec22f9d1af79262  guix-build-6f77d03c5a40/output/dist-archive/bitcoin-6f77d03c5a40.tar.gz
    13d5a1867ad8267ea3086adce221141ab9cb61a1c03ffdcceec1f48225ad7ae6  guix-build-6f77d03c5a40/output/powerpc64-linux-gnu/SHA256SUMS.part
    f762f2fdf2f7d7df0a24eb327c1b7670addfd1eb9565e456b8df8204bf0be875  guix-build-6f77d03c5a40/output/powerpc64-linux-gnu/bitcoin-6f77d03c5a40-powerpc64-linux-gnu-debug.tar.gz
    dc93dea45e57dc773980b0859caf5dbc2413fc4f11750fb3e0c2f7a26bba6480  guix-build-6f77d03c5a40/output/powerpc64-linux-gnu/bitcoin-6f77d03c5a40-powerpc64-linux-gnu.tar.gz
    284eb5e3ed87ffad15da865d2db63a8a6bffa737668c0c9e3ea269e5addf3e96  guix-build-6f77d03c5a40/output/powerpc64le-linux-gnu/SHA256SUMS.part
    33e700e00c40d2b3eb1fc154e7aa05c660d2b82b5e50eca2046f7ab2b8394723  guix-build-6f77d03c5a40/output/powerpc64le-linux-gnu/bitcoin-6f77d03c5a40-powerpc64le-linux-gnu-debug.tar.gz
    2d84ddea89b3992ed98411cb3393ab88f5f7e1aa1de71bc4e366cb72a9a735e3  guix-build-6f77d03c5a40/output/powerpc64le-linux-gnu/bitcoin-6f77d03c5a40-powerpc64le-linux-gnu.tar.gz
    24ac795340185f9692414cc60547e5a6ddd836878fba1fb7fabe5dd09a11ec73  guix-build-6f77d03c5a40/output/riscv64-linux-gnu/SHA256SUMS.part
    afa9bd56dca6fd4724f2e724be3b385df33d71819ff711be806b1da69bb69276  guix-build-6f77d03c5a40/output/riscv64-linux-gnu/bitcoin-6f77d03c5a40-riscv64-linux-gnu-debug.tar.gz
    6b147f44e7f6bc020e9c1d2e1b1bb1d0570678e7f79d7951412dc286f387b86b  guix-build-6f77d03c5a40/output/riscv64-linux-gnu/bitcoin-6f77d03c5a40-riscv64-linux-gnu.tar.gz
    93bfe759fd41b673fcf777fb8549334265aa1186f92ef07005a4915ec9a90d8f  guix-build-6f77d03c5a40/output/x86_64-apple-darwin/SHA256SUMS.part
    68e5ed0e70e57a519a144f7a402bd2dc6c4d8da33c242ec9271c93fcfd5b6c72  guix-build-6f77d03c5a40/output/x86_64-apple-darwin/bitcoin-6f77d03c5a40-x86_64-apple-darwin-unsigned.dmg
    4e6a886612ce09efecfa7f05bd7dcc54d700943f627fd2df0f965451688645f3  guix-build-6f77d03c5a40/output/x86_64-apple-darwin/bitcoin-6f77d03c5a40-x86_64-apple-darwin-unsigned.tar.gz
    57586a51eb8eafeb654a9e771c2f5bfb1a6495a5cf956bc6584c2d274ab164fa  guix-build-6f77d03c5a40/output/x86_64-apple-darwin/bitcoin-6f77d03c5a40-x86_64-apple-darwin.tar.gz
    9049d487adc08aa0d767fb5b9b0f55e0f980db1587c6d609fc8b60d9c40ea98b  guix-build-6f77d03c5a40/output/x86_64-linux-gnu/SHA256SUMS.part
    d8b3f30bf6e181f7bba63788ca7dde297c0b197877ab9b43b97e5c1b0b53b3dd  guix-build-6f77d03c5a40/output/x86_64-linux-gnu/bitcoin-6f77d03c5a40-x86_64-linux-gnu-debug.tar.gz
    abacdbb32354a1d5e99736d04fa756aa572bef6592e13ed8d89e623a6f6c10eb  guix-build-6f77d03c5a40/output/x86_64-linux-gnu/bitcoin-6f77d03c5a40-x86_64-linux-gnu.tar.gz
    5926d8d97cf8f60bad6324da44712107bced947686432ca029bdcad69a2cbe26  guix-build-6f77d03c5a40/output/x86_64-w64-mingw32/SHA256SUMS.part
    2ea8976e6d756fbaa1d2b16004621a271c664c804dcf3ef620830411f0a00841  guix-build-6f77d03c5a40/output/x86_64-w64-mingw32/bitcoin-6f77d03c5a40-win64-debug.zip
    cbf4e3affc3ee6dedaf4ec9fc8810abcbba33a1933a83a65e74669b790f792e1  guix-build-6f77d03c5a40/output/x86_64-w64-mingw32/bitcoin-6f77d03c5a40-win64-setup-unsigned.exe
    819f773b43ab5ae13efda7a1caed44894d1a268d08959bc0b497a9d7a24d32cd  guix-build-6f77d03c5a40/output/x86_64-w64-mingw32/bitcoin-6f77d03c5a40-win64-unsigned.tar.gz
    361d404499403f318970ed6b1706cecb827a986053b0607c7c5eb2617302f2fd  guix-build-6f77d03c5a40/output/x86_64-w64-mingw32/bitcoin-6f77d03c5a40-win64.zip
    
  16. fanquake commented at 2:30 PM on December 5, 2022: member

    ~0. I don't think introducing the macro, and tying it into the boost usage check is much of an improvement. It also means it becomes harder to remove targets from that list when they become Boost-free?

    The bitcoin-util bug (i.e configure failing with the invocation from the PR description), can be fixed with this diff:

    diff --git a/configure.ac b/configure.ac
    index 541f31e3f0..d00b2dbdba 100644
    --- a/configure.ac
    +++ b/configure.ac
    @@ -1870,7 +1870,7 @@ else
       AC_MSG_RESULT([no])
     fi
     
    -if test "$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$enable_fuzz_binary$use_bench$use_tests" = "nonononononononono"; then
    +if test "$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_util$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$enable_fuzz_binary$use_bench$use_tests" = "nononononononononono"; then
       AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui --enable-fuzz(-binary) --enable-bench or --enable-tests])
     fi
    
  17. fanquake referenced this in commit 0f883df7a5 on Jan 5, 2023
  18. hebasto commented at 3:10 PM on January 13, 2023: member

    Closing in favour of #26824.

  19. hebasto closed this on Jan 13, 2023

  20. fanquake referenced this in commit 8915e4d9f5 on Jan 13, 2023
  21. aguycalled referenced this in commit 1184856133 on Jan 27, 2023
  22. bitcoin locked this on Jan 13, 2024

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-22 12:14 UTC

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