Windows10 compiling error?

137 views
Skip to first unread message

Tobias Schwoerer

unread,
Aug 18, 2016, 1:49:37 PM8/18/16
to Stan users mailing list
Just recently had to upgrade to Windows 10 (work policy).
I would like to use Rstan. I am a beginner.

A few things:
1) Rstan instructions are unclear on what version of Rtools to use given the new Rtools3.4. 
Also, nothing mentioned on what and what not to do if you are on Windows 10. 

2) I got Rstudio 0.99.903, R3.3.1, and installed Rtools34 and Rstan. 
I tried to run Gelman's tumor model, a hierachical binomial, exactly as shown in Carpenter et al. 2016 Journal of Stat. Software p. 16.
I got a compiling error that told me to remove my Rtools version download the Rtools33. 
I did that but still got the same compiling error.
Any help is much appreciated.
Thank you very much!

Tobias

Ben Goodrich

unread,
Aug 18, 2016, 1:53:09 PM8/18/16
to Stan users mailing list
On Thursday, August 18, 2016 at 1:49:37 PM UTC-4, Tobias Schwoerer wrote:
Just recently had to upgrade to Windows 10 (work policy).
I would like to use Rstan. I am a beginner.

A few things:
1) Rstan instructions are unclear on what version of Rtools to use given the new Rtools3.4. 
Also, nothing mentioned on what and what not to do if you are on Windows 10. 

We don't have any experience with Windows 10, but I would assume the procedure is the same as with other versions of Windows (although I would not be surprised if it is not)
 
2) I got Rstudio 0.99.903, R3.3.1, and installed Rtools34 and Rstan. 
I tried to run Gelman's tumor model, a hierachical binomial, exactly as shown in Carpenter et al. 2016 Journal of Stat. Software p. 16.
I got a compiling error that told me to remove my Rtools version download the Rtools33. 

Can you quote that error message? I don't think it comes from RStan per se.

Thanks,
Ben

Jonathan Gilligan

unread,
Aug 19, 2016, 1:47:20 PM8/19/16
to Stan users mailing list
I ran into something similar. I think it has to do with interactions between the upgrade to RTOOLS34 and a recent upgrade of the devtools package.

The key is making sure that the correct RTOOLS is on your path and that the BINPREF environment variable is set correctly.

If you run `devtools::dr_devtools()`,  `devtools:::scan_path_for_rtools()`, and `devtools:::scan_registry_for_rtools()` these functions give you good diagnostic information about what R thinks your build configuration is and may help you figure out how to get properly configured.

For me, the answer was to install RTOOLS33, put that on my path and put `BINPREF = g:/Rtools/mingw_$(WIN)/bin/` in ~/.R/Makevars

Jonathan Gilligan

unread,
Aug 19, 2016, 2:28:21 PM8/19/16
to Stan users mailing list
Just tried replacing RTOOLS33 with RTOOLS34 to figure out what was needed.

Uninstalled RTOOLS33, removed the relevant entries from my path.
Installed RTOOLS34
Set BINPREF=g:/Rtools/mingw_$(WIN)/bin/ in ~/.R/Makevars

I delete my old .Rda files from previously compiled stan models.

I can compile models with stan_model('foo.stan'), but I get a non-fatal warning message:

Warning message:
In find_rtools() :
  WARNING: Rtools 3.4 found on the path at g:/Rtools is not compatible with R 3.3.1.

Please download and install Rtools 3.3 from http://cran.r-project.org/bin/windows/Rtools/, remove the incompatible version from your PATH, then run find_rtools().

However, when I run devtools::find_rtools() from the R prompt, it returns TRUE with no warning message.

However, the warning message seems to be harmless. My stan models compile and run properly despite the spurious warning message.

Something seems to be strange with find_rtools().

Indeed, looking at the github repository, rstan seems to include a file 'rtools.R' that has an older (out of date) version of hadley's devtools::find_rtools. I think this is where the problem is. I will file an issue on github.

Tobias Schwoerer

unread,
Aug 22, 2016, 1:15:51 PM8/22/16
to Stan users mailing list
Thank you all for trying to solve this issue. 
It seems to be related to installation of Rtools34.
I reinstalled everything,Rstudio 0.99.903, R3.3.1, but then installed Rtools33 and then Rstan, following precisely the "How to install Rstan" instructions, running the prescribed code and making sure R could access Rtools.
The model ran no problem. 
Thanks again. All of your help is much appreciated.   
Reply all
Reply to author
Forward
0 new messages