From 489aae5021102f69f3cf3e90c99ef999d2bb5fc2 Mon Sep 17 00:00:00 2001 From: weizuo93 <68884553+weizuo93@users.noreply.github.com> Date: Wed, 14 Apr 2021 00:10:08 +0800 Subject: [PATCH] [Doc] Update README.md about gcc version (#5624) `BE`code can compile pass using `GCC 7.3.0`, but compiling `BE UT`code will encounter error using `GCC 7.3.0`. After upgrade gcc version to `10.2.1` which is the same version as in docker image, `BE UT` can be compiled successfully. --- README.md | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 53f13f0e40..974ec7f09a 100644 --- a/README.md +++ b/README.md @@ -120,18 +120,37 @@ After successfully building, it will install binary files in the directory `outp You should install the following softwares: ``` -GCC 7.3.0+, Oracle JDK 1.8+, Python 2.7+, Apache Maven 3.5+, CMake 3.19.2+, Flex 2.6.0+ +GCC 10.2.1+, Oracle JDK 1.8+, Python 2.7+, Apache Maven 3.5+, CMake 3.19.2+, Flex 2.6.0+ ``` Then set them to environment variable PATH and set JAVA_HOME. -If your GCC version is lower than 7.3.0, you can run: +If your GCC version is lower than 10.2.1, you can run: ``` -sudo yum install devtoolset-7-toolchain -y +sudo yum install -y devtoolset-10-gcc* ``` -and then, set the path of GCC (e.g `/opt/rh/devtoolset-7/root/usr/bin`) to the environment variable PATH. +If devtoolset-10 is not found in current repo. Oracle has already rebuilt the devtoolset-10 packages. You can create +repo file `CentOS-SCLo-scl.ol.repo` in path `/etc/yum.repos.d/`: + +``` +[ol7_software_collections] +name=Software Collection packages for Oracle Linux 7 ($basearch) +baseurl=http://yum.oracle.com/repo/OracleLinux/OL7/SoftwareCollections/$basearch/ +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle +gpgcheck=1 +enabled=1 +``` + +and then + +``` +wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle +rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* +sudo yum install -y devtoolset-10-gcc* +``` +Don't forget to set the path of GCC (e.g `/opt/rh/devtoolset-10/root/usr/bin`) to the environment variable PATH. #### Compile and install