R abuild

From Alpine Linux
Revision as of 23:05, 13 May 2016 by Jirutka (talk | contribs)

This page is just a workspace for issues and needs regarding to R abuild.


CRAN_mirrors.csv

Alba reported the following issue:

install.packages("ggplot2")
--- Please select a CRAN mirror for use in this session ---
Warning: failed to download mirrors file (cannot download all files);
using local file '/usr/share/doc/R//CRAN_mirrors.csv'
Error in file(file, "rt") : cannot open the connection
In addition: Warning messages:
1: In download.file(url, destfile = f, quiet = TRUE) :
URL 'https://cran.r-project.org/CRAN_mirrors.csv': status was
'Problem with the SSL CA cert (path? access rights?)'
2: In file(file, "rt") :
cannot open file '/usr/share/doc/R//CRAN_mirrors.csv': No such file
or directory

I can’t reproduce it; when I’ve tried it on fresh Alpine installation, works correctly for me.

It seems that sometimes R needs CRAN_mirrors.csv, but it apparently installs it into docs, so it’s separated in R-doc subpackage…


Plot and X11

For plotting X11 libs and other graphic libs are needed. Quite huge stuff. Maybe we should provide two packages, something like with OpenJDK – R as a full-blown package with all dependencies and R-base as a lightweight package without X11?


Installing R packages with C extensions

Some R packages (like ggplot2) contains C extensions, so it needs header files, make and probably the whole C build environment to build them.


Missing depends_dev

I forgot to add depends_dev. However, I don’t know how to find what exactly are dev dependencies of R. The same as makedepends?


R_HOME

I thought that environment variable R_HOME should be set globally. As I found some packages needs this variable. However, R complains:

WARNING: ignoring environment value of R_HOME


Martin Morgan explained me on r-help mailing list, that this variable is really not needed to be set system-wide.

R_HOME is set when R starts

~$ env|grep R_HOME ~$ R --vanilla -e "Sys.getenv('R_HOME')" > Sys.getenv('R_HOME') [1] "/home/mtmorgan/bin/R-3-3-branch"

and (after reading the documentation in ?R_HOME it the R help system)

~$ R RHOME /home/mtmorgan/bin/R-3-3-branch

so there is no need to set it in a system-wide profile. It is sometimes referenced inside an R package source tree that uses C or other compiled code in a Makevars file, as described in the 'Writing R Extensions' manual

https://cran.r-project.org/doc/manuals/r-release/R-exts.html e.g., the section on configure and cleanup

https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Configure-and-cleanup

In these circumstances it has been set by the R process that is compiling the source code.