rstan
rstan copied to clipboard
Bad path for R 4.2. beta when installed in the default directory on Windows
Using R 4.2. beta on Windows and default path in C:/Program Files/R/R.... Compiling my package dmenne/breathtestcore. This path requires quotes around the path, which is correct in the first command line below, but not in the second. See
error: Files/R/.... (Program is cut off).
Ok when I move R to root
g++ -std=gnu++14 -I"C:/PROGRA~1/R/R-42~1.0BE/include" -DNDEBUG -I"../inst/include" -I"C:/Program Files/R/R-4.2.0beta/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -DRCPP_PARALLEL_USE_TBB=1 -DUSE_STANC3 -I'C:/Program Files/R/R-4.2.0beta/library/StanHeaders/include' -I'C:/Program Files/R/R-4.2.0beta/library/rstan/include' -I'C:/Program Files/R/R-4.2.0beta/library/BH/include' -I'C:/Program Files/R/R-4.2.0beta/library/Rcpp/include' -I'C:/Program Files/R/R-4.2.0beta/library/RcppEigen/include' -DUSE_STANC3 -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -DRCPP_PARALLEL_USE_TBB=1 -I"C:/Program Files/R/R-4.2.0beta/library/RcppParallel/include" -D_REENTRANT -DSTAN_THREADS -O3 -Wno-unused-variable -Wno-ignored-attributes -Wno-attributes -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-maybe-uninitialized -c stanExports_breath_test_1.cc -o stanExports_breath_test_1.o
g++ -shared -s -static-libgcc -o breathteststan.dll tmp.def RcppExports.o stanExports_breath_test_1.o -LC:/PROGRA~1/R/R-42~1.0BE/library/RCPPPA~1/lib/x64 -ltbb -ltbbmalloc -LC:/Program Files/R/R-4.2.0beta/library/RcppParallel/lib/x64 -Wl,-rpath,C:/Program Files/R/R-4.2.0beta/library/RcppParallel/lib/x64 -ltbb -ltbbmalloc -Lc:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64 -Lc:/rtools42/x86_64-w64-mingw32.static.posix/lib -LC:/PROGRA~1/R/R-42~1.0BE/bin/x64 -lR
g++.exe: error: Files/R/R-4.2.0beta/library/RcppParallel/lib/x64: No such file or directory
keine DLL erzeugt
I think this isn't related to RStan. You need to install RcppParallel
in a user library with a path that has no spaces, not under Program Files
. Any package that needs compilation and links to RcppParallel
will most likely fail with the same error.
Sounds ok. I normally have it installed in some pathless library, but since R installation suggested to use the default, I accepted it this time. Reminds me of the days when D. E. said installation using the default on Windows was not accepted anyway.