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++
- C++ using std::vector across boundaries
- Linked list without struct
- Connecting Signal QML to C++ (Qt5)
- how to get the reference of struct soap inherited in C++ Proxy/Service class
- Why we can't assign value to pointer
- Conversion of objects in c++
- shared_ptr: "is not a type" error
- C++ template using pointer and non pointer arguments in a QVector
- C++ SFML 2.2 vectors
- Lifetime of temporary objects
- I want to be able to use 4 different variables in a select statement in c ++
- segmentation fault: 11, extracting data in vector
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- How can I print all the values in this linked list inside a hash table?
- Configured TTL for A record(s) backing CNAME records
Related Questions in GCC
- gcc static library compilation
- Different behavior of async with Visual Studio 2013(Windows8.1) and GCC 4.9(Ubuntu14.10)
- How to add directories to Cygwin gcc default search path
- Usage of #ifndef directive
- Failure to link a program with gcc -static
- Text as parameter in inline assembly (ARM)?
- Alternatives for strrspn and strfind functions(libgen functions in Solaris) in AIX?
- Incorrect format specifier with gcc compiler
- Why should I use a closing bracket in this?
- How can I compile *without* various instruction sets enabled?
- Automatically wrap C/C++ function at compile-time with annotation
- gcc compiled library: can successfully link with, how come it's "undefined symbol" when run the program?
- compiling caffe on Yosemite
- error - /usr/bin/ld: cannot find -lavutil in ubuntu 15.04
- Compatibility of libstdc++.so libgcc_s.so when upgrading GCC 4.1 to GCC 4.8.2
Related Questions in MULTIPLE-VERSIONS
- How to correctly manage versions of your application?
- How to set different java versions for different apps. on a windows PC?
- Tell Apache to use a specific PHP version installed using phpbrew
- Too many postgresql versions installed: How to start only a chosen postgresql version or remove the unneeded ones? Needed port is the standard "5432"
- How to install multiple TRAC versions on Windows
- Using multiple jQuery versions problem
- How to pip install a package with min and max version range?
- Aptana studio3 Eclipse plugin install process fails in specific conditions - what's the right processv to follow
- A safe way to use older versions of an R package under linux
- Working with multiple Python versions **including development header files**?
- Change minSDKVersion depending on Device
- Supporting multiple versions of Eclipse
- keep composer 1 & 2 both in same machine
- CUDA version mismatch
- Multiple versions of a git project
Related Questions in CENTOS8
- Adacore GNATCOLL Postgres library not installing on CentOS 8
- Problem with installation of Steam on CentOS 8
- Why a running cronjob causes a new random gpg-agent process running and causes cached passphrase in gpg-agent invalid?
- ISC-KEA - kea-legal hook - database backend mysql unsupported?
- Ruby: how to access group info from /var/db/group.db
- java.lang.UnsatisfiedLinkError: 'long org.opencv.core.Mat.n_Mat()'
- Unable to docker-compose up any project
- Inappropriate ioctl for device SIOCGIWRANGE with Atheros in CentOS8
- Postgres Extesions Not Available - CentOS 8
- Squid proxy can't access a Cloudflare protected website
- nftables blocking local unix sockets
- Install httpd on local repository in CentOS 8
- How to configure rsyslog inside docker image centos 8
- Using firewalld in CentOS 8 to dynamically auto-populate a blacklist and block it
- Hostname of this host on the management network: Host name is not valid
Related Questions in DEVTOOLSET
- Using devtoolset in gitlab CI/CD
- How to disable devtoolset-8?
- I created a new project in VS 2019 and it doesn't compile because VS fails to find Toolset v142
- how to youtube api data to print in toolset metabox using a button click before save-post
- Enabling "Software collections". RedHat developer toolset
- C++ project compiled with modern compiler, but linked against outdated libstdc++
- Recursive Make passes incorrect -j argument
- CentOS 6 and Devtoolset-3
- Enable devtoolset-8 for zsh on Centos 7
- meson gcc path configuration
- scons still failed after setup env
- devtoolset-3 not found on Centos 6
- Install Obsolete Devtoolset Collection for CentOS
- Enable redhats devtoolset in fish shell
- Install older gcc/g++ versions in CentOS 8
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?
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