Dirk Eddelbuettel
2019-Jan-05 17:40 UTC
[R] g++ error causes non-zero exit status for package installation
On 5 January 2019 at 09:14, William Dunlap via R-help wrote: | You would get these errors ("R: file or directory not found, version: file | or directory not found...") if you had a ~/.Rprofile file containing the | line 'cat(version$version.string, sep="\n"). Well spotted -- very much so. That is bound to break use within src/Makevars and alike. If you must do something in ~/.Rprofile either make it silent, or make it conditional based on if (interactive()) { ...that_code_here... } Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
Winfried Moser
2019-Jan-05 19:40 UTC
[R] g++ error causes non-zero exit status for package installation
dirk & bill, you guys are incredible! the non-silent .Rprofile was the problem! making the code interactive didn't help either, only silenceing it helped! thanks so much! i assume moving to r-sig-debian is now obsolete. ps, @dirk: adding michael rutters ppa also helped, but the packages get installed to R_LIBS_SITE, and not (as i am used to) to R_LIBS-USER. but this was only a minor inconvinience (i like to keep the packages in one directory). thanks again! winfried Am Sa., 5. Jan. 2019 um 18:40 Uhr schrieb Dirk Eddelbuettel <edd at debian.org>:> > On 5 January 2019 at 09:14, William Dunlap via R-help wrote: > | You would get these errors ("R: file or directory not found, version: > file > | or directory not found...") if you had a ~/.Rprofile file containing the > | line 'cat(version$version.string, sep="\n"). > > Well spotted -- very much so. That is bound to break use within > src/Makevars > and alike. If you must do something in ~/.Rprofile either make it silent, > or > make it conditional based on if (interactive()) { ...that_code_here... } > > Dirk > > -- > http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org >[[alternative HTML version deleted]]
Dirk Eddelbuettel
2019-Jan-05 20:14 UTC
[R] g++ error causes non-zero exit status for package installation
On 5 January 2019 at 20:40, Winfried Moser wrote: | dirk & bill, you guys are incredible! the non-silent .Rprofile was the | problem! | making the code interactive didn't help either, only silenceing it helped! Good to know you have it fixed. | thanks so much! i assume moving to r-sig-debian is now obsolete. | | ps, @dirk: adding michael rutters ppa also helped, but the packages get | installed to R_LIBS_SITE, and not (as i am used to) to R_LIBS-USER. | but this was only a minor inconvinience (i like to keep the packages in one | directory). No, it is even more fine grained: - r-cran-* packages always install in /usr/lib/R/site-library - (One exception: Base R and recommended packages go to /usr/lib/R/library ) - local "from source" installation goes by default to /usr/local/lib/R/site-library and the third part is much better for multi-user setting. See the comments in the file /etc/R/Renviron.site if you want to change this. This has been our default since about 2003 or 2004 when Kurt Hornik and Fritz Leisch convinced me of that approach in a Vienna bar. It is better. And this discussion too belonged on r-sig-debian so let's stop here. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
Henrik Bengtsson
2019-Jan-05 21:13 UTC
[R] 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:> > > On 5 January 2019 at 09:14, William Dunlap via R-help wrote: > | You would get these errors ("R: file or directory not found, version: file > | or directory not found...") if you had a ~/.Rprofile file containing the > | line 'cat(version$version.string, sep="\n"). > > Well spotted -- very much so. That is bound to break use within src/Makevars > and alike. If you must do something in ~/.Rprofile either make it silent, or > make it conditional based on if (interactive()) { ...that_code_here... }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.> > Dirk > > -- > http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Dirk Eddelbuettel
2019-Jan-05 21:32 UTC
[R] g++ error causes non-zero exit status for package installation
On 5 January 2019 at 13:13, Henrik Bengtsson wrote: | On Sat, Jan 5, 2019 at 9:41 AM Dirk Eddelbuettel <edd at debian.org> wrote: | > | > | > On 5 January 2019 at 09:14, William Dunlap via R-help wrote: | > | You would get these errors ("R: file or directory not found, version: file | > | or directory not found...") if you had a ~/.Rprofile file containing the | > | line 'cat(version$version.string, sep="\n"). | > | > Well spotted -- very much so. That is bound to break use within src/Makevars | > and alike. If you must do something in ~/.Rprofile either make it silent, or | > make it conditional based on if (interactive()) { ...that_code_here... } | | 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), Nothing like 'Read the source, Luke!' :) The *real* problem here is that command has been *obsolete* since early 2014 or for almost five years -- Rcpp does NOT require linking! Hence the command is a null-op now, provided for backwards-compatibility: R> Rcpp:::LdFlags() R> Then again minqa has not been updated since 2014 either so there... Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org