Bump minimum required Boost version #8875

issue fanquake openend this issue on October 4, 2016
  1. fanquake commented at 2:35 am on October 4, 2016: member

    After discussion in #8868, this is to track bumping the minimum required Boost version.

    The current minimum required Boost version is 1.47.0. The long term goal is to move away from Boost entirely, and is tracked in the Boost -> C++11 Project.

    We currently use the following Boost components:

    • Chrono, Filesystem, System, Thread, Test

    Filesystem:

    V1 - (boost version) 1.30.0 V2 - 1.34.0 V3 - 1.44.0

    Chrono:

    V2.0.0 - 1.52.0

    • #7381 C++11 compliance: unresolved symbol when assigning a constexpr duration to a non-const local variable.

    V1.2.3 - 1.51.0

    • Documentation & C++11

    Thread:

    V4.1.0 - 1.54.0

    • #7285 C++11 compliance: Allow to pass movable arguments for call_once.

    Thread is on the way out in #8631.

    Test:

    Work has started on replacing this in #8670.

  2. fanquake added the label Build system on Oct 4, 2016
  3. laanwj commented at 9:19 am on October 4, 2016: member

    Great overview, thanks!

    Regarding boost::filesystem, this means that if we require at least 1.44 we can rid of some compatibility logic here:

    0src/qt/guiutil.cpp:#if BOOST_FILESYSTEM_VERSION >= 3
    1src/qt/guiutil.cpp:#if BOOST_FILESYSTEM_VERSION >= 3
    2src/qt/guiutil.cpp:#if BOOST_FILESYSTEM_VERSION >= 3
    3src/test/testutil.cpp:#if BOOST_FILESYSTEM_VERSION == 3
    

    Most notably the GUI thing: “Conversion between boost path and QString can use invalid character encoding with boost_filesystem v2 and older”

    C++11 compliance is a good point and means we need to require a recent boost.

    Date information would also be useful here:

     0Version 1.62.0  September 28th, 2016 15:17 GMT
     1Version 1.61.0  May 13th, 2016 02:58 GMT
     2Version 1.60.0  December 17th, 2015 15:52 GMT
     3Version 1.59.0  August 13th, 2015 15:23 GMT
     4Version 1.58.0  April 17th, 2015 07:53 GMT
     5Version 1.57.0  November 3rd, 2014 21:55 GMT
     6Version 1.56.0  August 7th, 2014 16:08 GMT
     7Version 1.55.0  November 11th, 2013 19:50 GMT
     8Version 1.54.0  July 1st, 2013 17:10 GMT
     9Version 1.53.0  February 4th, 2013 18:29 GMT
    10Version 1.52.0  November 5th, 2012 16:05 GMT
    11Version 1.51.0  August 20th, 2012 23:00 GMT
    12Version 1.50.0  June 28th, 2012 12:48 GMT
    13Version 1.49.0  February 24th, 2012 21:20 GMT
    14Version 1.48.0  November 15th, 2011 15:47 GMT
    15Version 1.47.0  July 11th, 2011 22:19 GMT
    16Version 1.46.1  March 12th, 2011 15:45 GMT
    17Version 1.46.0  February 21st, 2011 20:36 GMT
    18Version 1.45.0  November 19th, 2010 16:00 GMT
    19Version 1.44.0  August 13th, 2010 17:00 GMT
    20Version 1.43.0  May 6th, 2010 12:00 GMT
    21Version 1.42.0  February 2nd, 2010 14:00 GMT
    22Version 1.41.0  November 17th, 2009 17:00 GMT
    23Version 1.40.0  August 27th, 2009 17:00 GMT
    24Version 1.39.0  May 2nd, 2009 12:00 GMT
    25Version 1.38.0  February 8th, 2009 12:00 GMT
    26Version 1.37.0  November 3rd, 2008 12:00 GMT
    27Version 1.36.0  August 14th, 2008 12:00 GMT
    
  4. Zenitur commented at 1:36 pm on October 4, 2016: none
    config_boost_1.44.zip Build log with Boost 1.44
  5. fanquake commented at 4:31 am on October 5, 2016: member

    Three possible scenarios:

    Bump to 1.44.0 (released August 2010)

    Require Filesystem V3

    Downside: No C++11 compliance in Chrono or Thread

    • However Thread may be gone shortly anyways (see #8631), and would require a bump to 1.54.0, which is probably too recent a version.

    Bump to 1.52.0 (released November 2012)

    Require Filesystem V3 + remove logic as above. C++11 compliance in Chrono No C++11 compliance in Thread.

    • Remove checks for Boost < 1.49 & reduced exports in configure.
    • Possibly remove configure checks for broken Boost sleep in Boost < 1.52 ? here.
    • Remove Boost < 1.50 compatibility logic in scheduler.cpp.
    • Issue with Boost < 1.46.0 on 32-bit systems in coins.h
    • Clang workaround for Boost < 1.46 in util.cpp

    Bump to 1.54.0 (released July 2013)

    All of the above C++11 compliance in Thread

    I had a feeling there was some Boost 1.36.0 logic somewhere, but I can’t seem to find it now.

  6. laanwj commented at 6:28 am on October 6, 2016: member
    Thanks for the extensive research. For another data point we need to bisect boost to find out what release still works with the current code.
  7. fanquake commented at 12:05 pm on October 7, 2016: member

    Chrono Version 1.0.0 was released in January 2011, so I’m guessing it made it into the next Boost release 1.46.0 (March 2011). That would make our minimum version atleast 1.46.0 ?

    Chrono was first included in 1.47.0.

  8. Zenitur commented at 5:42 am on October 8, 2016: none

    Guys, you don’t need to support Boost 1.36 or something like that. I’ve found that all long-time supported Linux distributions are have fresh Boost builds. In CentOS 5 and 6 there are in EPEL repository. In SUSE Enterprise there is in boost49 package.

    I didn’t saw boost49 when tried to build package. I’m sorry that I’ve misled you. sles_boost

  9. laanwj commented at 2:14 pm on February 8, 2017: member

    The minimum boost version was bumped to 1.47.0 in #8920.

    Maybe we should keep this open to determine when to bump the minimum version again in the future as it has an excellent analysis, I don’t know.

  10. luke-jr commented at 4:35 pm on February 8, 2017: member
    Note boost 1.53 is the most recent supported in Debian stable.
  11. Zenitur commented at 7:50 pm on February 8, 2017: none
    There is not only Debian in the Linux world. CentOS 6 is using Boost 1.48. Digia uses this distribution as a build farm to make official Qt5 Linux builds.
  12. TheBlueMatt commented at 9:30 pm on February 8, 2017: member
    Wow, something ships older software than Debian? Thats rather impressive.
  13. luke-jr commented at 3:10 am on February 9, 2017: member
    CentOS 7 is out now. I don’t think we need to support CentOS 6…
  14. Zenitur commented at 4:55 pm on February 9, 2017: none

    Supporting only newest Linux distributions is like supporting only Windows 10. Let me tell about RHEL/CentOS (sorry for my bad English). Before DEB-based becomes the most popular, Red Hat makes a backwards compability for their system. I mean LSB, the Linux Standard Base. So the true way is making builds for previous CentOS version for cover the maximum range. What Digia does, so only one Qt5 build works in a few CentOS releases, as well as in other Linux distributions. 99% of Linuxes has LSB compability, including Debian.

    If you build binaries in a DEB-based build farm, it will not give full backward compability, like LSB. So we see Steam Runtime and Snap packages.

  15. laanwj commented at 11:28 am on February 10, 2017: member

    Some companies are dedicated to supporting old versions of software, nothing wrong with that. The question here is whether that maintenance and testing burden should fall to us as developers of the upstream code. Someone could always (say) argue I want this to compile on my DOS machine with Turbo C++ 3.0! Well if you want that, it’s up to you to make and maintain a patch-set. There is a point at which too many fallbacks and workarounds and conditional features accumulate that it isn’t realistic to support a certain dependency library version anymore.

    Though in the specific case of boost we can stick with 1.47.0 for a while. I’m not aware of any terrible issues, the worst ones were with Boost Filesystem v1/2. In addition to the general stuff @fanquake mentions in the OP there’s only three post-1.47 conditionals:

    0src/scheduler.cpp:#if BOOST_VERSION < 105000
    1src/scheduler.cpp:#if BOOST_VERSION < 105000
    2src/util.cpp:#if BOOST_VERSION >= 105600
    

    The first two have to do with time handling, which will be changed to std::chrono soon anyway (#9566). The latter has to do with detecting “hyperthread” cores or not for -par, which is a bit unfortunate but not critical.

    So I think we can stop the discussion about boost versions here. Maybe we can even postpone bumping the minimum boost version until we remove the boost dependency completely.

  16. jameshilliard commented at 6:38 pm on February 11, 2017: contributor
    @luke-jr At least one major mining pool is known to use Centos 6, however they already use a more up to date compiler due to the lack of c++11 support in the shipped gcc.
  17. fanquake commented at 1:06 pm on February 16, 2017: member

    Agree with @laanwj here.

    I’m optimistic Boost will be gone before we HAVE to bump it again. If anyone would like to follow that progress see https://github.com/bitcoin/bitcoin/projects/3.

    Let’s leave this open for now to track some of the remaining changes.

  18. MarcoFalke commented at 4:12 pm on July 20, 2018: member

    In the OP you mention

    The current minimum required Boost version is 1.20.0.

    This is still the case, even though #8920 was merged. Does this need to be changed?

  19. laanwj commented at 6:20 pm on July 20, 2018: member

    yes:

    0| Boost | [1.64.0](http://www.boost.org/users/download/) | [1.47.0](https://github.com/bitcoin/bitcoin/pull/8920) | No |  |  |
    
    0dnl Minimum required Boost version
    1define(MINIMUM_REQUIRED_BOOST, 1.47.0)
    

    Though I’m not sure why there’s a different minimum boost version configured in different places in the m4.

  20. fanquake commented at 0:27 am on July 21, 2018: member
    I’ve updated the op to mention 1.47.0, an link to configure.ac rather than the boost m4.
  21. adamjonas commented at 9:32 pm on December 23, 2020: member
    Given the minimum required Boost version was bumped to 1.58.0 in #19667, it seems like this issue is outdated and can be closed.
  22. fanquake commented at 5:35 am on December 28, 2020: member
    Yep I agree there’s probably limited value left in having this open.
  23. fanquake closed this on Dec 28, 2020

  24. DrahtBot locked this on Feb 15, 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-09-29 01:12 UTC

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