Installing rstan package error in Linux

103 views
Skip to first unread message

Marcelo Silva

unread,
Jun 9, 2016, 4:16:22 PM6/9/16
to Stan users mailing list
Hello!

I followed the stan installation instruction but i'm having trouble to intall the rstan package in linux:

> install.packages('rstan')
Content type 'application/x-gzip' length 1099610 bytes (1.0 MB)
==================================================
downloaded 1.0 MB

* installing *source* package ârstanâ ...
** package ârstanâ successfully unpacked and MD5 sums checked
** libs
g++ -I/home/marcelo/R-3.3.0/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/home/marcelo/R-3.3.0/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I/usr/local/include -I"/mnt/nfs/home/marcelo/R-3.3.0/library/Rcpp/include" -I"/mnt/nfs/home/marcelo/R-3.3.0/library/RcppEigen/include" -I"/mnt/nfs/home/marcelo/R-3.3.0/library/BH/include" -I"/mnt/nfs/home/marcelo/R-3.3.0/library/StanHeaders/include"   -fpic  -O3 -mtune=native -Wno-unused-variable -Wno-unused-function -flto -ffat-lto-objects  -Wno-unused-local-typedefs -c chains.cpp -o chains.o
In file included from /mnt/nfs/home/marcelo/R-3.3.0/library/BH/include/boost/accumulators/framework/accumulator_set.hpp:22:0,
                 from /mnt/nfs/home/marcelo/R-3.3.0/library/BH/include/boost/accumulators/accumulators.hpp:12,
                 from chains.cpp:25:
/mnt/nfs/home/marcelo/R-3.3.0/library/BH/include/boost/accumulators/accumulators_fwd.hpp:37:21: error: missing binary operator before token "("
 #if BOOST_WORKAROUND(__GNUC__, == 3) \
                     ^
...


Ben Goodrich

unread,
Jun 9, 2016, 4:20:07 PM6/9/16
to Stan users mailing list
On Thursday, June 9, 2016 at 4:16:22 PM UTC-4, Marcelo Silva wrote:
I followed the stan installation instruction but i'm having trouble to intall the rstan package in linux:

What version of g++ are you using?

Ben

Marcelo Silva

unread,
Jun 9, 2016, 4:56:31 PM6/9/16
to Stan users mailing list
Hi Ben,

I'm using g++ 4.9.2

Marcelo

Ben Goodrich

unread,
Jun 9, 2016, 5:34:00 PM6/9/16
to Stan users mailing list
On Thursday, June 9, 2016 at 4:56:31 PM UTC-4, Marcelo Silva wrote:
Hi Ben,

I'm using g++ 4.9.2

I can't reproduce this using g++ 4.9-3, but I don't recall seeing this error when 4.9.2 was more prevalent. Do you have a different version of Boost on your system? We have had Boost version conflicts before but only with a Mac.

Ben

Marcelo Silva

unread,
Jun 10, 2016, 9:56:49 PM6/10/16
to Stan users mailing list
Hi Ben,

Today I remove the directory "R-3.3.0/library/BH" and I executed install.packages('rstan') again. It's right! The package has been successfully installed and I'm really happy now!


Thank you for attention!

Marcelo da Silva
Reply all
Reply to author
Forward
0 new messages