Failure to build with Boost 1.77 #22482

issue brad0 openend this issue on July 18, 2021
  1. brad0 commented at 2:09 am on July 18, 2021: none

    Build testing the OpenBSD ports tree with Boost 1.77 beta1. bitcoin 0.21.1 fails to build as shown..

    0wallet/test/init_test_fixture.cpp:34:52: error: no member named 'BOOST_FILESYSTEM_C_STR' in 'boost::filesystem::path'
    1    std::ofstream f(m_walletdir_path_cases["file"].BOOST_FILESYSTEM_C_STR);
    2                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    31 error generated.
    
  2. brad0 added the label Bug on Jul 18, 2021
  3. fanquake commented at 3:26 am on July 18, 2021: member
    Looks like there have been a large number of changes in the Filesystem library with the (beta) release of 1.77.0.
  4. MarcoFalke added the label Tests on Jul 18, 2021
  5. pjsnps commented at 5:19 am on July 21, 2021: none

    Complete noob here, sorry, but is this related?:

    On Centos 7, with Package boost-1.53.0-28.el7.x86_64 already installed and latest version Package boost-devel-1.53.0-28.el7.x86_64 already installed and latest version

     0In file included from /usr/include/boost/optional.hpp:15:0,
     1                 from ./optional.h:10,
     2                 from ./util/system.h:22,
     3                 from ./addrman.h:17,
     4                 from ./net.h:10,
     5                 from net.cpp:10:
     6/usr/include/boost/optional/optional.hpp: In instantiation of void boost::optional_detail::optional_base<T>::construct(const Expr&, const void*) [with Expr = CDataStream; T = CNetMessage]:
     7/usr/include/boost/optional/optional.hpp:262:25:   required from boost::optional_detail::optional_base<T>::optional_base(const Expr&, const Expr*) [with Expr = CDataStream; T = CNetMessage]
     8/usr/include/boost/optional/optional.hpp:559:78:   required from boost::optional<T>::optional(const Expr&) [with Expr = CDataStream; T = CNetMessage]
     9net.cpp:761:47:   required from here
    10/usr/include/boost/optional/optional.hpp:392:8: error: no matching function for call to CNetMessage::CNetMessage(const CDataStream&)
    11        new (m_storage.address()) internal_type(expr) ;
    12        ^
    13/usr/include/boost/optional/optional.hpp:392:8: note: candidates are:
    14In file included from net.cpp:10:0:
    15./net.h:742:5: note: CNetMessage::CNetMessage(CDataStream&&)
    16     CNetMessage(CDataStream&& recv_in) : m_recv(std::move(recv_in)) {}
    17     ^
    18./net.h:742:5: note:   no known conversion for argument 1 from const CDataStream to CDataStream&&
    19./net.h:734:7: note: CNetMessage::CNetMessage(const CNetMessage&)
    20 class CNetMessage {
    21       ^
    22./net.h:734:7: note:   no known conversion for argument 1 from const CDataStream to const CNetMessage&
    23./net.h:734:7: note: CNetMessage::CNetMessage(CNetMessage&&)
    24./net.h:734:7: note:   no known conversion for argument 1 from const CDataStream to CNetMessage&&
    25make[2]: *** [libbitcoin_server_a-net.o] Error 1
    26make[2]: Leaving directory `/home/pjalajas/Documents/dev/hub/test/projects/bitcoincore/bitcoin-0.21.1/src'
    27make[1]: *** [all-recursive] Error 1
    28make[1]: Leaving directory `/home/pjalajas/Documents/dev/hub/test/projects/bitcoincore/bitcoin-0.21.1/src'
    29make: *** [all-recursive] Error 1
    
  6. fanquake commented at 5:26 am on July 21, 2021: member

    Package boost-1.53.0

    That version of Boost is too old to build the 0.21 branch, Boost 1.58.0 or later is required. I’d suggest using depends if you’d like to compile Bitcoin Core on a system where it only packages very old versions of our dependencies.

  7. MarcoFalke added the label Upstream on Jul 21, 2021
  8. MarcoFalke commented at 7:58 am on July 21, 2021: member
    @brad0 Did you try reporting this upstream? Reading the release notes, it appears they didn’t intend to include braking changes in boost::fs 1.77 yet, unless I am missing something.
  9. pjsnps commented at 1:04 pm on July 21, 2021: none

    @fanquake worked like a charm, thanks!

    0 1786  2021-07-21 07:53:46 EDT Wed :: cd depends/
    1 1788  2021-07-21 07:54:04 EDT Wed :: make
    2 1789  2021-07-21 08:25:35 EDT Wed :: cd ..
    3 1793  2021-07-21 08:32:12 EDT Wed :: ./configure --prefix=/home/pjalajas/dev/hub/test/projects/bitcoincore/bitcoin-0.21.1/depends/x86_64-pc-linux-gnu && make test
    4 1794  2021-07-21 08:32:51 EDT Wed :: make
    5 1795  2021-07-21 09:01:06 EDT Wed :: history | tail -n 40
    
  10. hebasto commented at 9:12 am on August 20, 2021: member

    With the following diff

     0--- a/depends/packages/boost.mk
     1+++ b/depends/packages/boost.mk
     2@@ -1,8 +1,8 @@
     3 package=boost
     4-$(package)_version=1_71_0
     5+$(package)_version=1_77_0
     6 $(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$(subst _,.,$($(package)_version))/source/
     7 $(package)_file_name=boost_$($(package)_version).tar.bz2
     8-$(package)_sha256_hash=d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee
     9+$(package)_sha256_hash=fc9f85fc030e233142908241af7a846e60630aa7388de9a5fafb1f3a26840854
    10 $(package)_dependencies=native_b2
    11 
    12 define $(package)_set_vars
    

    I can confirm the issue:

    0wallet/test/init_test_fixture.cpp: In constructor InitWalletDirTestingSetup::InitWalletDirTestingSetup(const string&):
    1wallet/test/init_test_fixture.cpp:35:52: error: std::map<std::__cxx11::basic_string<char>, boost::filesystem::path>::mapped_type {aka class boost::filesystem::path} has no member named BOOST_FILESYSTEM_C_STR
    2   35 |     std::ofstream f(m_walletdir_path_cases["file"].BOOST_FILESYSTEM_C_STR);
    3      |                                                    ^~~~~~~~~~~~~~~~~~~~~~
    4make[2]: *** [Makefile:14782: wallet/test/test_test_bitcoin-init_test_fixture.o] Error 1
    
  11. hebasto commented at 9:35 am on August 20, 2021: member

    @brad0 Did you try reporting this upstream? Reading the release notes, it appears they didn’t intend to include braking changes in boost::fs 1.77 yet, unless I am missing something.

    FWIW, the change commit: https://github.com/boostorg/filesystem/commit/29ef7d683daeff81713eebb3dc17cb10e2dfc233

  12. fanquake closed this on Aug 26, 2021

  13. DrahtBot locked this on Aug 26, 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: 2024-12-19 00:12 UTC

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