Skip to content

Dropping some compiler support in 7.0 #9388

Closed

Description

@pdillinger

Planned minimum compiler support for RocksDB 7.0 (based on "Stop Supporting Older GCC versions" in https://www.facebook.com/groups/rocksdb.dev/):

C++17 standard (from C++11)
GCC 7.x (from 4.8.x)
Visual Studio 2017 (from 2015)
Clang 5 (from 3.3?)

Please let us know in comments here if you have concerns

Activity

  1. self-assigned this
    on Jan 14, 2022
  2. added
    rocksdb-7.0
    on Jan 14, 2022
  3. pinned this issue on Jan 15, 2022
  4. changed the title [-]Planned major release: removing some compiler support[/-] [+]Removing some compiler support in 7.0[/+] on Jan 15, 2022
  5. unpinned this issue on Jan 15, 2022
  6. changed the title [-]Removing some compiler support in 7.0[/-] [+]Dropping some compiler support in 7.0[/+] on Jan 15, 2022
  7. added a commit that references this issue on Feb 1, 2022
  8. adamretter commented on Feb 3, 2022

    @adamretter
    Collaborator

    Hi @pdillinger I see that GCC 5 was the first to offer C++ 17 features, however if I understand your message above, I think you are saying that GCC 7.0.0 will be considered the minimum compiler required for RocksDB? Is that correct?

    At the moment for RocksJava we are using the below compilers for the binary releases. I don't see an issue with getting a newer compiler for CentOS 7 through SCL or similar. However, I will need to look around to find something suitable for CentOS Linux x86 (i.e. 32 bit). I will come back to you shortly with information about what I can do to get these updated for C++ 17 support too

    • CentOS 6 x64 = gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
    • CentOS 6 x86 = gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
    • Alpine 3 x64 = gcc (Alpine 8.3.0) 8.3.0
    • Alpine 3 x86 = gcc (Alpine 8.3.0) 8.3.0
    • CentOS 7 ppc64le = gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
    • Alpine 3 ppc64le = gcc (Alpine 8.3.0) 8.3.0
    • CentOS 7 arm64 = gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
    • Alpine 3 arm64 = gcc (Alpine 8.3.0) 8.3.0
    • CentOS 7 s390x = gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
    • Alpine 3 s390x = gcc (Alpine 8.3.0) 8.3.0
    • Ubuntu 21.04 RISCV = gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0
    • macOS x64 = Apple clang version 13.0.0 (clang-1300.0.29.30)
    • Windows Server 2021 on x64 with Visual Studio 15.
  9. pdillinger commented on Feb 3, 2022

    @pdillinger
    ContributorAuthor

    I see that GCC 5 was the first to offer C++ 17 features

    I was working from this: https://gcc.gnu.org/projects/cxx-status.html A good number of features require GCC 7, and at a minimum 'constexpr if' is one I foresee using.

    However, I will need to look around to find something suitable ...

    Thanks for the update!

  10. adamretter commented on Feb 4, 2022

    @adamretter
    Collaborator

    @pdillinger For RocksJava I have now upgraded the following:

    • CentOS 6 x86 from gcc 4.8.2 to 8.3.1; I could not find a usable gcc 7 package for CentOS 6 or 7 on x86, but I did find a gcc 8 package.
    • CentOS 7 ppc64le from gcc 4.8.5 to 7.3.1
    • CentOS 7 arm64 from gcc 4.8.5 to 7.3.1
    • Switched from CentOS 7 s390x to Ubuntu 18.04 s390x with gcc 7.5.0. I chose Ubuntu here over CentOS, as for s390x there are older versions of Ubuntu available than CentOS (a.k.a. ClefOS), which means that a Ubuntu 18 for s390x has the oldest glibc support for s390x whilst still having a gcc > 7

    I will do the Windows Cloud VM in the next day or so...

  11. jonathan-albrecht-ibm commented on Feb 22, 2022

    @jonathan-albrecht-ibm
    Contributor

    @pdillinger, @adamretter I started looking at the s390x assembler error reported in #9512. What's happening is that the travis build machine is a z14 model (the cpu generation) running ubuntu 16.04. The g++-7 compiler that is installed from ubuntu-toolchain-r-test detects the z14 model and sets march=z14 under the hood when -march=native is used on the g++ command line but the assembler is version 2.26.1 from the binutils package which is too old to recognize march=z14.

    The easiest fix for s390x would be to update the travis builds to ubuntu 18.04 which has g++ 7.5.0 as the default compiler version. I've tested it locally and it works because the assembler on 18.04 is version 2.30 which recognizes march=z14.

    16.04 is out of standard support now and I don't think the assembler would ever be updated to a newer version so I would have to find a way of updating the assembler as part of the s390x build. I can work on a PR to update the build to a 18.04 environment but wanted to check if 16.04 was still required for any reason or if 20.04 would be preferred.

  12. jonathan-albrecht-ibm commented on Feb 23, 2022

    @jonathan-albrecht-ibm
    Contributor

    Actually, I found a fix for the s390x build on 16.04. I had put a check in build_tools/build_detect_platform to check if -march=native flag is working but the way I did it, it didn't end up calling the assembler. If I fix the -march=native check, then it correctly falls back to building with -march=z196 which is recognized by the whole toolchain. The same check in CMakelists.txt is working correctly so cmake builds are passing.

    I've run into problems with ppc64le and arm64 on 18.04 so I don't have that working yet. So far, testing is going well with the -march=native check fix so I'd like to create a PR for it so that s390x can be re-enabled again. I'll try to have it ready tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

announcementrocksdb-7.0

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions