I have a problem installing packages such as party after installing rstan. I have reinstalled R from scratch at now it did fine. I have a suspicion that modifications to .R/Makevars required by rstan causes the packages that are installed later to use include files that have namespace in them (i.e. complex.h in RcppEigen) and thus gcc breaks. I don’t know what is the root cause so would appreciate any advice.
I would not rule it out, but I don’t think so. RStan is one of the few packages to enforce the use of the C++14 standard. Rcpp and non-Stan packages that use Rcpp tend to use C++11 (or C++98), in which case their behavior is governed by CXX11FLAGS (or CXXFLAGS) in ~/.R/Makevars.
If you have more details about the problem, we could probably figure it out.
Well, probably it will take some time until the same happens again. But I will try reconstructing from memory. After installing and configuring rstan (it ran fine) I decided to install party package (because it figures out variable importance using random forests - I would prefer to use some Bayesian instead but didn’t find so far). During installation I saw errors that were given by RcppEigen something folder complex.h file alluding that it doesn’t understand namespace. I figured out it shouldn’t since it was gcc. After I added to .R/Makevars CC=g++ compilation went fine (since g++ was invoked) but the .so library was not properly created (symbol party.init was not found). Thus I decided to reinstall from scratch. Currently my system (Ubuntu 18.04) doesn’t have rstan installed. When I looked at Rcpp package as it currently is I saw that indeed there is complex.h file but it doesn’t contain namespace as well there is nothing resembling RcppEigen. For some reason I think that rstan installs RcppEigen and it somehow creates a mess. Possibly it could be eliminated by .R/Makevars. Any suggestions?
I am not familiar with the party package, but I will try to install it and take a look.
Thanks. And, if possible, can you please send the .R/Makevars?