Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Minimum GCC Version to 8 (Rippled Version: 1.7.0) #3782

Closed
septerr opened this issue Mar 2, 2021 · 3 comments
Closed

Change Minimum GCC Version to 8 (Rippled Version: 1.7.0) #3782

septerr opened this issue Mar 2, 2021 · 3 comments

Comments

@septerr
Copy link

septerr commented Mar 2, 2021

Issue Description

When trying to build from source, I encountered following compilation errors with GCC 7.5 on Ubuntu:

xrp core.dir unity_3_cxx.cxx:10:0: /build/rippled/src/ripple/protocol/impl/STInteger.cpp:28:10: fatal error: charconv: No such file or directory #include <charconv>

Using GCC 8, the build worked.

It appears the minimum required GCC version on Linux Build Instructions needs to be updated.

Steps to Reproduce

On Ubuntu, follow the steps from Linux Build Instructions , except when installing GCC use following:

apt-get update && apt-get install -y
apt-get update \
    && apt-get -y upgrade \
    && apt-get install -y wget git protobuf-compiler libprotobuf-dev \
      libssl-dev python-dev make pkg-config software-properties-common \
      build-essential curl fio \
    && add-apt-repository -y ppa:ubuntu-toolchain-r/test \
    && apt-get update \
    && apt-get install -y gcc-7 g++-7

update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 \
                        --slave /usr/bin/g++ g++ /usr/bin/g++-7

Expected Result

Expected a successful build.

Actual Result

Following build error:

xrp core.dir unity_3_cxx.cxx:10:0: /build/rippled/src/ripple/protocol/impl/STInteger.cpp:28:10: fatal error: charconv: No such file or directory #include <charconv>

Environment

Ubuntu (unsure of exact version)

Supporting Files

@MarkusTeufelberger
Copy link
Collaborator

Ubuntu (unsure of exact version)

What's the output of cat /etc/os-release on your build machine?

@septerr
Copy link
Author

septerr commented Mar 3, 2021

I believe the Ubuntu version is 16.04. We are building from source in a container with a base Ubuntu image. And from what I can tell the image is for Ubuntu 16.04. 🙏

@alloynetworks
Copy link
Contributor

I confirm that this same behavior occurs on Ubuntu 18.04 when compiling 1.7.0+
It can be solved with:

sudo apt install g++-8 gcc-8 

In order to have it refer to the latest version, yet allow both GCC 7 and 8 directly, this helps:

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 700 --slave /usr/bin/g++ g++ /usr/bin/g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8

seelabs added a commit to seelabs/rippled that referenced this issue Apr 9, 2021
* resolves XRPLF#3782
* gcc 8 is required for the charconv include file
manojsdoshi pushed a commit to manojsdoshi/rippled that referenced this issue Jun 1, 2021
* resolves XRPLF#3782
* gcc 8 is required for the charconv include file
manojsdoshi pushed a commit to manojsdoshi/rippled that referenced this issue Jun 1, 2021
* resolves XRPLF#3782
* gcc 8 is required for the charconv include file
manojsdoshi pushed a commit to manojsdoshi/rippled that referenced this issue Jun 1, 2021
* resolves XRPLF#3782
* gcc 8 is required for the charconv include file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants