Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Build failing #87

Closed
nacnudus opened this issue Jan 4, 2019 · 4 comments
Closed

Build failing #87

nacnudus opened this issue Jan 4, 2019 · 4 comments

Comments

@nacnudus
Copy link
Collaborator

nacnudus commented Jan 4, 2019

Packrat fails to install Rcpp.

error: '::Rf_pythag' has not been declared

It was removed from R on 15 March 2018 .

It was removed from Rcpp on 28 February 2018, released in version 0.12.16 on 2018-03-08.

2018-02-28  Dirk Eddelbuettel  

        * inst/include/Rcpp/Rmath.h (R): Rf_pythag has been remove in R 2.14.0
        so comment-out the R::pythag wrapper (per request of Brian Ripley)

Packrat attempts to install Rcpp version 0.12.12 released on 2017-07-13.

Package: Rcpp
Source: CRAN
Version: 0.12.12
Hash: 8b3d5ebb9a9a4ab5c86b3a81b0cfb774
.

If the build succeeds with the latest versions of Rcpp then that will be the fix.

@nacnudus
Copy link
Collaborator Author

nacnudus commented Jan 4, 2019

#88 fixes the installation of Rcpp and reveals the next problem.

processing file: 14-final.Rmd
  |.................................................................| 100%
  ordinary text without R code
output file: 14-final.knit.md
/usr/bin/pandoc +RTS -K512m -RTS rap_companion.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output rap_companion.html --smart --email-obfuscation none --standalone --section-divs --table-of-contents --toc-depth 3 --template /home/travis/build/ukgovdatascience/rap_companion/packrat/lib/x86_64-pc-linux-gnu/3.5.1/bookdown/templates/gitbook.html --highlight-style pygments --number-sections --css style.css --include-in-header /tmp/RtmpL5hg35/rmarkdown-str4b3cd99d56d.html --mathjax --include-in-header google_analytics.html 
Error in get0(oNam, envir = ns) : 
  lazy-load database '/home/travis/build/ukgovdatascience/rap_companion/packrat/lib/x86_64-pc-linux-gnu/3.5.1/stringr/R/stringr.rdb' is corrupt
Calls: <Anonymous> ... process_images -> process_html_res -> :: -> getExportedValue -> get0
In addition: Warning message:
In get0(oNam, envir = ns) : internal error -3 in R_decompress1
Please delete rap_companion.md after you finish debugging the error.
Execution halted
The command "./_build.sh" exited with 1.

While running /_build.sh locally I noticed that a chunk installs a package.

```{r, echo=FALSE}
devtools::install_github('ukgovdatascience/eesectors')
library(eesectors)
```

The installation code devtools::install_github('ukgovdatascience/eesectors') should be in its own chunk with the chunk option eval = FALSE to prevent it (and many big dependencies) being reinstalled. It will already have been installed by packrat.

@nacnudus
Copy link
Collaborator Author

nacnudus commented Jan 4, 2019

Running /_build.sh locally failed on the 14th chapter due to pandoc's API for smart quotes changing. I remember having that problem before, quite a while ago, so I'll try upgrading pandoc.

processing file: 14-final.Rmd
  |.................................................................| 100%
  ordinary text without R code


output file: 14-final.knit.md

/usr/bin/pandoc +RTS -K512m -RTS rap_companion.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output rap_companion.html --smart --email-obfuscation none --standalone --section-divs --table-of-contents --toc-depth 3 --template /home/nacnudus/gds/datascience/rap/rap_companion/packrat/lib/x86_64-pc-linux-gnu/3.5.2/bookdown/templates/gitbook.html --highlight-style pygments --number-sections --css style.css --include-in-header /tmp/Rtmpj8OfpH/rmarkdown-str4efe61809e5f.html --mathjax --include-in-header google_analytics.html 
--smart/-S has been removed.  Use +smart or -smart extension instead.
For example: pandoc -f markdown+smart -t markdown-smart.
Try pandoc --help for more information.
Error: pandoc document conversion failed with error 2
Please delete rap_companion.md after you finish debugging the error.

@nacnudus
Copy link
Collaborator Author

nacnudus commented Jan 4, 2019

There's no pandoc to upgrade -- pandoc is on the system, not in R -- so I upgraded rmarkdown and its dependencies (knitr etc.) and ended up with object 'tojson' not found. tojson() is in the xfun package, which was up to date, but I gave up at that point and did devtools::update_packages() for all packages, which broke packrat.

Error in !packrat::opts$symlink.system.packages() : invalid argument type

Following the workaround in that issue, I deleted the /packrat/lib and /packrat/src directories, restarted R and packrat bootstrapped itself. Same error. Running packrat::set_opts(symlink.system.packages = TRUE) fixed it. The book builds locally.

nacnudus added a commit that referenced this issue Jan 4, 2019
See #87.  Basically having upgraded Rcpp and rmarkdown due to system
incompatibilities with recent R and pandoc versions it was no longer worthwile
to pursue new incompatibilties with old R packages.
@nacnudus
Copy link
Collaborator Author

nacnudus commented Jan 7, 2019

I reverted 3b0d154 and will deal with local pandoc in a separate issue.

nacnudus added a commit that referenced this issue Jan 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant