I've been struggling with this for the past 2h. In CentOS 8 I can't find the devtoolset packages to install older gcc/g++ versions. There is no longer a scl repo for CentOS 8. I need gcc/g++ 4.9x installed along the current gcc/g++ 8.x and I need to be able to switch between the two. This was extremely easy to set up in Ubuntu, not the case in CentOS and the documentation is non-existent or I had trouble finding it.
Install older gcc/g++ versions in CentOS 8
5.7k views Asked by one-liner At
2
There are 2 answers
0
Phteven
On
Found a solid path that has automated compiling and packaging gcc, as well as a guide:
- Guide:
- Github repo:
I won't copy paste what's in this person's guide as they deserve the credit. However, here's a summary of the steps:
- Install your prereqs (rpm build tools, devtools for bootstrapping your environment).
- Clone the repo.
- Checkout a branch in the repo like the major version of GCC you want (e.g.
gcc7). - In the repo, edit
gcc-build-vars.shsuch that it points to a version of GCC you want fromhttp://gnu.mirror.constant.com/gcc/. - Perform the build with:
./build-gcc.sh -T | tee build.log. - Stage it:
./stage-gcc.sh. - Package it: (
./pack-gcc.shor./make-gcc-rpm.sh -v).
Related Questions in C++
- How to immediately apply DISPLAYCONFIG_SCALING display scaling mode with SetDisplayConfig and DISPLAYCONFIG_PATH_TARGET_INFO
- Why can't I use templates members in its specialization?
- How to fix "Access violation executing location" when using GLFW and GLAD
- Dynamic array of structures in C++/ cannot fill a dynamic array of doubles in structure from dynamic array of structures
- How do I apply the interface concept with the base-class in design?
- File refuses to compile std::erase() even if using -std=g++23
- How can I do a successful map when the number of elements to be mapped is not consistent in Thrust C++
- Can std::bit_cast be applied to an empty object?
- Unexpected inter-thread happens-before relationships from relaxed memory ordering
- How i can move element of dynamic vector in argument of function push_back for dynamic vector
- Brick Breaker Ball Bounce
- Thread-safe lock-free min where both operands can change c++
- Watchdog Timer Reset on ESP32 using Webservers
- How to solve compiler error: no matching function for call to 'dmhFS::dmhFS()' in my case?
- Conda CMAKE CXX Compiler error while compiling Pytorch
Related Questions in GCC
- File refuses to compile std::erase() even if using -std=g++23
- the difference between two style of inline ASM
- Why veneer code generated by gcc for cortex-m0 seems 8-byte aligned?
- How to compile the Linux kernel with -O0 for more detailed debug?
- GMP Windows installation "configure: error: could not find a working compiler"
- Unable to run get .exe file from assembly NASM
- Problem with compiling c++ project that is running python code using Python.h -> undefined reference
- How to use a newer linker and glibc in a Kotlin/Native project?
- "Config.guess failed to determine the host type" when trying build binutils-2.7 with Cygwin
- Trying to compile GCC returns a bunch of errors
- Compiling with gcc fno-common option causes performance degradation
- On cygwin I get errors containing -lintl and -liconv when running gcc
- Constant function pointer optimization
- How to obtain mingw-w64 version 9.3.0 or older for MSYS2?
- How to fix this error in terminal while writing hello world code in VS Code on C?
Related Questions in MULTIPLE-VERSIONS
- Is pyspark compatible with multiple spark server versions?
- Java error (No active SparkContext) when attempting to create SparkSession in pyspark 3.4.1 over spark server of version 3.3.2
- Working with multiple Python versions **including development header files**?
- A safe way to use older versions of an R package under linux
- How can I modify my C code to kill a child process in OpenSUSE 42.3 using sudo?
- Migrating from artifactory 5.8.4 on RHEL7 to artifactory 7.41.4 on RHEL8 using external Oracle DB
- Previous version of PHP running during windows startup
- Maintain two C# projects versions
- How to call a Python script in command line from another python script?
- Install ASP.NET Core 6.0 with ASP.NET Core 3.1
- Is it safe to install spyder multiple times with conda?
- .NET Core 2.1 and .NET Core 5.0 Web-Apps on Same Server
- keep composer 1 & 2 both in same machine
- How to install a python version using pyenv/pyenv-win in microsoft windows 10?
- Install older gcc/g++ versions in CentOS 8
Related Questions in CENTOS8
- FLTK application shows window behind it as foreground color
- When I install python library "curl_cffi" on centos8, how can I fix it?
- Migrate to CentOS Stream 9
- Gin v1.9.1 with go1.21.2 on Centos8 and Debian11 (Google Cloud VM instance) - Server-side push issue
- Error 404 not found when connecting to Apache James WebAdmin
- Why does nginx not work when it is running?
- Apache James: mail server How To
- Dynamically Changing DBUS_SESSION_BUS_ADDRESS Without Re-login
- Deploy react js + django + CentOS + SSL
- JVM on Rocky Linux 8 takes more CPU than CentOS 8
- Cannot push images to the docker-registry using the kubectl plugin
- Failed to download metadata for repo 'powertools': Cannot download repomd.xml
- How to access the local files to restore in remotely accessed PgAdmin4 in centos 8
- Centos8 undefined symbol: EVP_KDF_ctrl, version OPENSSL_1_1_1b
- K8S cluster pod can't solve service name if pod on different node from coredns pod
Related Questions in DEVTOOLSET
- Date condition display is not working in Elementor
- ar: file format not recognized when using 'ar' in devtoolset-11, but works with system default 'ar'
- devtoolset-10,undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
- How to install devtoolset-11 on Centos 8 Stream
- Can not find required gcc version after devtoolset installation
- Visual Studio Code Intellisense highlighting using scl enable devtoolset-8 and Cmake
- how to youtube api data to print in toolset metabox using a button click before save-post
- meson gcc path configuration
- error: Failed dependencies: /usr/lib/libc.so is needed by devtoolset-8-systemtap-testsuite-3.3-1.el7.x86_64
- How to install Python3 and GCC 7 in the same SCL shell?
- Updating GLIBCXX with devtoolset-10
- Updating /usr/include/c++ in CentOS-7
- stack-protector enabled but compiler support broken while installing VirtualBox Guest Additions with devtoolset-8
- Segmentation fault using devtoolset-10 with boost 1.73 static libraries complied with gcc 7.5.0
- Recursive Make passes incorrect -j argument
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
If you wish to install an older gcc than the distro provides, you will need to compile it for source.
There is some guidance below on how to download and build an old GCC
https://bytefreaks.net/gnulinux/downgrade-gcc-on-centos-7-0-64bit-to-version-4-8-2