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

Fails to install rlang DLL on Windows #131

Closed
yutannihilation opened this Issue May 8, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@yutannihilation
Copy link
Contributor

yutannihilation commented May 8, 2018

I saw this warning when I build rlang by the RStudio's build button on my local Windows:

installing to C:/Users/user1/Documents/R/win-library/3.5/rlang/libs/x64
Warning in file.copy(files, dest, overwrite = TRUE) :
  problem copying .\rlang.dll to C:\Users\user1\Documents\R\win-library\3.5\rlang\libs\x64\rlang.dll: Permission denied

This kind of "Permission denied" is a common error on Windows. Maybe this is because I'm using the DLL as the package is loaded, so, usually, restarting the R session will make things work. But, for rlang, it won't.

In my understanding, this is because devtools or remotes package imports rlang in their dependency chains. Can I install rlang cleanly on Windows?

Now I use the workaround bellow:

devtools::build('.')
# (restart R session)
install.packages("../rlang_0.x.x.tar.gz", repos = NULL)
@gaborcsardi

This comment has been minimized.

Copy link
Member

gaborcsardi commented May 8, 2018

remotes has no hard dependencies, so it should work I think. This should also work:

source("https://install-github.me/r-lib/rlang")
@yutannihilation

This comment has been minimized.

Copy link
Contributor Author

yutannihilation commented May 8, 2018

Thanks. I meant, these two failed:

  • "build" on RStudio
  • devtools::install_github()

I will try remotes::install_github() later.

@yutannihilation

This comment has been minimized.

Copy link
Contributor Author

yutannihilation commented May 8, 2018

Hi, I saw the same warning with remotes::install_github() on the fresh R session on RStudio. source("https://install-github.me/r-lib/rlang") succeeds, by the way.

But, if I execute Rscript.exe' -e "remotes::install_github('tidyverse/rlang')" on PowerShell, the warning doesn't occur. So, I suspect RStudio is somehow involved here.

However, if RStudio is the cause, why did I succeed with install.packages() or source() even when I'm on RStudio? I have no I idea... Do you think I should move this issue to RStudio's repo? Or, as the situation is very vague, should I ask on RStudio Community?

@gaborcsardi

This comment has been minimized.

Copy link
Member

gaborcsardi commented May 8, 2018

Basically the issue is if rlang is loaded in any R session. So even if it is not loaded in the current session, but it is loaded in another one, the installer will fail to update the DLL file.

I don't think RStudio can do much about this. The devtools toolchain will have a better package installer soon, it will hopefully fix this issue.

@yutannihilation

This comment has been minimized.

Copy link
Contributor Author

yutannihilation commented May 8, 2018

I know. But, this time, RStudio is the only session I concsiously used. So, I suspect RStudio hooks something that needs rlang when the package is loaded by ::.

To be clear, I'm not complaining about remotes, rlang, or RStudio because it's natural the packages or RStudio can't do this nice, as you wrote, if the DLL is used outside of the current session.

Thanks for the good news about the new toolchain :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment