-
Notifications
You must be signed in to change notification settings - Fork 59
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
pak often forgets how to build from source #103
Comments
|
Ok here it is [master] > pak:::pkg_data$remote$run_with_output(function() pkgbuild::has_build_tools(TRUE))
$code
[1] 200
$message
[1] "done file1837474d2bd7f"
$result
[1] FALSE
$stdout
[1] "Running /Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB foo.c\nccache clang -Qunused-arguments -I\"/Library/Frameworks/R.framework/Resources/include\" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c foo.c -o foo.o\n\033[31m/bin/sh: ccache: command not found\n\033[39m\033[31mmake: *** [foo.o] Error 127\n\033[39m"
$stderr
[1] "Trying to compile a simple C file\n"
$error
NULL
attr(,"class")
[1] "callr_session_result" |
Aha! |
@hadley how did you install and set up |
My
And |
@hadley One last question. Do you have |
I change it in my bash profile:
|
I think that profile does not run when you start RStudio from the GUI. But still, Also, can you pls run these from an RStudio that you started from a GUI: Sys.getenv("PATH")
callr::r(function() Sys.getenv("PATH")) Thanks! |
By hand, from console Sys.getenv("PATH")
#> [1] "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/TeX/texbin:/opt/X11/bin:/Applications/Wireshark.app/Contents/MacOS"
callr::r(function() Sys.getenv("PATH"))
#> [1] "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/TeX/texbin:/opt/X11/bin:/Applications/Wireshark.app/Contents/MacOS" And as reprex, just to check they're the same: Sys.getenv("PATH")
#> [1] "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/TeX/texbin:/opt/X11/bin:/Applications/Wireshark.app/Contents/MacOS"
callr::r(function() Sys.getenv("PATH"))
#> [1] "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/TeX/texbin:/opt/X11/bin:/Applications/Wireshark.app/Contents/MacOS" Created on 2019-06-25 by the reprex package (v0.2.1.9000) |
Run |
callr::r(function() Sys.getenv("PATH"))
#> [1] "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/TeX/texbin:/opt/X11/bin:/Applications/Wireshark.app/Contents/MacOS"
pak:::pkg_data$remote$run_with_output(function() Sys.getenv("PATH"))$result
#> [1] "/usr/bin:/bin:/usr/sbin:/sbin" |
So for record, this is what happens.
So when RStudio starts up and runs the |
@gaborcsardi Just saw your userR! presentation, regarding the question about caching compiled packages, I wanted to add on: Would it make sense to suggest installation of |
@nlbjan1 maybe we could suggest it in the documentation. I would probably not install it from pak, because that's a system task. |
Need a : separator between the current path, and the newly added values. Really fixes #103.
As a reaction to a question raised in the audience during userR! and the discussion on r-lib#103, an extra section in the README that explains (hopefully clearly) how to setup ccache for use with R and pak to speed up installation of packages that need compilation. Credits to @eddelbuettel for making me aware of this idea. Settings taken from his blog at http://dirk.eddelbuettel.com/blog/2017/11/27/ Compared to the post I've reduced maximum cache size from 5G to 1G as installation of packages tidyverse and data.table only generates of 127mb of cache and extended the inline comments somewhat.
As a reaction to a question raised in the audience during userR! and the discussion on r-lib#103, an extra section in the README that explains (hopefully clearly) how to setup ccache for use with R and pak to speed up installation of packages that need compilation. Credits to @eddelbuettel for making me aware of this idea. Settings taken from his blog at http://dirk.eddelbuettel.com/blog/2017/11/27/ Compared to the post I've reduced maximum cache size from 5G to 1G as installation of packages tidyverse, devtools and data.table only generates less than 150M of cache and extended the inline comments somewhat.
As a reaction to a question raised in the audience during userR! and the discussion on r-lib#103, an extra section in the README that explains (hopefully clearly) how to setup ccache for use with R and pak to speed up installation of packages that need compilation. Credits to @eddelbuettel for making me aware of this idea. Settings taken from his blog at http://dirk.eddelbuettel.com/blog/2017/11/27/ Compared to the post I've reduced maximum cache size from 5G to 1G as installation of packages tidyverse, devtools and data.table only generates less than 150M of cache and extended the inline comments somewhat.
As a reaction to a question raised in the audience during userR! and the discussion on r-lib#103, an extra section in the README that explains (hopefully clearly) how to setup ccache for use with R and pak to speed up installation of packages that need compilation. Credits to @eddelbuettel for making me aware of this idea. Settings taken from his blog at http://dirk.eddelbuettel.com/blog/2017/11/27/ Compared to the post I've reduced maximum cache size from 5G to 1G as installation of packages tidyverse, devtools and data.table only generates less than 150M of cache and extended the inline comments somewhat.
As a reaction to a question raised in the audience during userR! and the discussion on r-lib#103, an extra section in the README that explains (hopefully clearly) how to setup ccache for use with R and pak to speed up installation of packages that need compilation. Credits to @eddelbuettel for making me aware of this idea. Settings taken from his blog at http://dirk.eddelbuettel.com/blog/2017/11/27/ Compared to the post I've reduced maximum cache size from 5G to 1G as installation of packages tidyverse, devtools and data.table generates less than 150M of cache files and extended the inline comments somewhat.
I didn't realize that my reference in the commit and editing it would spam this thread :( In any case, I've added a paragraph on this in the README. |
After running
The problem appears to go away. Running
pak_setup()
also seems to fix the problem. I don't know why it fails in the first place (since I should always be able to compile packages). I can't reliably trigger it, but it happens to me pretty frequently.The text was updated successfully, but these errors were encountered: