Here's a fully reproducible example. I do not really understand what is going on. It seems that some library is missing, but then why remounting /tmp should work? What I can say is that
- on my Xubuntu 18.04 machine, the C complier uses ~2G
- despite much more RAM, I get the same error if I don't remount the /tmp directory typing
sudo mount -o remount, exec /tmp in the terminal
Thank you for your help.
> library(brms)
Loading required package: Rcpp
Loading required package: ggplot2
Loading 'brms' package (version 2.7.0). Useful instructions
can be found by typing help('brms'). A more detailed introduction
to the package is available through vignette('brms_overview').
Run theme_set(theme_default()) to use the default bayesplot theme.
>
> x1 <- runif(300, 0, 100)
> x2 <- sample(0:1, 300, replace=T)
> y <- 2 * x1 + 3 * x2 + 0.5 * x1 * x2 + rnorm(300, 0, 10)
> df <- data.frame(x1, x2, y)
>
> bm <- brm(y ~ x1 * x2, df)
Compiling the C++ model
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! In file included from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/smart_ptr/shared_ptr.hpp:28:0,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/shared_ptr.hpp:17,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/StanHeaders/include/stan/math/prim/mat/fun/LDLT_factor.hpp:7,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/StanHeaders/include/stan/math/prim/mat/err/check_ldlt_factor.hpp:6,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/StanHeaders/include/stan/math/prim/mat.hpp:33,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/StanHeaders/include/stan/math/rev/mat.hpp:12,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/StanHeaders/include/stan/math.hpp:4,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-libr
In addition: Warning message:
In system(cmd, intern = !verbose) :
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! In file included from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/smart_ptr/shared_ptr.hpp:28:0,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/shared_ptr.hpp:17,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/StanHeaders/include/stan/math/prim/mat/fun/LDLT_factor.hpp:7,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/StanHeaders/include/stan/math/prim/mat/err/check_ldlt_factor.hpp:6,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/StanHeaders/include/stan/math/prim/mat.hpp:33,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/StanHeaders/include/stan/math/rev/mat.hpp:12,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/StanHeaders/include/stan/math.hpp:4,
from /home/rstudio-user/R/x86_64-pc-linux-gnu-libr
Error in sink(type = "output") : invalid connection