Skip to content
Prev 378027 / 398502 Next

g++ error causes non-zero exit status for package installation

On Sat, Jan 5, 2019 at 9:41 AM Dirk Eddelbuettel <edd at debian.org> wrote:
Interesting problem.  One way to workaround this startup issue with:

  PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"`

used by minqa:src/Makevars
(https://r-forge.r-project.org/scm/viewvc.php/pkg/minqa/src/Makevars?view=markup&root=optimizer),
could be to use something like:

  PKG_LIBS = `Rscript -e "cat('LDFLAGS:\n')" -e "Rcpp:::LdFlags()" |
grep -A 999 "LDFLAGS:" | grep -v "LDFLAGS:"`

and analogously for src/Makevars.win.

But in the bigger picture, maybe there's room for an R/Rscript option
to silence all R startup stdout and/or stderr output?  For example,

  Rscript --quiet-startup -e "Rcpp:::LdFlags()"`

/Henrik

PS. It's probably better to output to stderr in .Rprofile, e.g. by
always using message() instead of cat(). However, that cannot be
assumed to always be the case.