doc: Increase minimum required GCC to 5.1 #18942

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:gcc_5_1_for_codecvt changing 1 files +1 −1
  1. fanquake commented at 7:50 AM on May 11, 2020: member

    Since the merge of #13862, and the inclusion of the <codecvt> header, it hasn't been possible to compile bitcoind targeting Windows (as that is the only platform on which we use <codecvt>) using GCC 4.8.x.

    The libstdc++ packaged with GCC didn't include the <codecvt> header until GCC 5.1. See the GCC 5 release notes:

    Runtime Library (libstdc++) Full support for C++11, including the following new features: locale facets for Unicode conversion;

    Given that we'll be requiring a c++17 capable compiler at some point in the near future, and, assuming no-one else has noticed this, I think we can just adjust the docs to indicate that it's actually GCC 5.1+ that is required (I don't think we need to break it down per target).

    # gcc --version
    gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4
    
    # make V=1
    x86_64-w64-mingw32-g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../src/config   -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I.  -DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC -mthreads -I/bitcoin/depends/x86_64-w64-mingw32/share/../include -I./leveldb/include -I./leveldb/helpers/memenv -I./secp256k1/include -I./univalue/include -I/bitcoin/depends/x86_64-w64-mingw32/share/../include/  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -D_WIN32_WINNT=0x0601 -D_FILE_OFFSET_BITS=64  -fstack-reuse=none -Wstack-protector -fstack-protector-all       -pipe -O2  -MT libbitcoin_common_a-netbase.o -MD -MP -MF .deps/libbitcoin_common_a-netbase.Tpo -c -o libbitcoin_common_a-netbase.o `test -f 'netbase.cpp' || echo './'`netbase.cpp
    netbase.cpp:19:19: fatal error: codecvt: No such file or directory
     #include <codecvt>
                       ^
    compilation terminated.
    make[2]: *** [libbitcoin_common_a-netbase.o] Error 1
    
  2. doc: Increase minimum required GCC to 5.1
    Since the merge of #13862, and the inclusion of the <codecvt> header,
    it hasn't been possible to compile bitcoind (targeting Windows) using
    GCC 4.8.x. The libstdc++ packaged with GCC didn't include the <codecvt>
    header until GCC 5.1. See the GCC 5 release notes:
    https://gcc.gnu.org/gcc-5/changes.html.
    
    Given that we'll be requiring a c++17 capable compiler at some point in
    the near future, and, assuming no-one else has noticed this, I think we
    can just adjust the docs to indicate that it's actually GCC 5.1+ that is
    required (I don't think we need to break it down per target).
    b80ee23824
  3. fanquake added the label Docs on May 11, 2020
  4. kristapsk approved
  5. kristapsk commented at 10:39 AM on May 11, 2020: contributor

    ACK b80ee238245e1cb7c69e9ea5f10a7ee6ebad45c4. Even GCC 5.1 is already old, oldest version still officially supported is 8.4.

  6. in doc/dependencies.md:14 in b80ee23824
      10 | @@ -11,7 +11,7 @@ These are the dependencies currently used by Bitcoin Core. You can find instruct
      11 |  | Expat | [2.2.7](https://libexpat.github.io/) |  | No | Yes |  |
      12 |  | fontconfig | [2.12.1](https://www.freedesktop.org/software/fontconfig/release/) |  | No | Yes |  |
      13 |  | FreeType | [2.7.1](https://download.savannah.gnu.org/releases/freetype) |  | No |  | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) (Android only) |
      14 | -| GCC |  | [4.8+](https://gcc.gnu.org/) (C++11 support) |  |  |  |
      15 | +| GCC |  | [5.1+](https://gcc.gnu.org/) (C++11 support) |  |  |  |
    


    MarcoFalke commented at 11:37 AM on May 11, 2020:
    | GCC |  | [4.8+ for Linux or 5.1+ for Windows cross compilation](https://gcc.gnu.org/) (C++11 support) |  |  |  |
    

    4.8 works just fine on Linux. And one of our ci runs is using 4.8.


    fanquake commented at 12:15 PM on May 11, 2020:

    I'd rather not. We don't actually need to maintain compile-time compatibility with CentOS 7 (for some reason it has became a big focus recently), we really only need runtime back-compat. I'm currently writing up some documentation to clarify our build and runtime requirements, and what we actually do and don't need to support. This is also going to change when we require C++17, so I don't see the point in making a distinction at this stage.


    laanwj commented at 12:26 PM on May 11, 2020:

    We don't actually need to maintain compile-time compatibility with CentOS 7

    I also think this is pointless FWIW. We need to move forward, there is no need to try to support increasingly old platforms. That's just make-work. And it's moot with C++17 anyway.


    luke-jr commented at 6:49 PM on June 2, 2020:

    CentOS 8 was released already, and I haven't heard any discussion about supporting anything older than the most recent stable release of major distros?


    MarcoFalke commented at 6:58 PM on June 2, 2020:

    I am not aware of this policy. If we stop supporting second-to-last LTS, we will also drop support for Ubuntu Bionic, which is the primary Ubuntu platform that Bitcoin Core runs on.

    I think dropping of OSes should only be done on a case-by-case basis with all tradeoffs in mind.

  7. laanwj commented at 12:22 PM on May 11, 2020: member

    Can't we wait with the C++ compiler bump until we require C++17? It seems a bit of a waste of time to spend time on fiddling around with small changes in minimum version when a wholesale bump is around the corner.

  8. MarcoFalke commented at 1:20 PM on May 11, 2020: member

    Tend to agree with @laanwj . I was hoping 0.22.0 will be the big and wholesale build cleanup:

    • No gitian, but guix :rocket:
    • No boost, but C++17 :rocket:
    • No historic glibc, but modern glibc :rocket:

    Obviously that comes with cutting support for most historic versions of gcc and clang, as well as operating systems. But as long as we nicely document in the release notes what operating systems are supported and how, that should be fine.

  9. MarcoFalke added the label Brainstorming on May 11, 2020
  10. fanquake commented at 5:21 AM on June 18, 2020: member

    Will be superseded by C++17 related doc changes.

  11. fanquake closed this on Jun 18, 2020

  12. DrahtBot locked this on Feb 15, 2022
  13. fanquake deleted the branch on Sep 29, 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: 2026-04-20 12:14 UTC

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