I ran into an odd error while compiling some source code, and while poking around I found this for my gcc setup: | ● zypper se -is gcc | Loading repository data... | Reading installed packages... | | S | Name | Type | Version | Arch | Repository | ---+---------------------------+---------+---------------------------+--------+-------------------------- | i+ | gcc | package | 7-lp152.4.114 | x86_64 | Main Repository | i+ | gcc-c++ | package | 7-lp152.4.114 | x86_64 | Main Repository | i+ | gcc-fortran | package | 7-lp152.4.114 | x86_64 | Main Repository | i+ | gcc-info | package | 7-lp152.4.114 | x86_64 | Main Repository | i+ | gcc10-debugsource | package | 10.2.1+git583-lp152.2.2 | x86_64 | Update Repository (Debug) | i+ | gcc7 | package | 7.5.0+r278197-lp152.3.6.1 | x86_64 | openSUSE:Leap:15.2:Update | i+ | gcc7 | package | 7.5.0+r278197-lp152.3.6.1 | x86_64 | Main Update Repository | i+ | gcc7-c++ | package | 7.5.0+r278197-lp152.3.6.1 | x86_64 | openSUSE:Leap:15.2:Update | i+ | gcc7-c++ | package | 7.5.0+r278197-lp152.3.6.1 | x86_64 | Main Update Repository | i+ | gcc7-fortran | package | 7.5.0+r278197-lp152.3.6.1 | x86_64 | openSUSE:Leap:15.2:Update | i+ | gcc7-fortran | package | 7.5.0+r278197-lp152.3.6.1 | x86_64 | Main Update Repository | i+ | gcc7-info | package | 7.5.0+r278197-lp152.3.6.1 | noarch | openSUSE:Leap:15.2:Update | i+ | gcc7-info | package | 7.5.0+r278197-lp152.3.6.1 | noarch | Main Update Repository | i+ | gcc8-debugsource | package | 8.2.1+r264010-lp152.2.126 | x86_64 | Debug Repository | i+ | gcc9-debugsource | package | 9.3.1+git1296-lp152.2.3.1 | x86_64 | Update Repository (Debug) | i+ | gccmakedep | package | 1.0.3-lp152.3.2 | noarch | Main Repository | i+ | libgcc_s1 | package | 10.2.1+git583-lp152.2.2 | x86_64 | openSUSE:Leap:15.2:Update | i+ | libgcc_s1 | package | 10.2.1+git583-lp152.2.2 | x86_64 | Main Update Repository | i+ | libgcc_s1-32bit | package | 10.2.1+git583-lp152.2.2 | x86_64 | openSUSE:Leap:15.2:Update | i+ | libgcc_s1-32bit | package | 10.2.1+git583-lp152.2.2 | x86_64 | Main Update Repository | i+ | libgcc_s1-32bit-debuginfo | package | 10.2.1+git583-lp152.2.2 | x86_64 | Update Repository (Debug) | i+ | libgcc_s1-debuginfo | package | 10.2.1+git583-lp152.2.2 | x86_64 | Update Repository (Debug) | i+ | libstdc++6-devel-gcc7 | package | 7.5.0+r278197-lp152.3.6.1 | x86_64 | openSUSE:Leap:15.2:Update | i+ | libstdc++6-devel-gcc7 | package | 7.5.0+r278197-lp152.3.6.1 | x86_64 | Main Update Repository | i+ | libstdc++6-pp-gcc9 | package | 9.3.1+git1296-lp152.2.3.1 | x86_64 | openSUSE:Leap:15.2:Update | i+ | libstdc++6-pp-gcc9 | package | 9.3.1+git1296-lp152.2.3.1 | x86_64 | Main Update Repository | i+ | libstdc++6-pp-gcc9-32bit | package | 9.3.1+git1296-lp152.2.3.1 | x86_64 | openSUSE:Leap:15.2:Update | i+ | libstdc++6-pp-gcc9-32bit | package | 9.3.1+git1296-lp152.2.3.1 | x86_64 | Main Update Repository Surely it's not a good idea to have such a mixture of levels in use. What's a good, stable level to use in my Leap 15.2 system? Leslie -- openSUSE Leap 15.2 x86_64
On 2/11/21 8:38 AM, J Leslie Turriff wrote:
I ran into an odd error while compiling some source code, and while poking around I found this for my gcc setup:
| ● zypper se -is gcc | Loading repository data... | Reading installed packages... | | S | Name | Type | Version | Arch | Repository | ---+---------------------------+---------+---------------------------+--------+-------------------------- | i+ | gcc | package | 7-lp152.4.114 | x86_64 | Main Repository | i+ | gcc-c++ | package | 7-lp152.4.114 | x86_64 | Main Repository | i+ | gcc-fortran | package | 7-lp152.4.114 | x86_64 | Main Repository | i+ | gcc-info | package | 7-lp152.4.114 | x86_64 | Main Repository | i+ | gcc10-debugsource | package | 10.2.1+git583-lp152.2.2 | x86_64 | Update Repository (Debug) | i+ | gcc7 | package | 7.5.0+r278197-lp152.3.6.1 | x86_64 | openSUSE:Leap:15.2:Update
Surely it's not a good idea to have such a mixture of levels in use. What's a good, stable level to use in my Leap 15.2 system?
This is actually ok, the packages are designed so that you can have multiple installed. Its quite common for people to have multiple versions of gcc installed and use different versions for different projects. How this works in practice is if you run `gcc` you will get gcc 7 which is the version of gcc that Leap 15.0 was built with and will be the default compiler for the rest of the Leap 15 series. This version of gcc is too old for many projects which is why we also ship alternatives. If you want to build with gcc 10 you configure your builds to use the gcc-10 binary, if you are compiling by hand you can do this by calling gcc-10 instead of gcc, for almost any build system if you set the following environment variables `export CC=/usr/bin/gcc-10` `export CXX=/usr/bin/gcc-10` it will use that version of gcc instead, you can use the same method to use clang rather then gcc as well. To answer your question unless you know you need specific versions for specific projects having gcc 7 and gcc10 should cover pretty much everything (I guess the fact that we still ship others means that something still needs them). Cheers -- Simon Lees (Simotek) http://simotek.net Emergency Update Team keybase.io/simotek SUSE Linux Adelaide Australia, UTC+10:30 GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B
On 2021-02-10 17:08:51 Simon Lees wrote:
|On 2/11/21 8:38 AM, J Leslie Turriff wrote: |> I ran into an odd error while compiling some source code, and while |> poking around I found |> |> this for my gcc setup: |> | ● zypper se -is gcc |> | Loading repository data... |> | Reading installed packages... |> | |> | S | Name | Type | Version | |> | Arch | |> |> Repository |> |> | ---+---------------------------+---------+---------------------------+ |> |--------+-------------------------- i+ | gcc | |> | package | 7-lp152.4.114 | x86_64 | Main |> |> Repository |> |> | i+ | gcc-c++ | package | 7-lp152.4.114 | |> | x86_64 | Main |> |> Repository |> |> | i+ | gcc-fortran | package | 7-lp152.4.114 | |> | x86_64 | Main |> |> Repository |> |> | i+ | gcc-info | package | 7-lp152.4.114 | |> | x86_64 | Main |> |> Repository |> |> | i+ | gcc10-debugsource | package | 10.2.1+git583-lp152.2.2 | |> | x86_64 | Update |> |> Repository (Debug) |> |> | i+ | gcc7 | package | 7.5.0+r278197-lp152.3.6.1 | |> | x86_64 | |> |> openSUSE:Leap:15.2:Update |> |> Surely it's not a good idea to have such a mixture of levels in use. |> What's a good, stable level to use in my Leap 15.2 system? | |This is actually ok, the packages are designed so that you can have |multiple installed. Its quite common for people to have multiple |versions of gcc installed and use different versions for different | projects. | |How this works in practice is if you run `gcc` you will get gcc 7 which |is the version of gcc that Leap 15.0 was built with and will be the |default compiler for the rest of the Leap 15 series. This version of gcc |is too old for many projects which is why we also ship alternatives. If |you want to build with gcc 10 you configure your builds to use the |gcc-10 binary, if you are compiling by hand you can do this by calling |gcc-10 instead of gcc, for almost any build system if you set the |following environment variables `export CC=/usr/bin/gcc-10` `export |CXX=/usr/bin/gcc-10` it will use that version of gcc instead, you can |use the same method to use clang rather then gcc as well. | |To answer your question unless you know you need specific versions for |specific projects having gcc 7 and gcc10 should cover pretty much |everything (I guess the fact that we still ship others means that |something still needs them). | |Cheers
Okay, thanks. Leslie -- openSUSE Leap 15.2 x86_64
participants (2)
-
J Leslie Turriff
-
Simon Lees