Linux flavors - opinions

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Linux flavors - opinions

Post 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.
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Linux flavors - opinions

Post 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.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
Dann Corbit
Posts: 12538
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Linux flavors - opinions

Post 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.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
jdart
Posts: 4366
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: Linux flavors - opinions

Post by jdart »

You can build gcc from source, but you need patience - it is a hella big compile.

--Jon
Dann Corbit
Posts: 12538
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Linux flavors - opinions

Post 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.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
User avatar
Look
Posts: 364
Joined: Thu Jun 05, 2014 2:14 pm
Location: Iran
Full name: Mehdi Amini

Re: Linux flavors - opinions

Post 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 .
Farewell.
jdart
Posts: 4366
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: Linux flavors - opinions

Post 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
syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: Linux flavors - opinions

Post 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.
syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: Linux flavors - opinions

Post 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.
noobpwnftw
Posts: 560
Joined: Sun Nov 08, 2015 11:10 pm

Re: Linux flavors - opinions

Post 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.