I committed the fatal error of trying to update R and brms. In my defense, I had a good reason, i.e. I hoped to access the new within-chain parallelization and other functionality that is reputed to speed up the sampling of complex models dramatically.
Result: I can no longer fit even a simple intercept-only model.
nullmod <- brm(dep.var ~ 1, family = categorical, data = d, prior = prior(normal(0,4), class = Intercept))
And I get:
Compiling Stan program...
Error in open.connection(con, open = mode) :
Could not resolve host: github.com
In addition: Warning messages:
1: Specifying global priors for regression coefficients in categorical models is deprecated. Please specify priors separately for each response category.
2: In system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) :
'-E' not found
make cmd is
make -f "C:/PROGRA~1/R/R-40~1.3/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-40~1.3/share/make/winshlib.mk" CXX='$(CXX14) $(CXX14STD)' CXXFLAGS='$(CXX14FLAGS)' CXXPICFLAGS='$(CXX14PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX14LDFLAGS)' SHLIB_LD='$(SHLIB_CXX14LD)' SHLIB="file21d872f22ea8.dll" WIN=64 TCLBIN=64 OBJECTS="file21d872f22ea8.o"
make would use
if test "zfile21d872f22ea8.o" != "z"; then \
if test -e "file21d872f22ea8-win.def"; then \
echo "C:/rtools40/mingw64/bin/"g++ -shared -s -static-libgcc -o file21d872f22ea8.dll file21d872f22ea8-win.def file21d872f22ea8.o "C:/Users/Folio 1040/Documents/R/win-library/4.0/rstan/lib/x64/libStanServices.a" -L"C:/Users/Folio 1040/Documents/R/win-library/4.0/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/Folio 1040/Documents/R/win-library/4.0/RcppParallel/lib/x64" -ltbb -L"C:/PROGRA~1/R/R-40~1.3/bin/x64" -lR ; \
"C:/rtools40/mingw64/bin/"g++ -shared -s -static-libgcc -o file21d872f22ea8.dll file21d872f22ea8-win.def file21d872f22ea8.o "C:/Users/Folio 1040/Documents/R/win-library/4.0/rstan/lib/x64/libStanServices.a" -L"C:/Users/Folio 1040/Documents/R/win-library/4.0/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/Folio 1040/Documents/R/win-library/4.0/RcppParallel/lib/x64" -ltbb -L"C:/PROGRA~1/R/R-40~1.3/bin/x64" -lR ; \
else \
echo EXPORTS > tmp.def; \
"C:/rtools40/mingw64/bin/"nm file21d872f22ea8.o | sed -n 's/^.* [BCDRT] / /p' | sed -e '/[.]refptr[.]/d' -e '/[.]weak[.]/d' | sed 's/[^ ][^ ]*/"&"/g' >> tmp.def; \
echo "C:/rtools40/mingw64/bin/"g++ -shared -s -static-libgcc -o file21d872f22ea8.dll tmp.def file21d872f22ea8.o "C:/Users/Folio 1040/Documents/R/win-library/4.0/rstan/lib/x64/libStanServices.a" -L"C:/Users/Folio 1040/Documents/R/win-library/4.0/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/Folio 1040/Documents/R/win-library/4.0/RcppParallel/lib/x64" -ltbb -L"C:/PROGRA~1/R/R-40~1.3/bin/x64" -lR ; \
"C:/rtools40/mingw64/bin/"g++ -shared -s -static-libgcc -o file21d872f22ea8.dll tmp.def file21d872f22ea8.o "C:/Users/Folio 1040/Documents/R/win-library/4.0/rstan/lib/x64/libStanServices.a" -L"C:/Users/Folio 1040/Documents/R/win-library/4.0/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/Folio 1040/Documents/R/win-library/4.0/RcppParallel/lib/x64" -ltbb -L"C:/PROGRA~1/R/R-40~1.3/bin/x64" -lR ; \
rm -f tmp.def; \
fi \
fi
Error in compileCode(f, code, language = language, verbose = verbose) :
C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/Folio 1040/Documents/R/win-library/4.0/rstan/lib/x64/libStanServices.a(stan_fit.o):stan_fit.cpp:(.data$_ZZN5boost4math6detail9bessel_j0IeEET_S3_E2P1[_ZZN5boost4math6detail9bessel_j0IeEET_S3_E2P1]+0x0): multiple definition of `boost::math::detail::bessel_j0<long double>(long double)::P1'; file21d872f22ea8.o:file21d872f22ea8.cpp:(.rdata$_ZZN5boost4math6detail9bessel_j0IeEET_S3_E2P1[_ZZN5boost4math6detail9bessel_j0IeEET_S3_E2P1]+0x0): first defined hereC:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/Folio 1040/Documents/R/win-library/4.0/rstan/lib/x64/libStanServices.a(stan_fit.o):stan_fit.cpp:(.data$_ZZN5boost4math6detail9bessel_j0IeEET_S3_E2QS[_ZZN5boost4math6detail9bessel_j0IeEET_S3_E2QS]+0x0): multiple definition of `boost::math::detail::bessel_j0<long double>(long double)::QS'; file21d872f22ea8.o:file
Error in sink(type = "output") : invalid connection
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
other attached packages:
[1] brms_2.14.4 Rcpp_1.0.6
This is caused by RStan testing whether your code will work with the new compiler (which is hosted on GitHub), but your network/firewall is blocking the connection.
The simple fix is to run:
rstan_options(javascript=FALSE)
When you first load RStan. This will disable that check.
Additionally I just noticed there’s a second error in the output, you’ll also need to reinstall rstan and StanHeaders from source:
# Compile packages using all cores
Sys.setenv(MAKEFLAGS = paste0("-j",parallel::detectCores()))
install.packages(c("StanHeaders","rstan"),type="source")