rocker-org / rocker-versioned

Run current & prior versions of R using docker
https://hub.docker.com/r/rocker/r-ver
GNU General Public License v2.0
297 stars 169 forks source link

Include libharfbuzz-dev and libfribidi-dev in rocker images #244

Closed lwaldron closed 4 years ago

lwaldron commented 4 years ago

libharfbuzz-dev and libfribidi-dev are required to install pkgdown (example below on rocker/verse:4.0.2). Especially for rocker/verse, pkgdown seems popular enough to merit a couple extra, small system dependencies.

$ docker run -it rocker/verse:4.0.2 R -e 'install.packages("pkgdown")'

R version 4.0.2 (2020-06-22) -- "Taking Off Again"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> install.packages("pkgdown")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
also installing the dependencies ‘brio’, ‘systemfonts’, ‘textshaping’, ‘downlit’, ‘ragg’

trying URL 'https://packagemanager.rstudio.com/all/__linux__/focal/latest/src/contrib/brio_1.1.0.tar.gz'
Content type 'binary/octet-stream' length 41481 bytes (40 KB)
==================================================
downloaded 40 KB

trying URL 'https://packagemanager.rstudio.com/all/__linux__/focal/latest/src/contrib/systemfonts_0.3.2.tar.gz'
Content type 'binary/octet-stream' length 1800620 bytes (1.7 MB)
==================================================
downloaded 1.7 MB

trying URL 'https://packagemanager.rstudio.com/all/__linux__/focal/latest/src/contrib/textshaping_0.1.1.tar.gz'
Content type 'binary/octet-stream' length 28768 bytes (28 KB)
==================================================
downloaded 28 KB

trying URL 'https://packagemanager.rstudio.com/all/__linux__/focal/latest/src/contrib/downlit_0.2.0.tar.gz'
Content type 'binary/octet-stream' length 93732 bytes (91 KB)
==================================================
downloaded 91 KB

trying URL 'https://packagemanager.rstudio.com/all/__linux__/focal/latest/src/contrib/ragg_0.4.0.tar.gz'
Content type 'binary/octet-stream' length 416384 bytes (406 KB)
==================================================
downloaded 406 KB

trying URL 'https://packagemanager.rstudio.com/all/__linux__/focal/latest/src/contrib/pkgdown_1.6.1.tar.gz'
Content type 'binary/octet-stream' length 486900 bytes (475 KB)
==================================================
downloaded 475 KB

* installing *binary* package ‘brio’ ...
* DONE (brio)
* installing *binary* package ‘systemfonts’ ...
* DONE (systemfonts)
* installing *source* package ‘textshaping’ ...
** package ‘textshaping’ successfully unpacked and MD5 sums checked
** using staged installation
Package harfbuzz was not found in the pkg-config search path.
Perhaps you should add the directory containing `harfbuzz.pc'
to the PKG_CONFIG_PATH environment variable
No package 'harfbuzz' found
Package fribidi was not found in the pkg-config search path.
Perhaps you should add the directory containing `fribidi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fribidi' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lfreetype -lharfbuzz -lfribidi
--------------------------- [ANTICONF] --------------------------------
Configuration failed to find the harfbuzz freetype2 fribidi library. Try installing:
 * deb: libharfbuzz-dev libfribidi-dev (Debian, Ubuntu, etc)
 * rpm: harfbuzz-devel fribidi-devel (Fedora, EPEL)
 * csw: libharfbuzz_dev libfribidi_dev (Solaris)
 * brew: harfbuzz fribidi (OSX)
If harfbuzz freetype2 fribidi is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a harfbuzz freetype2 fribidi.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
<stdin>:1:10: fatal error: hb-ft.h: No such file or directory
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘textshaping’
* removing ‘/usr/local/lib/R/site-library/textshaping’
* installing *binary* package ‘downlit’ ...
* DONE (downlit)
ERROR: dependency ‘textshaping’ is not available for package ‘ragg’
* removing ‘/usr/local/lib/R/site-library/ragg’
* installing *binary* package ‘pkgdown’ ...
* DONE (pkgdown)

The downloaded source packages are in
    ‘/tmp/Rtmpbhj8Yg/downloaded_packages’
Warning messages:
1: In install.packages("pkgdown") :
  installation of package ‘textshaping’ had non-zero exit status
2: In install.packages("pkgdown") :
  installation of package ‘ragg’ had non-zero exit status
> 
cboettig commented 4 years ago

yeah makes sense, thanks. done

eddelbuettel commented 4 years ago

As discussed in some other places too, pkgdown dependencies ragg and textshaping are now fancier with more build-depends. And as we don't get system dependencies in automagically, this is likely the best we can do, at least for now.