doc: Boost minimum required (1.58) is wrong #21826

issue MarcoFalke opened this issue on May 1, 2021
  1. MarcoFalke commented at 9:00 PM on May 1, 2021: member

    Compiling on boost 1.58 is no longer possible.

    I get:

    make V=1
    Making all in src
    make[1]: Entering directory '/bitcoin/src'
    make[2]: Entering directory '/bitcoin/src'
    make[3]: Entering directory '/bitcoin'
    make[3]: Leaving directory '/bitcoin'
    /usr/bin/ccache clang++-8 -stdlib=libc++ -std=c++17 -DHAVE_CONFIG_H -I. -I../src/config   -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I. -I./secp256k1/include  -DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC -I/usr/include -I./leveldb/include -I./leveldb/helpers/memenv -I./univalue/include -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -DPROVIDE_FUZZ_MAIN_FUNCTION -fdebug-prefix-map=/bitcoin/src=. -Wstack-protector -fstack-protector-all -fcf-protection=full -Wall -Wextra -Wgnu -Wformat -Wformat-security -Wvla -Wshadow-field -Wswitch -Wthread-safety -Wrange-loop-analysis -Wredundant-decls -Wunused-variable -Wunused-member-function -Wdate-time -Wconditional-uninitialized -Wsign-compare -Woverloaded-virtual -Wunreachable-code-loop-increment -Wno-unused-parameter -Wno-self-assign -Wno-unused-local-typedef -Wno-implicit-fallthrough    -fPIE -g -O2 -MT bitcoind-bitcoind.o -MD -MP -MF .deps/bitcoind-bitcoind.Tpo -c -o bitcoind-bitcoind.o `test -f 'bitcoind.cpp' || echo './'`bitcoind.cpp
    clang: warning: argument unused during compilation: '-stdlib=libc++' [-Wunused-command-line-argument]
    In file included from bitcoind.cpp:14:
    In file included from ./interfaces/chain.h:9:
    In file included from ./util/settings.h:8:
    In file included from ./fs.h:14:
    In file included from /usr/include/boost/filesystem.hpp:16:
    In file included from /usr/include/boost/filesystem/path.hpp:29:
    In file included from /usr/include/boost/shared_ptr.hpp:17:
    In file included from /usr/include/boost/smart_ptr/shared_ptr.hpp:28:
    /usr/include/boost/smart_ptr/detail/shared_count.hpp:395:33: error: no template named 'auto_ptr' in namespace 'std'
        explicit shared_count( std::auto_ptr<Y> & r ): pi_( new sp_counted_impl_p<Y>( r.get() ) )
                               ~~~~~^
    In file included from bitcoind.cpp:14:
    In file included from ./interfaces/chain.h:9:
    In file included from ./util/settings.h:8:
    In file included from ./fs.h:14:
    In file included from /usr/include/boost/filesystem.hpp:16:
    In file included from /usr/include/boost/filesystem/path.hpp:29:
    In file included from /usr/include/boost/shared_ptr.hpp:17:
    /usr/include/boost/smart_ptr/shared_ptr.hpp:242:65: error: no member named 'auto_ptr' in namespace 'std'
    template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R >
                                                               ~~~~~^
    /usr/include/boost/smart_ptr/shared_ptr.hpp:242:75: error: 'T' does not refer to a value
    template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R >
                                                                              ^
    /usr/include/boost/smart_ptr/shared_ptr.hpp:242:17: note: declared here
    template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R >
                    ^
    /usr/include/boost/smart_ptr/shared_ptr.hpp:242:81: error: expected ';' at end of declaration
    template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R >
                                                                                    ^
    /usr/include/boost/smart_ptr/shared_ptr.hpp:242:82: error: expected unqualified-id
    template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R >
                                                                                     ^
    /usr/include/boost/smart_ptr/shared_ptr.hpp:441:31: error: no template named 'auto_ptr' in namespace 'std'
        explicit shared_ptr( std::auto_ptr<Y> & r ): px(r.get()), pn()
                             ~~~~~^
    /usr/include/boost/smart_ptr/shared_ptr.hpp:454:22: error: no template named 'auto_ptr' in namespace 'std'
        shared_ptr( std::auto_ptr<Y> && r ): px(r.get()), pn()
                    ~~~~~^
    /usr/include/boost/smart_ptr/shared_ptr.hpp:520:34: error: no template named 'auto_ptr' in namespace 'std'
        shared_ptr & operator=( std::auto_ptr<Y> & r )
                                ~~~~~^
    /usr/include/boost/smart_ptr/shared_ptr.hpp:529:34: error: no template named 'auto_ptr' in namespace 'std'
        shared_ptr & operator=( std::auto_ptr<Y> && r )
                                ~~~~~^
    /usr/include/boost/smart_ptr/shared_ptr.hpp:531:38: error: no template named 'auto_ptr' in namespace 'std'
            this_type( static_cast< std::auto_ptr<Y> && >( r ) ).swap( *this );
                                    ~~~~~^
    In file included from bitcoind.cpp:14:
    In file included from ./interfaces/chain.h:9:
    In file included from ./util/settings.h:8:
    In file included from ./fs.h:14:
    In file included from /usr/include/boost/filesystem.hpp:17:
    /usr/include/boost/filesystem/operations.hpp:130:38: error: cannot initialize object parameter of type 'const boost::system::system_error' with an expression of type 'const boost::filesystem::filesystem_error'
            return system::system_error::what();
                                         ^~~~
    /usr/include/boost/filesystem/operations.hpp:136:55: error: cannot initialize object parameter of type 'const boost::system::system_error' with an expression of type 'const boost::filesystem::filesystem_error'
                m_imp_ptr->m_what = system::system_error::what();
                                                          ^~~~
    /usr/include/boost/filesystem/operations.hpp:154:40: error: cannot initialize object parameter of type 'const boost::system::system_error' with an expression of type 'const boost::filesystem::filesystem_error'
              return system::system_error::what();
                                           ^~~~
    /usr/include/boost/filesystem/operations.hpp:946:39: error: no viable overloaded 'operator->'
              symlink_stat = m_stack.top()->symlink_status(ec);
                             ~~~~~~~~~~~~~^
    /usr/include/boost/iterator/iterator_facade.hpp:649:17: note: candidate function not viable: no known conversion from 'std::__1::__vector_base<boost::filesystem::directory_iterator, std::__1::allocator<boost::filesystem::directory_iterator> >::value_type' (aka 'boost::filesystem::directory_iterator') to 'const boost::iterators::detail::iterator_facade_base<boost::filesystem::directory_iterator, boost::filesystem::directory_entry, boost::iterators::single_pass_traversal_tag, boost::filesystem::directory_entry &, long, false, false>' for object argument
            pointer operator->() const
                    ^
    In file included from bitcoind.cpp:14:
    In file included from ./interfaces/chain.h:9:
    In file included from ./util/settings.h:8:
    In file included from ./fs.h:14:
    In file included from /usr/include/boost/filesystem.hpp:17:
    /usr/include/boost/filesystem/operations.hpp:954:43: error: no viable overloaded 'operator->'
              file_status stat = m_stack.top()->status(ec);
                                 ~~~~~~~~~~~~~^
    /usr/include/boost/iterator/iterator_facade.hpp:649:17: note: candidate function not viable: no known conversion from 'std::__1::__vector_base<boost::filesystem::directory_iterator, std::__1::allocator<boost::filesystem::directory_iterator> >::value_type' (aka 'boost::filesystem::directory_iterator') to 'const boost::iterators::detail::iterator_facade_base<boost::filesystem::directory_iterator, boost::filesystem::directory_entry, boost::iterators::single_pass_traversal_tag, boost::filesystem::directory_entry &, long, false, false>' for object argument
            pointer operator->() const
                    ^
    In file included from bitcoind.cpp:14:
    In file included from ./interfaces/chain.h:9:
    In file included from ./util/settings.h:8:
    In file included from ./fs.h:14:
    In file included from /usr/include/boost/filesystem.hpp:17:
    /usr/include/boost/filesystem/operations.hpp:958:48: error: no viable overloaded 'operator->'
              directory_iterator next(m_stack.top()->path(), ec);
                                      ~~~~~~~~~~~~~^
    /usr/include/boost/iterator/iterator_facade.hpp:649:17: note: candidate function not viable: no known conversion from 'std::__1::__vector_base<boost::filesystem::directory_iterator, std::__1::allocator<boost::filesystem::directory_iterator> >::value_type' (aka 'boost::filesystem::directory_iterator') to 'const boost::iterators::detail::iterator_facade_base<boost::filesystem::directory_iterator, boost::filesystem::directory_entry, boost::iterators::single_pass_traversal_tag, boost::filesystem::directory_entry &, long, false, false>' for object argument
            pointer operator->() const
                    ^
    In file included from bitcoind.cpp:14:
    In file included from ./interfaces/chain.h:9:
    In file included from ./util/settings.h:8:
    In file included from ./fs.h:14:
    In file included from /usr/include/boost/filesystem.hpp:17:
    /usr/include/boost/filesystem/operations.hpp:959:27: error: invalid operands to binary expression ('boost::filesystem::directory_iterator' and 'boost::filesystem::directory_iterator')
              if (!ec && next != directory_iterator())
                         ~~~~ ^  ~~~~~~~~~~~~~~~~~~~~
    /usr/include/boost/filesystem/path.hpp:669:15: note: candidate function not viable: no known conversion from 'boost::filesystem::directory_iterator' to 'const boost::filesystem::path' for 1st argument
      inline bool operator!=(const path& lhs, const path& rhs) {return lhs.compare(rhs) != 0;}
                  ^
    /usr/include/boost/filesystem/path.hpp:670:15: note: candidate function not viable: no known conversion from 'boost::filesystem::directory_iterator' to 'const boost::filesystem::path' for 1st argument
      inline bool operator!=(const path& lhs, const path::string_type& rhs) {return lhs.compare(rhs) != 0;}
                  ^
    /usr/include/boost/filesystem/path.hpp:671:15: note: candidate function not viable: no known conversion from 'boost::filesystem::directory_iterator' to 'const path::string_type' (aka 'const basic_string<char>') for 1st argument
      inline bool operator!=(const path::string_type& lhs, const path& rhs) {return rhs.compare(lhs) != 0;}
                  ^
    /usr/include/boost/filesystem/path.hpp:672:15: note: candidate function not viable: no known conversion from 'boost::filesystem::directory_iterator' to 'const boost::filesystem::path' for 1st argument
      inline bool operator!=(const path& lhs, const path::value_type* rhs) {return lhs.compare(rhs) != 0;}
                  ^
    /usr/include/boost/filesystem/path.hpp:673:15: note: candidate function not viable: no known conversion from 'boost::filesystem::directory_iterator' to 'const path::value_type *' (aka 'const char *') for 1st argument
      inline bool operator!=(const path::value_type* lhs, const path& rhs) {return rhs.compare(lhs) != 0;}
                  ^
    /usr/include/boost/iterator/iterator_facade.hpp:891:345: note: candidate template ignored: deduced type 'const iterator_facade<boost::filesystem::directory_iterator, boost::filesystem::directory_entry, boost::iterators::single_pass_traversal_tag, boost::filesystem::directory_entry &, long>' of 1st parameter does not match adjusted type 'boost::filesystem::directory_iterator' of argument [with Derived1 = boost::filesystem::directory_iterator, V1 = boost::filesystem::directory_entry, TC1 = boost::iterators::single_pass_traversal_tag, Reference1 = boost::filesystem::directory_entry &, Difference1 = long, Derived2 = boost::filesystem::directory_iterator, V2 = boost::filesystem::directory_entry, TC2 = boost::iterators::single_pass_traversal_tag, Reference2 = boost::filesystem::directory_entry &, Difference2 = long]
      template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::iterators::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2<boost::iterators::detail::always_bool2,Derived1,Derived2>::type >::type operator !=( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs) { static_assert(( is_interoperable< Derived1, Derived2 >::value ), "( is_interoperable< Derived1, Derived2 >::value )"); return ! iterator_core_access::equal( *static_cast<Derived1 const*>(&lhs) , *static_cast<Derived2 const*>(&rhs) , is_convertible<Derived2,Derived1>() ); }
                                                                                                                                                                                                                                                                                                                                                            ^
    In file included from bitcoind.cpp:14:
    In file included from ./interfaces/chain.h:9:
    In file included from ./util/settings.h:8:
    In file included from ./fs.h:14:
    In file included from /usr/include/boost/filesystem.hpp:17:
    /usr/include/boost/filesystem/operations.hpp:993:34: error: cannot increment value of type 'std::__1::__vector_base<boost::filesystem::directory_iterator, std::__1::allocator<boost::filesystem::directory_iterator> >::value_type' (aka 'boost::filesystem::directory_iterator')
          while (!m_stack.empty() && ++m_stack.top() == directory_iterator())
                                     ^ ~~~~~~~~~~~~~
    /usr/include/boost/filesystem/operations.hpp:1026:34: error: cannot increment value of type 'std::__1::__vector_base<boost::filesystem::directory_iterator, std::__1::allocator<boost::filesystem::directory_iterator> >::value_type' (aka 'boost::filesystem::directory_iterator')
          while (!m_stack.empty() && ++m_stack.top() == directory_iterator());
                                     ^ ~~~~~~~~~~~~~
    19 errors generated.
    Makefile:12175: recipe for target 'bitcoind-bitcoind.o' failed
    make[2]: *** [bitcoind-bitcoind.o] Error 1
    make[2]: Leaving directory '/bitcoin/src'
    Makefile:15330: recipe for target 'all-recursive' failed
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory '/bitcoin/src'
    Makefile:820: recipe for target 'all-recursive' failed
    make: *** [all-recursive] Error 1
    
  2. MarcoFalke added the label Bug on May 1, 2021
  3. MarcoFalke added the label Docs on May 1, 2021
  4. MarcoFalke commented at 7:22 AM on May 2, 2021: member

    1.65.1 works

  5. MarcoFalke commented at 8:43 AM on May 2, 2021: member

    1.62 fails for the same reason

  6. MarcoFalke added this to the milestone 22.0 on May 2, 2021
  7. hebasto commented at 11:14 AM on May 3, 2021: member

    Will defining BOOST_NO_AUTO_PTR macro solve std::auto_ptr part of issue?

  8. hebasto commented at 1:25 PM on May 3, 2021: member

    1.62 fails for the same reason

    Will defining BOOST_NO_AUTO_PTR macro solve std::auto_ptr part of issue?

    On Debian 9 with system boost 1.62:

    $ ./configure -q --disable-bench --disable-tests --without-gui --disable-wallet CPPFLAGS='-DBOOST_NO_AUTO_PTR' CC='/usr/bin/clang-7' CXX='/usr/bin/clang++-7 -stdlib=libc++'
    $ make
    ...
    ./util/system.cpp:1316: undefined reference to `boost::filesystem::path::imbue(std::__1::locale const&)'
    ./util/system.cpp:1318: undefined reference to `boost::filesystem::path::imbue(std::__1::locale const&)'
    ...
    
  9. hebasto commented at 2:43 PM on May 3, 2021: member

    FWIW, I modified the current master (b8593616dc2ab5b8f81edd8b2408d400e3b696cd) to build boost 1.58.0 in depends. Then I successfully built bitcoind and make check passed.

  10. MarcoFalke commented at 5:56 PM on May 3, 2021: member

    ok, closing for now

  11. MarcoFalke closed this on May 3, 2021

  12. DrahtBot locked this on Aug 18, 2022
Contributors
Labels

Milestone
22.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: 2026-04-17 06:14 UTC

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