Compile fails on recent ubuntu / boost 1.64 #11520

issue pierreN opened this issue on October 18, 2017
  1. pierreN commented at 12:15 PM on October 18, 2017: contributor

    Hi,

    make fails with boost 1.64:

    Can you reliably reproduce the issue? If so, please list the steps to reproduce below:

    1. ./autogen.sh && ./configure --with-incompatible-bdb (bdb version 5.2)
    2. make
      ....
      CXXLD    bench/bench_bitcoin
      CXXLD    test/test_bitcoin
    test/test_test_bitcoin-arith_uint256_tests.o: In function `std::ostream& boost::test_tools::tt_detail::operator<< <bool>(std::ostream&, boost::test_tools::tt_detail::print_helper_t<bool> const&)':
    /usr/local/include/boost/test/tools/detail/print_helper.hpp:216: undefined reference to `boost::test_tools::tt_detail::print_log_value<bool>::operator()(std::ostream&, bool)'
    collect2: error: ld returned 1 exit status
    Makefile:3837: recipe for target 'test/test_bitcoin' failed
    make[2]: *** [test/test_bitcoin] Error 1
    make[2]: Leaving directory '/opt/bitcoin/src'
    Makefile:9352: recipe for target 'all-recursive' failed
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory '/opt/bitcoin/src'
    Makefile:742: recipe for target 'all-recursive' failed
    make: *** [all-recursive] Error 1
    
    1. boost version and options:
    $ cat version.hh                                                                                                                                                                                           
    //  Boost version.hpp configuration header file  ------------------------------//
    
    //  (C) Copyright John maddock 1999. Distributed under the Boost
    //  Software License, Version 1.0. (See accompanying file
    //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    
    //  See http://www.boost.org/libs/config for documentation
    
    #ifndef BOOST_VERSION_HPP
    #define BOOST_VERSION_HPP
    
    //
    //  Caution: this is the only Boost header that is guaranteed
    //  to change with every Boost release. Including this header
    //  will cause a recompile every time a new Boost version is
    //  used.
    //
    //  BOOST_VERSION % 100 is the patch level
    //  BOOST_VERSION / 100 % 1000 is the minor version
    //  BOOST_VERSION / 100000 is the major version
    
    #define BOOST_VERSION 106400
    
    //
    //  BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
    //  but as a *string* in the form "x_y[_z]" where x is the major version
    //  number, y is the minor version number, and z is the patch level if not 0.
    //  This is used by <config/auto_link.hpp> to select which library version to link to.
    
    #define BOOST_LIB_VERSION "1_64"
    
    #endif
    

    Output of configure script:

    Options used to compile and link:
      with wallet   = yes
      with gui / qt = no
      with zmq      = no
      with test     = yes
      with bench    = yes
      with upnp     = auto
      use asm       = yes
      debug enabled = no
      werror        = no
    
      target os     = linux
      build os      =
    
      CC            = gcc
      CFLAGS        = -g -O2
      CPPFLAGS      =  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS
      CXX           = g++ -std=c++11
      CXXFLAGS      = -g -O2 -Wall -Wextra -Wformat -Wvla -Wformat-security -Wno-unused-parameter -Wno-implicit-fallthrough
      LDFLAGS       =
      ARFLAGS       = cr
    

    Expected behaviour

    Tests should compile successfully

    Actual behaviour

    Tests dont compile

    Screenshots.

    • NaN -

    What version of bitcoin-core are you using?

    Last commit in git log : commit 808c84f89d0edcef9ddaab0b849a382719f6ec9e , Merge #11483: Fix importmulti bug when importing an already imported key

    Machine specs:

    • OS: ubuntu
    • CPU: intel
    • RAM: xxxx
    • Disk size: enough
    • Disk Type (HD/SDD): ssd

    Any extra information that might be useful in the debugging process.

    not that i see of

  2. pierreN renamed this:
    Compile fail on recent ubuntu / boost 1.64
    Compile fails on recent ubuntu / boost 1.64
    on Oct 18, 2017
  3. fanquake added the label Linux/Unix on Oct 18, 2017
  4. theuni commented at 7:46 PM on October 18, 2017: member

    Our CI environment uses boost 1.64, so I don't think there's an incompatibility there. Are you sure that you haven't installed a version of libboost-test that doesn't match the rest?

  5. pierreN commented at 9:14 AM on October 19, 2017: contributor

    It seems that configure was using libboost-test library 1.63 and the headers boost 1.64. Issue was resolved when removing libboost 1.63. Thanks!

  6. pierreN closed this on Oct 19, 2017

  7. itoonx commented at 8:16 PM on November 13, 2017: none

    how i check the version of libboost

  8. myradiogalaxy commented at 4:37 AM on January 28, 2018: none

    Might there be a way around removing older versions of boost? I'm having the same issue with boost 1.62 and 1.66 installed, but I'm hesitant to remove the older version.

  9. proski commented at 9:17 PM on March 13, 2018: none

    I've seen this issue in another program using Boost. It was caused by the mismatch between the Boost headers and the libraries. Boost headers were 1.64, Boost libraries were 1.61. The fix would be to have exactly one version of Boost includes and development libraries (*.so files) to avoid any possible mismatch.

  10. aaroncatalano commented at 9:45 PM on November 17, 2018: none

    I've seen this issue in another program using Boost. It was caused by the mismatch between the Boost headers and the libraries. Boost headers were 1.64, Boost libraries were 1.61. The fix would be to have exactly one version of Boost includes and development libraries (*.so files) to avoid any possible mismatch.

    Do you have the command and steps to resolve this. Having major issues with Boost and Bitcoin running Ubuntu.

  11. proski commented at 7:26 AM on November 20, 2018: none

    No, I don't have such command and steps. There are multiple ways how a system would end up with multiple versions of Boost. It would be hard to find out which of the Boost libraries can be removed safely without breaking some installed software. Writing detailed instructions for every such situation would be impractical.

  12. MarcoFalke locked this on Sep 8, 2021

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-13 15:15 UTC

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