[R] Issue building from source on RHEL7
Stéphane Plaisance
Steph@ne@P|@|@@nce @end|ng |rom v|b@be
Thu Jan 5 09:23:52 CET 2023
Dear,
After trying other methods, I finally went for the build from source as detailed on the RStudio site (https://docs.posit.co/resources/install-r-source/).
################
I did the following as per the info on the Posit page:
sudo yum-builddep R
export R_VERSION=4.2.2
curl -O https://cran.rstudio.com/src/base/R-4/R-${R_VERSION}.tar.gz<https://cran.rstudio.com/src/base/R-4/R-$%7bR_VERSION%7d.tar.gz>
$ tar -xzvf R-${R_VERSION}.tar.gz
$ cd R-${R_VERSION}
$ ./configure \
--prefix=/opt/R \
--enable-memory-profiling \
--enable-R-shlib \
--with-blas \
--with-lapack
$ make
$ make check
$ sudo make install
I could build R from source and the tests report success
$ make check
make[1]: Entering directory `/home/splaisan/Downloads/R-4.2.2/tests'
make[2]: Entering directory `/home/splaisan/Downloads/R-4.2.2/tests'
make[3]: Entering directory `/home/splaisan/Downloads/R-4.2.2/tests/Examples'
Testing examples for package ‘base’
Testing examples for package ‘tools’
comparing ‘tools-Ex.Rout’ to ‘tools-Ex.Rout.save’ ... OK
Testing examples for package ‘utils’
Testing examples for package ‘grDevices’
comparing ‘grDevices-Ex.Rout’ to ‘grDevices-Ex.Rout.save’ ... OK
Testing examples for package ‘graphics’
comparing ‘graphics-Ex.Rout’ to ‘graphics-Ex.Rout.save’ ... OK
Testing examples for package ‘stats’
comparing ‘stats-Ex.Rout’ to ‘stats-Ex.Rout.save’ ... OK
Testing examples for package ‘datasets’
comparing ‘datasets-Ex.Rout’ to ‘datasets-Ex.Rout.save’ ... OK
Testing examples for package ‘methods’
Testing examples for package ‘grid’
comparing ‘grid-Ex.Rout’ to ‘grid-Ex.Rout.save’ ... OK
Testing examples for package ‘splines’
comparing ‘splines-Ex.Rout’ to ‘splines-Ex.Rout.save’ ... OK
Testing examples for package ‘stats4’
comparing ‘stats4-Ex.Rout’ to ‘stats4-Ex.Rout.save’ ... OK
Testing examples for package ‘tcltk’
Testing examples for package ‘compiler’
Testing examples for package ‘parallel’
make[3]: Leaving directory `/home/splaisan/Downloads/R-4.2.2/tests/Examples'
make[2]: Leaving directory `/home/splaisan/Downloads/R-4.2.2/tests'
make[2]: Entering directory `/home/splaisan/Downloads/R-4.2.2/tests'
running strict specific tests
make[3]: Entering directory `/home/splaisan/Downloads/R-4.2.2/tests'
running code in 'eval-etc.R' ... OK
comparing 'eval-etc.Rout' to './eval-etc.Rout.save' ... OK
running code in 'simple-true.R' ... OK
comparing 'simple-true.Rout' to './simple-true.Rout.save' ... OK
running code in 'arith-true.R' ... OK
comparing 'arith-true.Rout' to './arith-true.Rout.save' ... OK
running code in 'arith.R' ... OK
comparing 'arith.Rout' to './arith.Rout.save' ... OK
running code in 'lm-tests.R' ... OK
comparing 'lm-tests.Rout' to './lm-tests.Rout.save' ... OK
running code in 'ok-errors.R' ... OK
comparing 'ok-errors.Rout' to './ok-errors.Rout.save' ... OK
running code in 'method-dispatch.R' ... OK
comparing 'method-dispatch.Rout' to './method-dispatch.Rout.save' ... OK
running code in 'any-all.R' ... OK
comparing 'any-all.Rout' to './any-all.Rout.save' ... OK
running code in 'structure.R' ... OK
comparing 'structure.Rout' to './structure.Rout.save' ... OK
running code in 'd-p-q-r-tests.R' ... OK
comparing 'd-p-q-r-tests.Rout' to './d-p-q-r-tests.Rout.save' ... OK
make[3]: Leaving directory `/home/splaisan/Downloads/R-4.2.2/tests'
running sloppy specific tests
make[3]: Entering directory `/home/splaisan/Downloads/R-4.2.2/tests'
running code in 'complex.R' ... OK
comparing 'complex.Rout' to './complex.Rout.save' ... OK
running code in 'print-tests.R' ... OK
comparing 'print-tests.Rout' to './print-tests.Rout.save' ... OK
running code in 'lapack.R' ... OK
comparing 'lapack.Rout' to './lapack.Rout.save' ... OK
running code in 'datasets.R' ... OK
comparing 'datasets.Rout' to './datasets.Rout.save' ... OK
running code in 'datetime.R' ... OK
comparing 'datetime.Rout' to './datetime.Rout.save' ... OK
running code in 'iec60559.R' ... OK
comparing 'iec60559.Rout' to './iec60559.Rout.save' ... OK
running code in 'eval-etc-2.R' ... OK
comparing 'eval-etc-2.Rout' to './eval-etc-2.Rout.save' ... OK
make[3]: Leaving directory `/home/splaisan/Downloads/R-4.2.2/tests'
make[3]: Entering directory `/home/splaisan/Downloads/R-4.2.2/tests'
checking Sys.timezone ...
make[4]: Entering directory `/home/splaisan/Downloads/R-4.2.2/tests'
running code in 'timezone.R' ... OK
make[4]: Leaving directory `/home/splaisan/Downloads/R-4.2.2/tests'
make[3]: Leaving directory `/home/splaisan/Downloads/R-4.2.2/tests'
make[2]: Leaving directory `/home/splaisan/Downloads/R-4.2.2/tests'
make[2]: Entering directory `/home/splaisan/Downloads/R-4.2.2/tests'
running regression tests ...
make[3]: Entering directory `/home/splaisan/Downloads/R-4.2.2/tests'
running code in 'array-subset.R' ... OK
running code in 'reg-tests-1a.R' ... OK
running code in 'reg-tests-1b.R' ... OK
running code in 'reg-tests-1c.R' ... OK
running code in 'reg-tests-1d.R' ... OK
running code in 'reg-tests-2.R' ... OK
comparing 'reg-tests-2.Rout' to './reg-tests-2.Rout.save' ... OK
running code in 'reg-examples1.R' ... OK
running code in 'reg-examples2.R' ... OK
running code in 'reg-packages.R' ... OK
running code in 'p-qbeta-strict-tst.R' ... OK
running code in 'd-p-q-r-tst-2.R' ... OK
running code in 'r-strict-tst.R' ... OK
running code in 'reg-IO.R' ... OK
comparing 'reg-IO.Rout' to './reg-IO.Rout.save' ... OK
running code in 'reg-IO2.R' ... OK
comparing 'reg-IO2.Rout' to './reg-IO2.Rout.save' ... OK
running code in 'reg-plot.R' ... OK
comparing 'reg-plot.pdf' to './reg-plot.pdf.save' ... OK
running code in 'reg-S4-examples.R' ... OK
running code in 'reg-BLAS.R' ... OK
make[3]: Leaving directory `/home/splaisan/Downloads/R-4.2.2/tests'
make[3]: Entering directory `/home/splaisan/Downloads/R-4.2.2/tests'
running code in 'reg-tests-3.R' ... OK
comparing 'reg-tests-3.Rout' to './reg-tests-3.Rout.save' ... OK
running code in 'reg-examples3.R' ... OK
comparing 'reg-examples3.Rout' to './reg-examples3.Rout.save' ... OK
running tests of plotting Latin-1
expect failure or some differences if not in a Latin-1 or UTF-8 locale
running code in 'reg-plot-latin1.R' ... OK
comparing 'reg-plot-latin1.pdf' to './reg-plot-latin1.pdf.save' ... OK
running code in 'reg-S4.R' ... OK
comparing 'reg-S4.Rout' to './reg-S4.Rout.save' ... OK
make[3]: Leaving directory `/home/splaisan/Downloads/R-4.2.2/tests'
make[2]: Leaving directory `/home/splaisan/Downloads/R-4.2.2/tests'
make[2]: Entering directory `/home/splaisan/Downloads/R-4.2.2/tests'
running tests of Internet functions
make[3]: Entering directory `/home/splaisan/Downloads/R-4.2.2/tests'
running code in 'internet.R' ... OK
comparing 'internet.Rout' to './internet.Rout.save' ...39d38
< [24] "</html>"
OK
make[3]: Leaving directory `/home/splaisan/Downloads/R-4.2.2/tests'
make[2]: Leaving directory `/home/splaisan/Downloads/R-4.2.2/tests'
make[1]: Leaving directory `/home/splaisan/Downloads/R-4.2.2/tests'
R almost works when run from the build /bin folder (besides a couple of warnings which I do not understand)
$ bin/R
Error in gzfile(file, "rb") : cannot open the connection
In addition: Warning message:
In gzfile(file, "rb") :
cannot open compressed file '/usr/lib64/R/library/base/R/base.rdx', probable reason 'No such file or directory'
Error: could not find function "attach"
R version 4.2.2 (2022-10-31) -- "Innocent and Trusting"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
Error: object '.ArgsEnv' not found
Fatal error: unable to initialize the JIT
Then when I run ‘sudo make install’, the prefix path only gets part of the expected folders and the resulting collection is not functional (it lacks even the library folder)
Can you please help me fix this?
Thanks in advance
Stephane
####################################
The resulting opt/R/ folder contains:
$ ll /opt/R/
total 4.0K
drwxr-xr-x. 5 root root 40 Jan 4 17:22 .
drwxr-xr-x. 18 root root 4.0K Jan 4 14:30 ..
drwxr-xr-x. 2 root root 28 Jan 4 17:22 bin
drwxr-xr-x. 4 root root 30 Jan 4 17:22 lib64
drwxr-xr-x. 3 root root 16 Jan 4 17:22 share
which is far from what I have on a functional different server (ubuntu 20)
$ ll /usr/lib/R
total 44K
drwxr-xr-x 8 root root 4.0K Nov 14 09:28 .
drwxr-xr-x 158 root root 12K Nov 18 06:20 ..
drwxr-xr-x 3 root root 4.0K Nov 14 09:28 bin
lrwxrwxrwx 1 root root 33 Nov 12 17:12 COPYING -> ../../share/common-licenses/GPL-2
drwxr-xr-x 2 root root 4.0K Nov 14 09:28 etc
drwxr-xr-x 2 root root 4.0K Nov 14 09:28 lib
drwxr-xr-x 32 root root 4.0K Sep 6 13:07 library
drwxr-xr-x 2 root root 4.0K Nov 14 09:28 modules
drwxr-xr-x 2 root root 4.0K Aug 11 02:31 site-library
-rw-r--r-- 1 root root 46 Nov 12 17:12 SVN-REVISION
[[alternative HTML version deleted]]
More information about the R-help
mailing list