Install

I am in trouble installing rstan from command line for the latest version of R ( R version 3.4.0).
I report the error I get:

g++ -m64 -I/usr/include/R -DNDEBUG -I"…/inst/include" -I"…/inst/include/boost_not_in_BH" -I""/usr/lib64/R/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include -fpic -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -c lang__grammars__statement_grammar_inst.cpp -o lang__grammars__statement_grammar_inst.o
In file included from /usr/lib64/R/library/StanHeaders/include/src/stan/lang/ast.hpp:68:0,
from /usr/lib64/R/library/StanHeaders/include/src/stan/lang/grammars/statement_grammar_def.hpp:4,
from /usr/lib64/R/library/StanHeaders/include/src/stan/lang/grammars/statement_grammar_inst.cpp:1,
from lang__grammars__statement_grammar_inst.cpp:18:
/usr/lib64/R/library/StanHeaders/include/src/stan/lang/ast/node/conditional_op.hpp:40:23: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
bool has_var_ = false;
^
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See https://bitbucket.org/mattiapenati/mk/issues for instructions.
/usr/lib64/R/etc/Makeconf:166: recipe for target ‘lang__grammars__statement_grammar_inst.o’ failed
make: *** [lang__grammars__statement_grammar_inst.o] Error 4
ERROR: compilation failed for package ‘rstan’

  • removing '/home/vagrant/R/x86_64-redhat-linux-gnu-library/3.4/rstan’
    ERROR: dependency ‘PKI’ is not available for package ‘rsconnect’
  • removing '/home/vagrant/R/x86_64-redhat-linux-gnu-library/3.4/rsconnect’
    ERROR: dependency ‘rsconnect’ is not available for package ‘shinystan’
  • removing ‘/home/vagrant/R/x86_64-redhat-linux-gnu-library/3.4/shinystan’

Does anyone know how to fix it?

Thank you!
Ilaria

Same thing in Ubuntu 16.04.2 LTS, but compilation went through. I don’t know if this is correct then, but the model output looks fine. To be safe on has to put ‘-std=c++11’ to Makevars files, I guess.