stan-dev / stan-dev/rstan

Bad path for R 4.2. beta when installed in the default directory on Windows

Open
#1,003 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
1.1k
Forks
266
Avg merge
2h 56m
Merged PRs (30d)
1

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported package compilation on Windows with R 4.2 beta installed under C:/Program Files/R and compare the two shown g++ command lines, especially the linker paths. Done means compiling the package succeeds with the default installation path without the Files/R/... path error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, r
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.