Solved: Unsuccessful install of RStan in Docker jupyter/r-notebook

See the log of the failed install here:
http://htmlpreview.github.io/?https://github.com/gaborgulya/docker_jupyter_r-notebook_rstan/blob/master/Install%20and%20test%20RStan%20-%20failed.html

What do I have to change?


Operating System:

Docker

Interface Version:

Jupyter R notebook

Output of writeLines(readLines(file.path(Sys.getenv(“HOME”), “.R/Makevars”))):

CXXFLAGS=-O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function
CXXFLAGS+=-flto -ffat-lto-objects -Wno-unused-local-typedefs

Output of devtools::session_info("rstan”):

setting value
version R version 3.3.2 (2016-10-31)
system x86_64, linux-gnu
ui X11
language en_US.UTF-8
collate en_US.UTF-8
tz Zulu
date 2017-11-22

package * version date source
BH 1.65.0-1 2017-08-24 CRAN (R 3.3.2)
colorspace 1.3-2 2016-12-14 CRAN (R 3.3.2)
dichromat 2.0-0 2013-01-24 CRAN (R 3.3.2)
digest 0.6.12 2017-01-27 CRAN (R 3.3.2)
ggplot2 * 2.2.1 2016-12-30 CRAN (R 3.3.2)
gridExtra 2.3 2017-09-09 CRAN (R 3.3.2)
gtable 0.2.0 2016-02-26 CRAN (R 3.3.2)
inline 0.3.14 2015-04-13 CRAN (R 3.3.2)
labeling 0.3 2014-08-23 CRAN (R 3.3.2)
lattice 0.20-34 2016-09-06 CRAN (R 3.3.2)
lazyeval 0.2.0 2016-06-12 CRAN (R 3.3.2)
magrittr 1.5 2014-11-22 CRAN (R 3.3.2)
MASS 7.3-45 2016-04-21 CRAN (R 3.3.2)
Matrix 1.2-7.1 2016-09-01 CRAN (R 3.3.2)
munsell 0.4.3 2016-02-13 CRAN (R 3.3.2)
plyr 1.8.4 2016-06-08 CRAN (R 3.3.2)
RColorBrewer 1.1-2 2014-12-07 CRAN (R 3.3.2)
Rcpp 0.12.13 2017-09-28 CRAN (R 3.3.2)
RcppEigen 0.3.3.3.1 2017-11-20 CRAN (R 3.3.2)
reshape2 1.4.2 2016-10-22 CRAN (R 3.3.2)
rlang 0.1.2 2017-08-09 CRAN (R 3.3.2)
rstan * 2.16.2 2017-07-03 CRAN (R 3.3.2)
scales 0.4.1 2016-11-09 CRAN (R 3.3.2)
StanHeaders * 2.16.0-1 2017-07-03 CRAN (R 3.3.2)
stringi 1.1.2 2016-10-01 CRAN (R 3.3.2)
stringr 1.2.0 2017-02-18 CRAN (R 3.3.2)
tibble 1.3.3 2017-05-28 CRAN (R 3.3.2)

Usually this means that the Rcpp package was installed from a binary with different compiler settings, so you have to reinstall it first.

Many thanks for your help, bgoodri, this worked! Previously I did not try both giving Docker a lot of RAM and also compiling Rcpp.

Link to the log of the successful install: http://htmlpreview.github.io/?https://github.com/gaborgulya/docker_jupyter_r-notebook_rstan/blob/master/Install%20and%20test%20RStan%20-%20succeeded.html