Install specific older version of gcc

Hello, I am new to Rocky Linux and am looking to install some older and specific versions of gcc. A few open source projects recommend using gcc 6.3.1 (USD/VERSIONS.md at release · PixarAnimationStudios/USD · GitHub) (maya-usd/build.md at dev · Autodesk/maya-usd · GitHub) but in Rocky Linux 8.5 I have gcc 8.5. I see toolsets for 9, 10, 11 but what would be the best way to get this older gcc version installed? I apologize for the naive question and thank you in advance for any help!

That USD link says: “Our test machine has …”
I don’t think that that means “must have” but “at the time of writing this we had”

A compiler compiles source code into executable binary. The source code is written in programming language. Does GCC 11 support all the features of C++ programming language that GCC 6 did? Yes it does. One might have to add -std= option if the code uses pre-C++11 standard, but most recent GCC should be able to do everything that older GCC’s did (and probably better).

That is very different from, for example Python, where versions are neither backward nor forward compatible.

1 Like