From |uc@r @end|ng |rom |edor@project@org  Wed Feb  8 11:24:02 2023
From: |uc@r @end|ng |rom |edor@project@org (=?UTF-8?Q?I=C3=B1aki_Ucar?=)
Date: Wed, 8 Feb 2023 11:24:02 +0100
Subject: [Rd] Compiling R-devel on older Linux distributions,
 e.g. RHEL / CentOS 7
In-Reply-To: <920cbd04-cae4-7e8a-2c12-5a9361a459d7@stats.ox.ac.uk>
References: <CABtg=KnOdkTL1L3wK=Q7D1vi6ubOz=1vM0r2TY_W498h_HxUqg@mail.gmail.com>
 <920cbd04-cae4-7e8a-2c12-5a9361a459d7@stats.ox.ac.uk>
Message-ID: <CALEXWq3c9Q0yNAzK0q17TBX-yJ9boxW+ZShZmha1XijAjBn=dQ@mail.gmail.com>

On Wed, 8 Feb 2023 at 07:05, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
>
> On 08/02/2023 00:13, G?bor Cs?rdi wrote:
> > As preparation for the next release, I am trying to compile R devel on
> > RHEL / CentOS 7, which is still supported by RedHat until 2024 June.

True, but with a big asterisk. Full updates ended on 2020-08-06, and
it's been in maintenance mode since then, meaning that only security
and critical fixes are released until EOL to facilitate a transition
to a newer version. So CentOS 7 users shouldn't expect new releases of
software to be available.

> > There are two issues.
> >
> > One is that the libcurl version in CentOS 7 is quite old, 7.29.0, and
> > R devel now requires 7.32.0, since 83715 about a week ago. This
> > requirement is here to stay for R 4.3.0, right?

I suppose that if R-devel doesn't use any API endpoint not available
in 7.29, you could just patch out that requirement. Otherwise, you
would need to build your own.

> Unless we revert it.  The comment in the manual says
>
> @c libcurl 7.32.0 was released in Aug 2013
>
> and Centos 7 was released in 2014-07-07, 11 months later.  Do they
> really never security-patch libcurl?

Oh, they do port all security fixes, but without changing the version,
which is the whole point of LTS. In fact, current version is
7.29.0-59, and there are probably a hundred patches on top of those 59
builds.

> > The second is that the recommended packages are now installed with R
> > CMD INSTALL --use-C17, which fails on CentOS 7 with
> >
> > begin installing recommended package MASS
> > * installing *source* package 'MASS' ...
> > ** package 'MASS' successfully unpacked and MD5 sums checked
> > ** using non-staged installation
> > ** libs
> > Error: C17 standard requested but CC17 is not defined
> > * removing '/root/R-devel/library/MASS'
> >
> > CentOS 7 has GCC 4.8.5, which does not have a -std=gnu17 option.
> > However the commit message of this change in commit 83566 hints that
> > this requirement might be temporary. Hence my questions.
>
> It is temporary -- needed for survival (now updated) and mgcv (awaited).
>   However,
>
> 1) You should be able to set
>
> CC17="gcc -std=gnu11"
>
> in config.site, as C17 is a bug-fixed C11.
>
> 2) Centos 7 has later compilers available, and people are going to need
> them for C++.  The manual says
>
>      ... later compilers are available: for RHEL/Centos 7 look for
> ?devtoolset?.

Exactly, here is the reference:
https://www.softwarecollections.org/en/scls/rhscl/devtoolset-7/

R 3.6.0 is the last version we support in EPEL, because EPEL is not
allowed to build on top of SCL. But you can enable SCL and install the
devtoolset available, which contains gcc version 7.3.1.

But anyway, I don't think that staying in an almost 10-year old distro
in maintenance mode and at the same time expecting a cutting-edge
version of R (or any software) is reasonable.

I?aki

> > Is the C17 requirement temporary or it will be a requirement for R 4.3.0?
> > Should I expect any problems if I remove the --use-C17 flag for
> > installing the recommended packages?
>
> Not with that compiler.
>
> >
> > There are a lot of R users still on RHEL 7, so it would be great to
> > know what to expect for the next release.
> an D. Ripley,                  ripley at stats.ox.ac.uk
> Emeritus Professor of Applied Statistics, University of Oxford
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



-- 
I?aki ?car



[Rd] Compiling R-devel on older Linux distributions, e.g. RHEL / CentOS 7
=?UTF-8?Q?I=C3=B1aki_Ucar?=