RStan 2.6.0 install script fixed

117 views
Skip to first unread message

Daniel Lee

unread,
Jun 3, 2015, 10:08:54 AM6/3/15
to stan-...@googlegroups.com
Hi all,

There is an incompatibility with RStan 2.6.0 and the new BH package (1.58.0) on CRAN. Ben fixed the install script and there shouldn't be issues installing RStan 2.6.0 now. If you have any problems, please reach out.

We're still working on the next release and we will have 2.7.0 available soon.


- Stan Development Team

Cameron Bracken

unread,
Jun 3, 2015, 3:27:00 PM6/3/15
to stan-...@googlegroups.com
Thanks for the quick turnaround!

Phil Price

unread,
Jun 3, 2015, 6:03:43 PM6/3/15
to stan-...@googlegroups.com
It doesn't work for me. I get about a zillion lines of boost messages, ending with this:
boost::phoenix::vector4<const boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::assign, boost::proto::argsns_::list2<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::argument<3> >, 0>, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::phoenix::detail::tag::function_eval, boost::proto::argsns_::list3<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<stan::gm::validate_expr_type3>, 0>, boost::phoenix::actor<boost::spirit::attribute<0> >, boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::reference_wrapper<std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, 0> > >, 3> > >, 2> > *, boost::fusion::vector1<boost::spirit::unused_type &> &, boost::spirit::context<boost::fusion::cons<stan::gm::expression &, boost::fusion::cons<int, boost::fusion::nil_> >, boost::fusion::vector0<void> > &, bool &> &, const boost::phoenix::default_actions &>'
    eval(Expr & expr, Context const & ctx)
    ^
18 errors generated.
make: *** [gm__grammars__expression07_grammar_inst.o] Error 1
ERROR: compilation failed for package ‘rstan’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rstan’
> 

Phil Price

unread,
Jun 3, 2015, 6:05:16 PM6/3/15
to stan-...@googlegroups.com
Not sure what else would help diagnose this problem. I do have Xcode, including the command line tools. 

Here's my R info:
R version 3.2.0 (2015-04-16) -- "Full of Ingredients"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)

Ben Goodrich

unread,
Jun 3, 2015, 9:15:08 PM6/3/15
to stan-...@googlegroups.com, pnp...@lbl.gov
Try

source("http://mc-stan.org/rstan/install.R")
install_rstan
()

again. Make sure you have the devtools package installed.

Ben

Phil Price

unread,
Jun 4, 2015, 2:59:22 PM6/4/15
to stan-...@googlegroups.com, pnp...@lbl.gov
Same problem. I've attached the entire R console log.
I've got Xcode 6.3.1.
I used the first USA CA CRAN site.

The first thing that looks funny when I run install_rstan is right at the top, I get this:
Removing package from ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library’
(as ‘lib’ is unspecified)

Then things seem to go along nicely until this warning:
In file included from /usr/local/include/boost/accumulators/statistics_fwd.hpp:12:
In file included from /usr/local/include/boost/accumulators/statistics_fwd.hpp:12:
/usr/local/include/boost/mpl/print.hpp:50:19: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
    const int m_x = 1 / (sizeof(T) - sizeof(T));
                  ^
Then things go OK again until:
In file included from /usr/local/include/boost/proto/proto_fwd.hpp:28:
/usr/local/include/boost/utility/result_of.hpp:189:46: error: too few template arguments for class template 'result'
struct result_of_nested_result : F::template result<FArgs>
                                             ^
/usr/local/include/boost/utility/result_of.hpp:194:5: note: in instantiation of template class 'boost::detail::result_of_nested_result<const stan::gm::addition_expr3, const stan::gm::addition_expr3 (stan::gm::expression &, stan::gm::expression &, std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > &)>' requested here
  : mpl::if_<is_function_with_no_args<FArgs>,
    ^
R Console.txt

Phil Price

unread,
Jun 4, 2015, 3:31:20 PM6/4/15
to stan-...@googlegroups.com
In case this helps too, here's what I have after running the install script:

> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.3 (Yosemite)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] Rcpp_0.11.6   inline_0.3.14

loaded via a namespace (and not attached):
 [1] httr_0.6.1      magrittr_1.5    rversions_1.0.0 tools_3.2.0     RCurl_1.95-4.6  memoise_0.2.1   stringi_0.4-1   git2r_0.10.1    stringr_1.0.0  
[10] digest_0.6.8    bitops_1.0-6    devtools_1.8.0  XML_3.98-1.2 

Ben Goodrich

unread,
Jun 4, 2015, 6:36:25 PM6/4/15
to stan-...@googlegroups.com, pnp...@lbl.gov
On Thursday, June 4, 2015 at 2:59:22 PM UTC-4, Phil Price wrote:
Same problem. I've attached the entire R console log.

