Interesting – ok, now it does go to x64, but still have this permissions issue:
> install.packages("rstan", type = "source", INSTALL_opts = "--no-multiarch")
trying URL 'https://cran.rstudio.com/src/contrib/rstan_2.18.2.tar.gz'
Content type 'application/x-gzip' length 838052 bytes (818 KB)
downloaded 818 KB
* installing *source* package 'rstan' ...
** package 'rstan' successfully unpacked and MD5 sums checked
** using staged installation
** libs
C:/RBuildTools/3.5/mingw_64/bin/g++ -O2 -march=native -mtune=native -I"C:/R/R-36~1.0/include" -DNDEBUG -I"../inst/include" -I"`"C:/R/R-36~1.0/bin/x64/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"C:/R/R-3.6.0/library/Rcpp/include" -I"C:/R/R-3.6.0/library/RcppEigen/include" -I"C:/R/R-3.6.0/library/BH/include" -I"C:/R/R-3.6.0/library/StanHeaders/include" -O3 -march=native -c chains.cpp -o chains.o
27 [main] sh 8112 fork: child -1 - CreateProcessW failed for 'C:\RBuildTools\3.5\bin\sh.exe', errno 13
sh: fork: Permission denied
In file included from C:/R/R-3.6.0/library/BH/include/boost/random/detail/integer_log2.hpp:19:0,
from C:/R/R-3.6.0/library/BH/include/boost/random/detail/large_arithmetic.hpp:19,
from C:/R/R-3.6.0/library/BH/include/boost/random/detail/const_mod.hpp:23,
from C:/R/R-3.6.0/library/BH/include/boost/random/linear_congruential.hpp:30,
from C:/R/R-3.6.0/library/BH/include/boost/random/additive_combine.hpp:27,
from chains.cpp:29:
C:/R/R-3.6.0/library/BH/include/boost/pending/integer_log2.hpp:7:89: note: #pragma message: This header is deprecated. Use <boost/integer/integer_log2.hpp> instead.
BOOST_HEADER_DEPRECATED("<boost/integer/integer_log2.hpp>");
^
C:/RBuildTools/3.5/mingw_64/bin/g++ -O2 -march=native -mtune=native -I"C:/R/R-36~1.0/include" -DNDEBUG -I"../inst/include" -I"`"C:/R/R-36~1.0/bin/x64/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"C:/R/R-3.6.0/library/Rcpp/include" -I"C:/R/R-3.6.0/library/RcppEigen/include" -I"C:/R/R-3.6.0/library/BH/include" -I"C:/R/R-3.6.0/library/StanHeaders/include" -O3 -march=native -c init.cpp -o init.o
78 [main] sh 10804 fork: child -1 - CreateProcessW failed for 'C:\RBuildTools\3.5\bin\sh.exe', errno 13
sh: fork: Permission denied
...