By: Andrey (andrey.semashev.delete@this.gmail.com), September 19, 2022 2:08 pm
Room: Moderated Discussions
Michael S (already5chosen.delete@this.yahoo.com) on September 19, 2022 10:28 am wrote:
> I realize that my question is not quite appropriate for RWT forum, but it
> seems today few knowledgeable posters are bored, so, may be, not too bad.
>
> I want to play with new gcc compilers (any variant of 11 and any variant of 12) on Linux. Normally I play
> with newish gcc on Windows under msys2, but tests I want to run today are specific to system-V AMD64 ABI.
> The most suitable distro that I have access to right now, on most capable machine with
> biggest amount of free space on blazing-fast SSD happens to be Debian 11 (Bullseye).
> Of course I tried to help myself with google, but something is not clicking. All suggestions
> I see are too complicated to my primitive Linux administration skills.
> The one way I likely could manage is building from source. But I can't believe that there is no simpler way.
You could try installing g++-11 and g++-12 (not g++ - this would replace your default compiler) from Debian 12 Bookworm. But do note that it will still replace some gcc libraries with updated versions, which could break your system. Take note which packages are replaced with the updated ones so that you can later downgrade them to restore the system to the previous state. However, if the system is valuable, I would recommend setting up a VM or container with Debian 12 or Ubuntu 22.04 (those have both gcc 11 and 12 in stock repos).
> I realize that my question is not quite appropriate for RWT forum, but it
> seems today few knowledgeable posters are bored, so, may be, not too bad.
>
> I want to play with new gcc compilers (any variant of 11 and any variant of 12) on Linux. Normally I play
> with newish gcc on Windows under msys2, but tests I want to run today are specific to system-V AMD64 ABI.
> The most suitable distro that I have access to right now, on most capable machine with
> biggest amount of free space on blazing-fast SSD happens to be Debian 11 (Bullseye).
> Of course I tried to help myself with google, but something is not clicking. All suggestions
> I see are too complicated to my primitive Linux administration skills.
> The one way I likely could manage is building from source. But I can't believe that there is no simpler way.
You could try installing g++-11 and g++-12 (not g++ - this would replace your default compiler) from Debian 12 Bookworm. But do note that it will still replace some gcc libraries with updated versions, which could break your system. Take note which packages are replaced with the updated ones so that you can later downgrade them to restore the system to the previous state. However, if the system is valuable, I would recommend setting up a VM or container with Debian 12 or Ubuntu 22.04 (those have both gcc 11 and 12 in stock repos).