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

Clearly list system dependencies in documentation #2554

Closed
harmongray opened this issue Jan 21, 2024 · 1 comment
Closed

Clearly list system dependencies in documentation #2554

harmongray opened this issue Jan 21, 2024 · 1 comment

Comments

@harmongray
Copy link

Description of issue:

I think it would be an small QoL improvement for this package to clearly list the system dependencies.

While it may not be an issue on Windows, this is a common issue on Linux R packages.

I used the remotes::install_github("mdneuzerling/getsysreqs") package to list them clearly:

 [1] "git"                  "pandoc"               "make"                
 [4] "libssl-dev"           "libfreetype6-dev"     "libfribidi-dev"      
 [7] "libharfbuzz-dev"      "libfontconfig1-dev"   "libxml2-dev"         
[10] "libgit2-dev"          "zlib1g-dev"           "libcurl4-openssl-dev"
[13] "libjpeg-dev"          "libpng-dev"           "libtiff-dev"         
[16] "libicu-dev"          

This has been an issue visible elsewhere on the web for newer R Linux users, but it has been specifically referenced in issue #2464.

While not something that is hard to debug, it could shave off 5-10 minutes off a development install of R on Ubuntu and follows common practice for other packages, such as bspm and the R V8 web assembly engine, that are more geared towards Linux developers.

Solution:

Listing the packages for their distribution method is a good addition to the documentation, i.e.:

sudo apt install git pandoc make libssl-dev libfreetype6-dev libfribidi-dev libharfbuzz-dev libfontconfig1-dev libxml2-dev libgit2-dev zlib1g-dev libcurl4-openssl-dev libjpeg-dev libpng-dev libtiff-dev libicu-dev

I know nobody likes when people raise documentation issues, but I really do think it would be a small but appreciated smoothing of the process for Linux users.

@hadley
Copy link
Member

hadley commented Apr 29, 2024

In general, I'd recommend using pak::pak() to install packages because it will automatically install system requirements if possible, and if not, tell you what packages you need to install.

If you don't want to turn over all installation to pak, you can instead just use it's systreqs facilities, eg.

pak::pkg_sysreqs("devtools")
#> ℹ Loading metadata database
#> ✔ Loading metadata database ... done
#> 
#> ── Install scripts  ─────────────────────────── Ubuntu NA ──
#> apt-get -y update
#> apt-get -y install git libcurl4-openssl-dev libssl-dev make zlib1g-dev pandoc \
#>   libfreetype6-dev libjpeg-dev libpng-dev libtiff-dev libicu-dev \
#>   libfontconfig1-dev libfribidi-dev libharfbuzz-dev libxml2-dev
#> 
#> ── Packages and their system dependencies ────────
#> credentials – git
#> curl        – libcurl4-openssl-dev, libssl-dev
#> fs          – make
#> gitcreds    – git
#> httpuv      – make, zlib1g-dev
#> knitr       – pandoc
#> openssl     – libssl-dev
#> pkgdown     – pandoc
#> ragg        – libfreetype6-dev, libjpeg-dev, libpng-dev, libtiff-dev
#> remotes     – git
#> rmarkdown   – pandoc
#> sass        – make
#> stringi     – libicu-dev
#> systemfonts – libfontconfig1-dev, libfreetype6-dev
#> textshaping – libfreetype6-dev, libfribidi-dev, libharfbuzz-dev
#> xml2        – libxml2-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants