and then make build.
I am using rtools 3.5 and my path contains
c:/rtools/bin
c:/rtools/mingw_64
So far so good but after a while I got a message:
C:\Rtools\mingw_64\bin\ar.exe: creating stan/lib/stan_math/lib/sundials_4.1.0/lib/libsundials_kinsol.a
ERROR: Please use mingw32-make on Windows to build the Intel TBB library.
Is some additional configuration necessary?
Thanks for any advice.
PS. I have installed rtools3.4 and latest cmdstan tarball. Amazingly it builds.
The directory RTools has installed to seems to be C:\RBuildTools\4.0\ and not C:\RTools\RTools40\. I have therefore adjusted the directories listed in PATH accordingly to:
C:\RBuildTools\4.0\mingw64\bin and
C:\RBuildTools\4.0\usr\bin
Is this ok?
Neither of the two directories above contain a mingw32-make.exe file. Only the usr\bin directory contains a make.exe file. Also when I run command mingw32-make --version Iām getting the same ānot recognisedā error. If I run make --version I get:
GNU Make 4.2.1
Built for x86_64-pc-msys
Copyright (C) 1988-2016 Free Software Foundation, Inc.
What else should I try in order to get the make build command to run without errors?
thanks to everyone on this thread - Iāve opened a docs issue https://github.com/stan-dev/docs/issues/268 to track these discussions so that we can keep the docs and CmdStan wiki up-to-date.
Iām somewhat late to the party here, but Iām getting exactly this issue. The proposed solutions donāt satisfy me becaase:
a - they donāt work for me
b - Iāve already installed RTools, msys, and gcc in all its bloated horror, and already have 32 and 64 bit versions of mingw make. Is the Intell tlb make looking for make.exe under a different alias? And why mingw32? Does it only build as a 32 bit library?
Also, while Iām here - what is the function of the Intel TBB library in this context?
Following is bash output with the error I get:
$ make build
INFO: Could not find files for the given pattern(s).
if ! [[ make =~ mingw32 ]]; then
echo āERROR: Please use mingw32-make on Windows to build the Intel TBB library.ā;
echo āThis is packaged with RTools, for example.ā;
exit 1;
fi
ERROR: Please use mingw32-make on Windows to build the Intel TBB library.
This is packaged with RTools, for example.
make: *** [stan/lib/stan_math/make/libraries:153: stan/lib/stan_math/lib/tbb/tbb-make-check] Error 1
But, the point of my question, for Windows users, was to ask the difference between the make.exe downloaded as part of Rtools and the mingw32-make(exe?) required to build tbb. There is a certain amount of jibber-jabber on this new internet thing about how mingw32-make.exe is obsolete. And one of make or ming32-make does the job.
But, dunno. Iāve given building cmdstan on Windows my best shot. And Iāve failed. So PyMCMC3.
And. if my comments on this forum have been tetchy, I apologise. But, personally - Iāve made a living out of computer programming for 40+ years, and I find the process of getting cmdstan to install on my insanely powerful, by the standards of my youth, computer insanely infuriating. In my case, because I want to follow along with books by McElreath and Lambert, they say all you have to do is install STAN. Whacko, good luck with that.
this is valuable feedback - and I mean this most sincerely. I fear that many others have done the same, but we have no way of figuring out how many more people would use Stan if it werenāt for installation woes.
thanks to Ari, CmdStanPy does address the CXX toolchain problems on Windows - itās worth a try, and if it doesnāt work, please file an issue.
For what itās worth I had no difficulty at all building cmdstan with threading support in Windows and adapting my own R code to use cmdstanr instead of Rstan, and Iām just an ordinary user and strictly recreational programmer.
Up to date and complete documentation of the installation process would be a big help. I got at least one important piece of information from a blog post by @Max_Mantei that seems to have disappeared unfortunately (the necessary hint about using pacman to install mingw32-make.exe is upthread somewhere).
Confusingly enough, mingw32-make builds for 64 bit architecture.
Thanks for the helpful response. Iāll give it ago. Apologies again for being tetchy. Note to self: do not post when in a bad mood. Stan is obviously a hugely powerful piece of software, and I regret sounding negative. Iād like to get it running under Windows. I have now got it going on a Mac with no issues, so at least I can follow the books. Iād still like to run under Windows as well, and will give it another crack.
Apologies if itās bad form to update an old issue, but I would like to summarize what helped me install cmdstan for windows, in case itās useful for future folks searching for the same windows installation issues. Big thanks to all on this thread, you saved me right when I was about to give up!
I was struggling for multiple days trying to install cmdstan various different ways, running into strange compiler issues left and right. I was able to eventually get it working using the Installation from GitHub instructions and help from this thread. Just to summarize for those who might feel lost, these are the steps that worked for me:
Use mingw32-make build to build the stan executables.
Check the Stan compiler (in the instructions) after installation.
Credits:
TLDR; if youāre running into C++ or g++ compiler issues, try building it all from GitHub source ā itās easier than I expected. I was able to get it working in ~15 minutes after giving up on other (conda) installation methods that I assumed would be fast.