new versions of gcc on Debian Linux

By: Andrey (andrey.semashev.delete@this.gmail.com), September 20, 2022 9:46 am
Room: Moderated Discussions
Michael S (already5chosen.delete@this.yahoo.com) on September 20, 2022 2:05 am wrote:
> anon2 (anon.delete@this.anon.com) on September 19, 2022 3:51 pm wrote:
> > Michael S (already5chosen.delete@this.yahoo.com) on September 19, 2022 2:45 pm wrote:
> > > Andrey (andrey.semashev.delete@this.gmail.com) on September 19, 2022 2:08 pm wrote:
> > > > 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.
> > >
> > >
> > > Thank you.
> > > Unfortunately, your advice is yet another example of suggestion that is above my skills level.
> > >
> > > Coming from DOS/Windows background where any compiler is just another application
> > > program, I find a tight coupling between C compiler and operation system, that
> > > is so common in the Unix world, rather hard to comprehend. And to justify.
> > >
> > > > 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).
> > > >
> > >
> > > The system is not particularly valuable, but the test that I want
> > > to run is also not sufficiently valuable to go that far.
> > >
> > > More and more it seems that compiling from source is the simplest option.
> > > But it's not urgent so I'd wait for more suggestions.
> > >
> >
> > Try add this to /etc/apt/sources.list
> >
> >
> > deb http://deb.debian.org/debian/ unstable main contrib
> > deb-src http://deb.debian.org/debian/ unstable main contrib
> >


I would recommend "testing" instead of "unstable" here and in the apt-get command below. Testing is Debian 12, which does undergo more testing than Sid.

> > Then run these
> >
> >
> > apt-get update
> > apt-get -t unstable install gcc-12
> >

>
> Thank you.
> It was simple and pretty close to what I wanted.
>
> So far I observed only one undesirable effect: system-wide
> upgrade of binutils from version 2.35.2 to 2.38.90.
> On this particular experimental installation it is acceptable, but I still wonder
> how can I install newer tools in a way that does not affect "system" at all.

Compiler depends on runtime libraries like libstdc++ and libgcc_s that are used by a large portion of software running on the system. gcc team is trying very hard to maintain ABI compatibility between different compiler releases so that an upgrade of these libraries doesn't break the system. But as always, $hit happens sometimes. This is why I recommended to take not what is installed so that later you could revert.

As for binutils, I don't know for certain, but there could be some bug fix or a new feature, besides new instructions, that is relied upon by the new compiler.
< Previous Post in ThreadNext Post in Thread >
TopicPosted ByDate
new versions of gcc on Debian LinuxMichael S2022/09/19 10:28 AM
  new versions of gcc on Debian LinuxAndrey2022/09/19 02:08 PM
    new versions of gcc on Debian LinuxMichael S2022/09/19 02:45 PM
      new versions of gcc on Debian Linuxanon22022/09/19 03:51 PM
        new versions of gcc on Debian LinuxMichael S2022/09/20 02:05 AM
          new versions of gcc on Debian Linuxanon22022/09/20 02:55 AM
            new versions of gcc on Debian Linuxanon2022/09/20 12:06 PM
          new versions of gcc on Debian Linux-.-2022/09/20 07:02 AM
          new versions of gcc on Debian LinuxAdrian2022/09/20 07:23 AM
            new versions of gcc on Debian LinuxAndrey2022/09/20 09:35 AM
              new versions of gcc on Debian LinuxAdrian2022/09/20 08:44 PM
                new versions of gcc on Debian LinuxAndrey2022/09/21 03:45 AM
                  new versions of gcc on Debian LinuxAdrian2022/09/21 04:42 AM
          new versions of gcc on Debian LinuxMark C2022/09/20 08:15 AM
          new versions of gcc on Debian LinuxAndrey2022/09/20 09:46 AM
          new versions of gcc on Debian Linuxgoose2022/09/20 11:36 PM
      new versions of gcc on Debian LinuxAndrey2022/09/20 09:54 AM
        new versions of gcc on Debian Linuxnone2022/09/20 10:30 AM
Reply to this Topic
Name:
Email:
Topic:
Body: No Text
How do you spell tangerine? 🍊