RFC: C++14 Requirement #13356

issue fanquake openend this issue on May 31, 2018
  1. fanquake commented at 8:47 am on May 31, 2018: member

    Opening an issue after some recent IRC discussion about moving to requiring C++14.

    GCC:

    C++14 is available from GCC 5, and is the default mode in GCC 6.1. “The default mode for C++ is now -std=gnu++14 instead of -std=gnu++98.”. We currently require GCC 4.8+.

    Clang:

    C++14 is available from Clang 3.4+. We currently require Clang 3.3+.

    Usage:

    We currently already use shared mutex.

  2. fanquake added the label Brainstorming on May 31, 2018
  3. fanquake added the label Build system on May 31, 2018
  4. MarcoFalke added this to the milestone 0.18.0 on May 31, 2018
  5. MarcoFalke commented at 9:36 am on May 31, 2018: member
    I think we should wait for trusty to be EOL, which probably happens around the day we release 0.18.0
  6. luke-jr commented at 12:18 pm on May 31, 2018: member
    Latest RHEL is only GCC 4.8.x
  7. MarcoFalke commented at 7:37 pm on May 31, 2018: member

    Also should check OpenSuse and CentOS.

    According to today’s irc chat debian oldstable will only support C++14 in time for our ~0.19.0 release:

    https://botbot.me/freenode/bitcoin-core-dev/2018-05-31/?msg=100660663&page=4

  8. MarcoFalke removed this from the milestone 0.18.0 on May 31, 2018
  9. MarcoFalke added this to the milestone 0.19.0 on May 31, 2018
  10. MarcoFalke removed this from the milestone 0.19.0 on May 31, 2018
  11. MarcoFalke added this to the milestone 0.18.0 on May 31, 2018
  12. MarcoFalke removed this from the milestone 0.18.0 on Sep 11, 2018
  13. MarcoFalke added this to the milestone 0.19.0 on Sep 11, 2018
  14. practicalswift commented at 8:28 pm on December 10, 2018: contributor

    Some time have passed – do the milestones still hold?

    Looking forward to the C++14 switch :-)

  15. MarcoFalke commented at 8:31 pm on December 10, 2018: member

    @practicalswift Unless there are any objections, we can do the switch on the day that master is branched from 0.18.0.

    See #14438

    02019-03-01
    1-----------
    2- Split off `0.18` branch from `master`
    

    The pull request itself can be prepared and reviewed in advance, of course.

  16. practicalswift commented at 8:34 pm on December 10, 2018: contributor
    @MarcoFalke Excellent news! Thanks for the quick reply!
  17. MarcoFalke added the label Up for grabs on Jan 25, 2019
  18. MarcoFalke commented at 2:31 am on January 25, 2019: member
    This is now up for grabs. The previous bump was done in “build: Enable C++11 in build, require C++11 compiler” #7165
  19. gmaxwell commented at 8:06 am on January 26, 2019: contributor
    The current released version of RHEL is still on GCC 4.8, and even when things are released we can’t expect users to be instantly upgraded. I’m somewhat concerned that we’re going to block the next softfork’s activation the way we did with segwit by mandating a new OS in the release of or before the softfork and then end up with mining pools unwilling to upgrade for six months because it requires a whole new OS.
  20. JeremyRubin commented at 9:50 pm on January 26, 2019: contributor
    Is there a problem running a binary compiled with c++14 on a machine that only has a c++11 compiler? The RHEL OS requirement would purely be for building Core, which seems unlikely to be a blocking factor for adopting a soft fork? Unless there is something I’m missing…
  21. luke-jr commented at 10:10 pm on January 26, 2019: member
    Usually binaries only run on the system they’re built on.
  22. gmaxwell commented at 10:22 pm on January 26, 2019: contributor

    @JeremyRubin Miners routinely modify their software and we encourage them to do so (at least in various sensible ways). If you can’t compile you can’t run your modifications. Also, and perhaps more importantly, critical fixes are always first available as source code.

    Before we actually experienced the issue I would have regarded the concern as largely hypothetical, it was an excusable mistake. I don’t see why we shouldn’t learn from that mistake…

    Rapidly advancing the required language version has costs. These costs could be justified with commiserate benefits, but I’m not aware of a case being made here.

  23. JeremyRubin commented at 10:37 pm on January 26, 2019: contributor

    Thanks for the information on that @gmaxwell. I was unaware that there was an issue with that during SegWit – do you have any link to discussion on this? I was unable to find it in my bitcoin-dev email archives, just this article https://www.nasdaq.com/article/where-bitcoin-mining-pools-stand-on-segregated-witness-cm713991 / tweet https://twitter.com/satofishi/status/843910700124717058 @luke-jr I know that’s generally true (e.g., Linux, Windows, and OSX). But I figured for Bitcoin the compatibility is sufficient across most linux distributions so as not to require recompilation per-distro. Perhaps it depends on what kinds of changes miners are compiling in…

    anyways, I’m indifferent on if to upgrade to 14 or not (the changes in 14 are relatively minor and low advantage compared to say, 17). Just wanted to learn more about the practical issue.

  24. luke-jr commented at 10:43 pm on January 26, 2019: member

    There is basically no compatibility across Linux distributions, even different versions of the same distro are likely to have issues sometimes.

    And despite our efforts to build a hacky gitian static binary that is supposed to run everywhere, in practice even that seems to be a failure (I can’t run them!). In any case, the gitian process currently includes a significant amount of trust, and people shouldn’t be required to use its binaries.

  25. MarcoFalke referenced this in commit d6e700e40f on Jan 28, 2019
  26. MarcoFalke removed this from the milestone 0.19.0 on Feb 11, 2019
  27. MarcoFalke added this to the milestone Future on Feb 11, 2019
  28. MarcoFalke commented at 9:21 pm on February 11, 2019: member
    Moved to “Future” due to concerns that this will break builds on currently supported platforms.
  29. ysangkok commented at 9:16 pm on September 24, 2019: none

    The current released version of RHEL is still on GCC 4.8, and even when things are released we can’t expect users to be instantly upgraded.

    Just want to note that RHEL 8 (with GCC 8.2) has been out for half a year now. And Ubuntu 18.04 has gcc-8 in universe.

    Which distributions are most popular with miners?

  30. MarcoFalke commented at 10:26 pm on September 24, 2019: member
    Some might be using CentOS 7
  31. ajtowns commented at 6:56 am on September 25, 2019: member

    Some might be using CentOS 7

    Red Hat has a devtoolset software collection that provides a new version of gcc and such for either RHEL or CentOS. I get gcc 8.3.1 on CentOS 7 if I run:

    0# yum install centos-release-scl
    1# yum install devtoolset-8
    2# scl enable devtoolset-8 bash
    3# gcc --version | head -n1
    4gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)
    5# exit
    6# gcc --version | head -n1
    7gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
    

    Doing yum install boost-devel libevent-devel openssl-devel lets me build with --disable-wallet in that environment. I think that should let you get a newer compiler on RHEL/CentOS 6 as well? Looks like clang is available too.

  32. MarcoFalke commented at 12:58 pm on October 1, 2019: member
    CentOS 8 was released a few days ago, so it seems ok to move forward with this for 0.20.0?
  33. practicalswift commented at 1:40 pm on October 1, 2019: contributor
    @MarcoFalke Yes please! :)
  34. MarcoFalke commented at 2:44 pm on October 3, 2019: member
    Closing. C++17 should be the next bump, it seems
  35. MarcoFalke closed this on Oct 3, 2019

  36. MarcoFalke removed the label Up for grabs on Oct 3, 2019
  37. MarcoFalke locked this on Dec 16, 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: 2024-11-22 00:12 UTC

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