Does this mean we will have another break when R3.7 moves to clang 8?
Wouldnāt surprise me but my guess is that when clang8
is introduced, @coatless will update the Mac installer to use it and it will set SHLIB_CXXFLAGS
to link against whatever libc++.1.dylib
comes with R, which one would expect CRAN to have compiled with clang8
.
Iām actually more worried about Windows for R 3.7.
Thanks so much!
Next version of R will be 4.0.0 to account for the compile toolchain switch, c.f. Daily News: R-devel/NEWS
Correct.
Have you begun testing with RTools 4.0? Jeroen Ooms made it available:
- Rtools build page: RTools: Toolchains for building R and R packages from source on Windows
- Slides on infrastructure: A preview of Rtools 4.0
Yes, I have been encouraging people to test rstan on it
for a while, but AFAIK I am the only one who has. It works (except LTO) for me, but it is a huge change.
I just tried this (after uninstalling RStan and using @coatless new installer) and got:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun ERROR: compilation failed for package ārstanā
So it appears that I am unable to actually compile Stan. Have you seen this error anywhere else since the Catalina roll out?
Try first doing xcode-select --install
from the Terminal app or the Terminal tab of RStudio.
So, the installer attempts to install the Xcode CLI tools for you. In the process, we trigger:
sudo xcode-select --reset
And then
sudo xcode-select --install
The reset should fix the xcrun
error, From there, the installation should be fine.
What macOS are you on? Mojave or Catalina?
Iām running Catalina (unfortunately). running xcode-select --install
seems to have fixed the xcrun
error (at least it did for installing cmdstanr
which failed with a similar error initially). Unfortunately, Iām still waiting for that to finish compiling and havenāt been able to try install.packages(ārstanā, type = āsourceā)
yet. As soon as cmdstanr
is finished, Iāll give that a shot and post an update.
Thanks
@mattwilliamson13 if CmdStanR still gives you trouble maybe @ssp3nc3r can help. I know he (and others) have been able to get it running on Catalina.
Thanks @Jonah. Do you have any sense for how long CmdStanR should take to compile during the install on a 2015 MacBook Pro with moderate specs? Are we talking minutes? Hours? To clarify, I mean the install_cmdstan()
install and compile of Stan
I canāt really tell if Iām making progress
Minute
So 2 hours of compiler messages in Studio during the install_cmdstan()
call is a bad sign then?
It is possible the compiler warnings may have overtaxed RStudioās buffer. In which case, I would start over after squashing them
Just to make sure I understand - I should squash these warnings during the install (not just during compilation of the model?
Both
Iām not getting any messages with square brackets so am not sure what to add to the Makevars file. Example output is clang++ -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.69.0 -I stan/lib/stan_math/lib/sundials_4.1.0/include -DBOOST_DISABLE_ASSERTS -c -MT bin/cmdstan/lang/grammars/indexes_grammar_inst.o -MT stan/src/stan/lang/grammars/indexes_grammar_inst.d -MM -E -MG -MP -MF stan/src/stan/lang/grammars/indexes_grammar_inst.d stan/src/stan/lang/grammars/indexes_grammar_inst.cpp
This worked to allow me to get RStan installed and 8 schools ran 3x without throwing the exception, so that seems to be working now. Iām not sure whatās happened with CmdStanR, but this seems to have fixed my problem with RStan and the original exception issues.