ropensci / ruODK

ruODK: An R Client for the ODK Central API
https://docs.ropensci.org/ruODK/
GNU General Public License v3.0
41 stars 12 forks source link

build_vignettes fails on Ubuntu 20 #128

Closed yanokwa closed 2 years ago

yanokwa commented 3 years ago

Problem

Installation on Ubuntu 20 fails when trying to build_vignettes.

Reproducible example

> remotes::install_github(
+    "ropensci/ruODK@main",
+     force = TRUE,
+    dependencies = TRUE,
+    upgrade = "always",
+    build_vignettes = TRUE)
Downloading GitHub repo ropensci/ruODK@main

Running `R CMD build`...
* checking for file ‘/tmp/RtmpjZqHMc/remotes153eb33903798/ropensci-ruODK-3d13d8d/DESCRIPTION’ ... OK
* preparing ‘ruODK’:
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
* creating vignettes ... ERROR
--- re-building ‘comparison.Rmd’ using rmarkdown
--- finished re-building ‘comparison.Rmd’

--- re-building ‘odata-api.Rmd’ using rmarkdown
--- finished re-building ‘odata-api.Rmd’

--- re-building ‘restful-api.Rmd’ using rmarkdown
--- finished re-building ‘restful-api.Rmd’

--- re-building ‘setup.Rmd’ using rmarkdown
--- finished re-building ‘setup.Rmd’

--- re-building ‘spatial.Rmd’ using rmarkdown
Loading required package: sf
Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1
Loading required package: leafem
Loading required package: mapview
Warning: option 'fgb' requires GDAL >= 3.1.0! Your version is 3.0.4. Setting fgb = FALSE
Quitting from lines 106-133 (spatial.Rmd)
Error: processing vignette 'spatial.Rmd' failed with diagnostics:
package s2 required, please install it first
--- failed re-building ‘spatial.Rmd’

SUMMARY: processing the following file failed:
  ‘spatial.Rmd’

Error: Vignette re-building failed.
Execution halted
STDOUT:
* checking for file ‘/tmp/RtmpjZqHMc/remotes153eb33903798/ropensci-ruODK-3d13d8d/DESCRIPTION’ ... OK
* preparing ‘ruODK’:
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
* creating vignettes ... ERROR
--- re-building ‘comparison.Rmd’ using rmarkdown
--- finished re-building ‘comparison.Rmd’

--- re-building ‘odata-api.Rmd’ using rmarkdown
--- finished re-building ‘odata-api.Rmd’

--- re-building ‘restful-api.Rmd’ using rmarkdown
--- finished re-building ‘restful-api.Rmd’

--- re-building ‘setup.Rmd’ using rmarkdown
--- finished re-building ‘setup.Rmd’

--- re-building ‘spatial.Rmd’ using rmarkdown
Loading required package: sf
Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1
Loading required package: leafem
Loading required package: mapview
Warning: option 'fgb' requires GDAL >= 3.1.0! Your version is 3.0.4. Setting fgb = FALSE
Quitting from lines 106-133 (spatial.Rmd)
Error: processing vignette 'spatial.Rmd' failed with diagnostics:
package s2 required, please install it first
--- failed re-building ‘spatial.Rmd’

SUMMARY: processing the following file failed:
  ‘spatial.Rmd’

Error: Vignette re-building failed.
Execution halted
STDERR:

Error: Failed to install 'ruODK' from GitHub:
  Failed to `R CMD build` package, try `build = FALSE`.
>

Potentially useful details

This is a stock Ubuntu 20 server. I added sudo apt-get install libgdal-dev libfontconfig1-dev libudunits2-dev pandoc

sf is installed.

> if (!requireNamespace("sf")) install.packages("sf")
Loading required namespace: sf

Setting build_vignettes to FALSE gets it to work.

florianm commented 2 years ago

I'm closing this bug, as a binary package is now available from the rOpenSci Universe (see README), and help on installation errors was added to the README.

Especially the spatial packages (sf, mapview, leafem) are under heavy development and present ever-changing installation requirements. If the installation still fails, please report back with a detailed error (as above) and the output of sessionInfo().