You should see the content of the file “Makevars.win”.
Something like: CXX14FLAGS=-O3 -mtune=native -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2
If you have multiple lines starting with “CXX14FLAGS” in this file, this may be the cause of your problem.
Yes I think you are correct I can put in a patch for that. We just need to look for multiple CXX14FLAGS etc and take the last one
@Kasper_Fischer and @Rno before you changed your Makevars do you remember if you had multiple definitions of any of CXXFLAGS , CXX11FLAGS, or CXX14FLAGS. I’m pretty sure that’s the issue but want to verify
Thanks for all of the hard work in ensuring those of us on Windows could run rstan and brms again. As luck would have it, I ran into this error today, while doing a demo on why Brms/RStan was superior to Winbugs in a data set that had problematic multi-collinearity among the predictors in a mixed effects model. Now the demo is working well with R 4.x and RStan 2.21.x
Do we know the exact reason RStan broke with R 4.0.2 and RStan 2.21.x update?
There were a half-dozen. Mostly we had been suggesting people utilize -march=native, which turned out to be a bad idea due to some changes between 2.19.x and 2.21.x.
The instructions given in the original post above do work for me, however I still get the following warning when fitting a model (e.g. using rstan::stan()):
In system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) :
'C:/rtools40/usr/mingw_/bin/g++' not found