Linux flavors - opinions

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Daniel Shawul
Posts: 3758
Joined: Tue Mar 14, 2006 10:34 am
Location: Ethiopia
Contact:

Re: Linux flavors - opinions

Post by Daniel Shawul » Sat Jun 29, 2019 6: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.

User avatar
lucasart
Posts: 3041
Joined: Mon May 31, 2010 11:29 am
Full name: lucasart
Contact:

Re: Linux flavors - opinions

Post by lucasart » Sun Jun 30, 2019 12:01 am

Daniel Shawul wrote:
Sat Jun 29, 2019 6: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: 10124
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Linux flavors - opinions

Post by Dann Corbit » Sun Jun 30, 2019 1:38 am

zullil wrote:
Fri Jun 28, 2019 9:21 pm
Dann Corbit wrote:
Fri Jun 28, 2019 6: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: 3825
Joined: Fri Mar 10, 2006 4:23 am
Location: http://www.arasanchess.org

Re: Linux flavors - opinions

Post by jdart » Sun Jun 30, 2019 2:27 am

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

--Jon

Dann Corbit
Posts: 10124
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Linux flavors - opinions

Post by Dann Corbit » Sun Jun 30, 2019 3: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.

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.

Look
Posts: 238
Joined: Thu Jun 05, 2014 12:14 pm
Location: Iran
Full name: Mehdi Amini
Contact:

Re: Linux flavors - opinions

Post by Look » Sun Jun 30, 2019 1:39 pm

[...]
Dann Corbit wrote:
Sun Jun 30, 2019 3: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 .

jdart
Posts: 3825
Joined: Fri Mar 10, 2006 4:23 am
Location: http://www.arasanchess.org

Re: Linux flavors - opinions

Post by jdart » Sun Jun 30, 2019 2:29 pm

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: 4455
Joined: Tue Feb 28, 2012 10:56 pm

Re: Linux flavors - opinions

Post by syzygy » Sun Jun 30, 2019 4:39 pm

lucasart wrote:
Sun Jun 30, 2019 12:01 am
Daniel Shawul wrote:
Sat Jun 29, 2019 6: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: 4455
Joined: Tue Feb 28, 2012 10:56 pm

Re: Linux flavors - opinions

Post by syzygy » Sun Jun 30, 2019 4:44 pm

Dann Corbit wrote:
Sun Jun 30, 2019 3: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: 360
Joined: Sun Nov 08, 2015 10:10 pm

Re: Linux flavors - opinions

Post by noobpwnftw » Sun Jun 30, 2019 5:22 pm

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.

Post Reply