I encountered this same problem yesterday after updating to the latest version of rstan and Stanheaders. It seemed to appear when attempting to add or remove generated quantities from my STAN code. I’m reinstalling R4.0, Rtools40 and rstan (in that order) right now to see if that might fix it…will update soon.
Just ran into this error too - i’m super new to using rstan but have exactly the same issues as above and nothing worked in terms of unistalling and re-installing or changing the marevars files - eagerly awaiting some news
After reinstalling R4.0, RTools40 and doing a source install of the rstan package I’m no longer getting the cleanup_makevar issue, but I am getting another issue where rstan seems to think I’m allocating gigantic vectors! I made another post about it here:
But figured I’d comment here as well in case the root issue is still the same.
Sorry you’re all running into this error. I’m not sure what’s going unfortunately. Tagging @stevebronder and @bgoodri in case they haven’t seen this yet. Looks like this is related to the makevars processing stuff and you both know that code better than I do. Can you take a look when you have a chance? Thanks!
I was getting this error as well, but only on one computer when my other which had the same version of rstan (2.21.2) was doing fine. Both on Windows 10 and R 4.0.2. The only loaded packages which seemed to be different on the two computers were jsonlite, withr, inline, processx and callr. So I changed back to jsonlite 1.7.0, withr 2.2.0 and inline 0.3.15 and the error no longer appears. I also reinstalled processx and callr which might have changed something somewhere.
Thanks for your suggestion @jkalley . It works after I re-install the 2.2.0 package. But I still get a warning saying “Warning message:
In system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) :
‘-E’ not found”.
I do not know whether it is matter.
If I remove the Makevars file it works, and if the Makevars file is present but empty it works. It doesn’t work with just CXX14FLAGS=-O3 in the Makevars file but I haven’t done any more testing. It always works with withr version 2.2.0. Maybe a windows specific issue if it works on ubuntu?
I’ve just checked and the github version of withr doesn’t work either.