Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shared library directory between R-release and R-devel causes problems #3

dtenenba opened this issue Mar 7, 2016 · 4 comments


Copy link

@dtenenba dtenenba commented Mar 7, 2016

The following sequence of commands:

docker run --name foo -ti --rm rocker/drd RD
# then in R-devel:
download.file("", './')
install.packages("atestpackage-master", repos=NULL)

Results in this:

** testing if installed package can be loaded
Error in get(name, envir = asNamespace(pkg), inherits = FALSE) :
  object 'checkCompilerOptions' not found
Calls: ::: -> get
Execution halted
ERROR: loading failed

The reason is that .libPaths() includes /usr/lib/R/library which is a library tree for R-3.2.3 (not devel) and the old version of the compiler package is picked up during installation of this sample package which has ByteCompile: TRUE in its DESCRIPTION.

Removing /usr/lib/R/library or changing .libPaths() to exclude it works around this issue.

The issue is also present in rocker/rstudio-daily, but the docker command needs to be replaced with:

docker run -ti --rm rocker/rstudio-daily /usr/local/bin/R

This comment has been minimized.

Copy link

@eddelbuettel eddelbuettel commented Mar 7, 2016

I am really not too interested in these reports.

edd@max:~$ docker run -ti --rm rocker/drd /bin/bash                                                                                                                                                                 
root@e3bb3645333c:/# apt-get update 2>&1 > /dev/null
root@e3bb3645333c:/# apt-get install git 2>&1 > /dev/null                                                                                                                                                           
debconf: delaying package configuration, since apt-utils is not installed
root@e3bb3645333c:/# cd /tmp
root@e3bb3645333c:/tmp# git clone
Cloning into 'atestpackage'...
remote: Counting objects: 13, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 13 (delta 2), reused 13 (delta 2), pack-reused 0
Unpacking objects: 100% (13/13), done.
Checking connectivity... done.
root@e3bb3645333c:/tmp# RD CMD build atestpackage/
* checking for file ‘atestpackage/DESCRIPTION’ ... OK
* preparing ‘atestpackage’:
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building ‘atestpackage_0.0.0.9000.tar.gz’

root@e3bb3645333c:/tmp# RD CMD INSTALL atestpackage_0.0.0.9000.tar.gz 
* installing to library ‘/usr/local/lib/R/site-library’
* installing *source* package ‘atestpackage’ ...
** R
** byte-compile and prepare package for lazy loading
** help
No man pages found in package  ‘atestpackage’ 
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (atestpackage)

This comment has been minimized.

Copy link

@dtenenba dtenenba commented Mar 7, 2016

Yep, I get the same results. However, installing the package with install.packages() from within R causes the problem. Apparently the two different installation methods use different libPaths().


This comment has been minimized.

Copy link

@eddelbuettel eddelbuettel commented Mar 7, 2016

That should be traceable. I tend to always install at the command-line to that explicit use became the implicit service guaranty...


This comment has been minimized.

Copy link

@jangorecki jangorecki commented Apr 11, 2016

I get the same issue, as one function I've called with RDscript -e used install.packages.

RDscript -e 'p::f()'

This workaround helped me

RDscript -e '.libPaths(setdiff(.libPaths(), "/usr/lib/R/library")); p::f()'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.