Page 2 of 3

Re: Linux flavors - opinions

Posted: Sat Jun 29, 2019 8:47 am
by Daniel Shawul
Ubuntu has gcc 7.0 by default which is fine, but CentOS 7 on the other hand comes with 4.8.5 which is a royal pain.
It can't compile my fortran 2008 and c++11 codes most of the time.

Code: Select all

yum-config-manager --enable rhel-server-rhscl-7-rpms \
   && yum -y install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-gcc-gfortran devtoolset-7-gdb
Then you have to source it "source scl_source enable devtoolset-7" everytime you want to use it .. The other option
is to compile the compiler itself from source. Good luck with that.

Re: Linux flavors - opinions

Posted: Sun Jun 30, 2019 2:01 am
by lucasart
Daniel Shawul wrote: Sat Jun 29, 2019 8:47 am Ubuntu has gcc 7.0 by default which is fine, but CentOS 7 on the other hand comes with 4.8.5 which is a royal pain.
It can't compile my fortran 2008 and c++11 codes most of the time.

Code: Select all

yum-config-manager --enable rhel-server-rhscl-7-rpms \
   && yum -y install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-gcc-gfortran devtoolset-7-gdb
Then you have to source it "source scl_source enable devtoolset-7" everytime you want to use it .. The other option
is to compile the compiler itself from source. Good luck with that.
CentOS is garbage. This is well known. No one in their right mind should choose this. Of course some people are forced to use it because it has been installed for them on their work machine. But we are talking about choice here.

Re: Linux flavors - opinions

Posted: Sun Jun 30, 2019 3:38 am
by Dann Corbit
zullil wrote: Fri Jun 28, 2019 11:21 pm
Dann Corbit wrote: Fri Jun 28, 2019 8:40 pm I use Ubuntu, but one thing about it really bothers me.
You have to jump through hoops in order to get a modern gcc compiler on it.
The one you will collect by installing the standard programming packages is some crusty, ancient 4.xx gcc from a decade ago.
(No, really).
I was able to get 7.xx by looking around and finding an experimental distribution.

The enormous irony here is that I am running gcc 9.xx on my Windows PCs using MSYS2.
And you get it automatically as the native gcc compiler system and not an add-on.
Works for me: https://launchpad.net/~ubuntu-toolchain ... buntu/test
The highest version I can get to work on my system is gcc-8. I installed 9 and gcc-9 or g++-9 with version request gives GCC 9.1.0, but it won't build a working binary. I use Redhat, Centos, Suse and Solaris at work, and they all do things a little differently. I probably just need more practice with Ubuntu.

Re: Linux flavors - opinions

Posted: Sun Jun 30, 2019 4:27 am
by jdart
You can build gcc from source, but you need patience - it is a hella big compile.

--Jon

Re: Linux flavors - opinions

Posted: Sun Jun 30, 2019 5:11 am
by Dann Corbit
Here's the thing that annoys me.
Why does the system assume the ancient GCC is best?
If I install a new version, gcc or g++ should be the new version
If I want to use the old stuff,then fine:
gcc-crusty
g++-crusty
to get the old behavior.

Am I really the only one who feels that way?
I know I am splitting hairs.
But a hair up the nose can be annoying,

So here is my real question:
what is the best linux variant for the real programmer who wants to get work done?
I don't need kid gloves, but I want things to work in a way that seems logical to me.

Re: Linux flavors - opinions

Posted: Sun Jun 30, 2019 3:39 pm
by Look
[...]
Dann Corbit wrote: Sun Jun 30, 2019 5:11 am So here is my real question:
what is the best linux variant for the real programmer who wants to get work done?
I don't need kid gloves, but I want things to work in a way that seems logical to me.
Hi,
I have some experience with Ubuntu. If you want , you may try these distributions that I am not familiar with:

Fedora , Gentoo , openSUSE .

Re: Linux flavors - opinions

Posted: Sun Jun 30, 2019 4:29 pm
by jdart
Ubuntu is fine. If you are complaining about having a really old gcc (gcc 4.x) and you are on Ubuntu, then you are not on the latest release, where gcc 7.x is the default system compiler. Just install or upgrade to the latest LTS release (currently 18.04.2 LTS), then install "build-essentials" and "g++" or "g++-8" if you want that. You probably don't need gcc 9.

--Jon

Re: Linux flavors - opinions

Posted: Sun Jun 30, 2019 6:39 pm
by syzygy
lucasart wrote: Sun Jun 30, 2019 2:01 am
Daniel Shawul wrote: Sat Jun 29, 2019 8:47 am Ubuntu has gcc 7.0 by default which is fine, but CentOS 7 on the other hand comes with 4.8.5 which is a royal pain.
It can't compile my fortran 2008 and c++11 codes most of the time.

Code: Select all

yum-config-manager --enable rhel-server-rhscl-7-rpms \
   && yum -y install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-gcc-gfortran devtoolset-7-gdb
Then you have to source it "source scl_source enable devtoolset-7" everytime you want to use it .. The other option
is to compile the compiler itself from source. Good luck with that.
CentOS is garbage. This is well known. No one in their right mind should choose this. Of course some people are forced to use it because it has been installed for them on their work machine. But we are talking about choice here.
There seems to be a reason ("stability") why CentOS sticks to ancient kernels and packages from the time the pyramids were being built (indeed, the pyramids are still standing stably today as well), but I fully agree that installation of CentOS should be very strongly discouraged.

I'm running Fedora and it has gcc-9.1, which is the latest.

Re: Linux flavors - opinions

Posted: Sun Jun 30, 2019 6:44 pm
by syzygy
Dann Corbit wrote: Sun Jun 30, 2019 5:11 am Here's the thing that annoys me.
Why does the system assume the ancient GCC is best?
If I install a new version, gcc or g++ should be the new version
If I want to use the old stuff,then fine:
gcc-crusty
g++-crusty
to get the old behavior.
Set up your path correctly.

Self-compiled gcc should go into /usr/local/. Your path should have /usr/local/bin before /usr/bin.

If you upgrade gcc within your distribution, there should be no problem either or your distribution is broken.

Re: Linux flavors - opinions

Posted: Sun Jun 30, 2019 7:22 pm
by noobpwnftw
I've always preferred RHEL/CentOS due to the reason that it has a pretty closed package chain compared to the others. You know what to expect, including many problems due to obsolete packages of course, but few times it gives you surprises.
My experience with Ubuntu is things often times works on mine but not on yours due to subtle differences(like someone has a package too new) and system upgrade can break random things.

Its kernel looks old but it does have quite a lot of recent features back-ported, so it doesn't matter much, and devtoolset is a neat way to get newer compilers in a controlled environment.
For quick experiments you can run Ubuntu images on top of your base OS with Docker.