build: actually fail when Boost is missing #21205

pull fanquake wants to merge 2 commits into bitcoin:master from fanquake:actually_fail_when_boost_missing changing 6 files +7 −10
  1. fanquake commented at 1:46 AM on February 17, 2021: member

    If Boost is not found via AX_BOOST_BASE, we don't actually stop configuring, only a warning is emitted:

    checking for boostlib >= 1.58.0 (105800)... configure: We could not detect the boost libraries (version MINIMUM_REQUIRED_BOOST or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option.  If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.
    

    Instead we usually fail when one of the other AX_BOOST_* macros fails to find a library. These macros are slowly being removed, and in any case, it makes more sense to fail earlier if Boost is missing.

    If Boost is unavailable, the failure now looks like:

    checking for boostlib >= 1.58.0 (105800)... configure: We could not detect the boost libraries (version 1.58.0 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option.  If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.
    configure: error: Boost is not available!
    

    Note that we now just pass the version into AX_BOOST_BASE, which fixes it's display in the output (rather than showing MINIMUM_REQUIRED_BOOST).

    This PR also has a commit that adds libboost-dev to our install instructions and CI. This package is currently installed as a side-effect of installing our other libboost-*-dev packages. However as those continue to disappear, it makes sense to install boost-dev explicitly.

  2. build: explicitly install libboost-dev package
    This package is currently installed as a side-effect of installing our
    other libboost-*-dev packages. However as those continue to dissapear,
    it makes sense to install boost dev explicitly.
    cad8b527ea
  3. build: actually stop configure if Boost isn't available
    If Boost is not found via AX_BOOST_BASE, we don't actually stop
    configuring, only a warning is emitted:
    ```bash
    checking for boostlib >= 1.58.0 (105800)... configure: We could not detect the boost libraries (version MINIMUM_REQUIRED_BOOST or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option.  If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.
    ```
    
    Instead we would usually fail when one of the other
    AX_BOOST_* macros fails to find a library. These macros are slowly being
    removed, and in any case, it makes more sense to fail earlier if Boost
    is missing.
    
    If Boost is unavailable, the failure now looks like:
    ```bash
    checking for boostlib >= 1.58.0 (105800)... configure: We could not detect the boost libraries (version 1.58.0 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option.  If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.
    configure: error: Boost is not available!
    ```
    
    Note that we now just pass the version into AX_BOOST_BASE, which fixes
    it's display in the output (rather than MINIMUM_REQUIRED_BOOST).
    c5da2749e2
  4. fanquake added the label Build system on Feb 17, 2021
  5. DrahtBot commented at 10:27 AM on February 17, 2021: member

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #20744 ([POC] Use std::filesystem. Remove Boost Filesystem & System 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.

  6. in ci/test/00_setup_env_native_asan.sh:10 in c5da2749e2
       6 | @@ -7,7 +7,7 @@
       7 |  export LC_ALL=C.UTF-8
       8 |  
       9 |  export CONTAINER_NAME=ci_native_asan
      10 | -export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-test-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libqrencode-dev libsqlite3-dev"
      11 | +export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libqrencode-dev libsqlite3-dev"
    


    laanwj commented at 12:32 PM on February 17, 2021:

    Isn't libboost-dev an umbrella package forl all of boost?


    fanquake commented at 12:58 PM on February 17, 2021:

    Yes. Note that it's currently already being installed, as a side-effect of either libbost-filesystem-dev or libboost-system-dev. However, once we are no-longer installing those packages, i.e post #20744, users will still need to install the boost headers, for multi-index, process etc. As far as I can, tell, libboost-dev is the leanest way to achieve that. There is no libbbost-muti-index-dev, or libboost-process-dev packages or similar from what I can find, that we could selectively use to install just the components we want.

    In a clean Ubuntu Focal vm if you compare libboost-dev to libboost-all-dev, the difference is quite substantial:

    apt install libboost-dev

    The following NEW packages will be installed:
      gcc-7-base gcc-8-base libasan4 libatomic1 libboost-dev libboost1.71-dev libc-dev-bin libc6-dev libcilkrts5 libcrypt-dev libgcc-7-dev libgomp1
      libitm1 liblsan0 libmpx2 libquadmath0 libstdc++-7-dev libtsan0 libubsan0 linux-libc-dev manpages manpages-dev
    

    apt install libboost-all-dev

    The following NEW packages will be installed:
      autoconf automake autotools-dev binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-8 cpp-9 file gcc gcc-7-base gcc-8 gcc-8-base gcc-9
      gcc-9-base gfortran gfortran-8 gfortran-9 ibverbs-providers icu-devtools krb5-locales libasan4 libasan5 libatomic1 libbinutils libboost-all-dev
      libboost-atomic-dev libboost-atomic1.71-dev libboost-atomic1.71.0 libboost-chrono-dev libboost-chrono1.71-dev libboost-chrono1.71.0
      libboost-container-dev libboost-container1.71-dev libboost-container1.71.0 libboost-context-dev libboost-context1.71-dev libboost-context1.71.0
      libboost-coroutine-dev libboost-coroutine1.71-dev libboost-coroutine1.71.0 libboost-date-time-dev libboost-date-time1.71-dev
      libboost-date-time1.71.0 libboost-dev libboost-exception-dev libboost-exception1.71-dev libboost-fiber-dev libboost-fiber1.71-dev
      libboost-fiber1.71.0 libboost-filesystem-dev libboost-filesystem1.71-dev libboost-filesystem1.71.0 libboost-graph-dev
      libboost-graph-parallel-dev libboost-graph-parallel1.71-dev libboost-graph-parallel1.71.0 libboost-graph1.71-dev libboost-graph1.71.0
      libboost-iostreams-dev libboost-iostreams1.71-dev libboost-iostreams1.71.0 libboost-locale-dev libboost-locale1.71-dev libboost-locale1.71.0
      libboost-log-dev libboost-log1.71-dev libboost-log1.71.0 libboost-math-dev libboost-math1.71-dev libboost-math1.71.0 libboost-mpi-dev
      libboost-mpi-python-dev libboost-mpi-python1.71-dev libboost-mpi-python1.71.0 libboost-mpi1.71-dev libboost-mpi1.71.0 libboost-numpy-dev
      libboost-numpy1.71-dev libboost-numpy1.71.0 libboost-program-options-dev libboost-program-options1.71-dev libboost-program-options1.71.0
      libboost-python-dev libboost-python1.71-dev libboost-python1.71.0 libboost-random-dev libboost-random1.71-dev libboost-random1.71.0
      libboost-regex-dev libboost-regex1.71-dev libboost-regex1.71.0 libboost-serialization-dev libboost-serialization1.71-dev
      libboost-serialization1.71.0 libboost-stacktrace-dev libboost-stacktrace1.71-dev libboost-stacktrace1.71.0 libboost-system-dev
      libboost-system1.71-dev libboost-system1.71.0 libboost-test-dev libboost-test1.71-dev libboost-test1.71.0 libboost-thread-dev
      libboost-thread1.71-dev libboost-thread1.71.0 libboost-timer-dev libboost-timer1.71-dev libboost-timer1.71.0 libboost-tools-dev
      libboost-type-erasure-dev libboost-type-erasure1.71-dev libboost-type-erasure1.71.0 libboost-wave-dev libboost-wave1.71-dev libboost-wave1.71.0
      libboost1.71-dev libboost1.71-tools-dev libbsd0 libc-dev-bin libc6-dev libcaf-openmpi-3 libcbor0.6 libcc1-0 libcilkrts5 libcoarrays-dev
      libcoarrays-openmpi-dev libcrypt-dev libctf-nobfd0 libctf0 libedit2 libevent-2.1-7 libevent-core-2.1-7 libevent-dev libevent-extra-2.1-7
      libevent-openssl-2.1-7 libevent-pthreads-2.1-7 libexpat1 libexpat1-dev libfabric1 libfido2-1 libgcc-7-dev libgcc-8-dev libgcc-9-dev
      libgdbm-compat4 libgdbm6 libgfortran-8-dev libgfortran-9-dev libgfortran5 libgomp1 libgssapi-krb5-2 libhwloc-dev libhwloc-plugins libhwloc15
      libibverbs-dev libibverbs1 libicu-dev libicu66 libisl22 libitm1 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 liblsan0 libltdl-dev
      libltdl7 libmagic-mgc libmagic1 libmpc3 libmpdec2 libmpfr6 libmpx2 libnl-3-200 libnl-3-dev libnl-route-3-200 libnl-route-3-dev libnuma-dev
      libnuma1 libopenmpi-dev libopenmpi3 libpciaccess0 libperl5.30 libpmix2 libpsm-infinipath1 libpsm2-2 libpython3-dev libpython3-stdlib
      libpython3.8 libpython3.8-dev libpython3.8-minimal libpython3.8-stdlib libquadmath0 librdmacm1 libreadline8 libsigsegv2 libsqlite3-0 libssl1.1
      libstdc++-7-dev libtool libtsan0 libubsan0 libubsan1 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxml2 libxmuu1 libxnvctrl0
      linux-libc-dev m4 manpages manpages-dev mime-support mpi-default-bin mpi-default-dev netbase ocl-icd-libopencl1 openmpi-bin openmpi-common
      openssh-client perl perl-modules-5.30 python3 python3-dev python3-distutils python3-lib2to3 python3-minimal python3.8 python3.8-dev
      python3.8-minimal readline-common tzdata xauth xz-utils zlib1g-dev
    

    laanwj commented at 12:25 PM on February 18, 2021:

    I guess that makes the answer to my question 'no' — libboost-all-dev is the umbrella package that I meant. libboost-dev is like "boost miscellaneous" which is okay.

  7. laanwj commented at 12:27 PM on February 18, 2021: member

    Code review ACK c5da2749e2f7375e292fb0982e8e252ae1adbce3

  8. MarcoFalke commented at 8:36 AM on February 19, 2021: member

    Concept ACK c5da2749e2f7375e292fb0982e8e252ae1adbce3

  9. fanquake merged this on Feb 19, 2021
  10. fanquake closed this on Feb 19, 2021

  11. fanquake deleted the branch on Feb 19, 2021
  12. sidhujag referenced this in commit a2f5a5167c on Feb 19, 2021
  13. DrahtBot locked this on Aug 16, 2022

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-26 06:14 UTC

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