This is due to having Boost >= 1.56 in /usr/local/include and CRAN for Mac automatically adding /usr/local/include to the search path. Perhaps the easiest workaround is to temporarily rename /usr/local/include/boost to /usr/local/include/Boost or something while running install_rstan().

Ben

Phil Price

unread,
Jun 4, 2015, 8:18:41 PM6/4/15
to stan-...@googlegroups.com, pnp...@lbl.gov
I tried this with high hopes, but it didn't help. Same exact error messages etc.

I just have no idea how to diagnose this kind of problem. Willing to revert to a previous version of boost or whatever.  I'm sort of puzzled that I am the only one reporting this problem (so far), I don't have anything unusual about my setup as far as I know. 

Thanks for working on this. Any ideas?

Daniel Lee

unread,
Jun 4, 2015, 8:41:04 PM6/4/15
to stan-...@googlegroups.com
Phil, what version of clang++ are you using?

I saw that error earlier this week, but it wasn't installing the current RStan -- it was when I was trying to do a custom build. Weird thing was I had that error for that custom RStan, but install RStan from the script worked fine.

I'll try to recreate the issue on my end.

--
You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Phil Price

unread,
Jun 4, 2015, 10:07:36 PM6/4/15
to stan-...@googlegroups.com

On Thursday, June 4, 2015 at 5:41:04 PM UTC-7, Daniel Lee wrote:
Phil, what version of clang++ are you using?

Phillips-MacBook-Air:Boost pnprice$ clang -v

Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)

Target: x86_64-apple-darwin14.3.0

Thread model: posix


I saw that error earlier this week, but it wasn't installing the current RStan -- it was when I was trying to do a custom build. Weird thing was I had that error for that custom RStan, but install RStan from the script worked fine.

I'll try to recreate the issue on my end.

Thanks, I really appreciate the effort. 

I guess I'll try installing it on a different machine tomorrow. I really need to get it working. This is the problem when you guys make such great tools: us people out here rely on them, and then it's a disaster when they don't work!

P

Daniel Lee

unread,
Jun 4, 2015, 10:13:22 PM6/4/15
to stan-...@googlegroups.com
So... I just upgraded my Xcode and I'm on:
> clang++ -v
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)

Target: x86_64-apple-darwin14.3.0
Thread model: posix

Everything is the same except for clang-602.0.53 vs clang-602.0.49.

Is it an option to upgrade XCode? I know it isn't the best solution, but hopefully it'll fix the problem.

I'm going to try to install it on a machine that I haven't upgraded the Xcode.



Daniel


Jiqiang Guo

unread,
Jun 4, 2015, 10:52:56 PM6/4/15
to stan-...@googlegroups.com, pnp...@lbl.gov
If it’s the same exact error message, it means you did not follow what Ben has suggested, though on Mac, it probably would not work by changing usr/local/include/boost to /usr/local/include/Boost if the file system is not case sensitive.   However, this is the problem and say changing it to /usr/local/include/boost_old/ should work. 

Jiqiang 

Daniel Lee

unread,
Jun 4, 2015, 11:29:51 PM6/4/15
to stan-...@googlegroups.com
Jiqiang is right: Mac's file system, by default, is not case sensitive, so you'll have to change it to something else.

I just verified that this occurs when there's a Boost version that's greater than 1.55 on the system. I installed boost using brew (brew install boost). That prevented RStan from installing. By clearing out Boost (brew rm boost), I was able to install RStan.

Can you see if moving / removing Boost fixes the install problem for you?



Daniel

Phil Price

unread,
Jun 5, 2015, 2:10:50 AM6/5/15
to stan-...@googlegroups.com


On Thursday, June 4, 2015 at 8:29:51 PM UTC-7, Daniel Lee wrote:
Jiqiang is right: Mac's file system, by default, is not case sensitive, so you'll have to change it to something else.

Hooray!

You know what? I've used a mac for a decade, I use the shell all the time, and I never realized it's not case-sensitive! 

Anyway, installing the newest version of Xcode did not help (I was on the previous version, which was not very old)...or at least, doing that ALONE did not help. I did that, failed to install, and then checked this list again and saw Jiquiang's suggestion. That did the trick. I suspect the Xcode version had nothing to do with it and simply renaming boost (to something other than Boost) was all that was needed, but I didn't test that since I had already installed the new Xcode, so I suppose it's possible that it needed both things done.

Thanks, everyone. Ca marche.

Leaving the relevant part of the comment history immediately below so people only need to read this one message.

Phil

Bob Carpenter

unread,
Jun 5, 2015, 3:15:45 PM6/5/15
to stan-...@googlegroups.com
Thanks for persisting, Phil, and sorry it was such a hassle.
This will all helpfully get easier when we get the new version
compatible with BH 1.58 out, which will be in the next week or two.

I was similarly surprised to learn about Mac case-insensitivity.

- Bob
Reply all
Reply to author
Forward
0 new messages