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