Running 'testthat.R' [75s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > Sys.setenv("R_TESTS" = "")
  > library(testthat)
  > library(gppm)
  Loading required package: Rcpp
  > 
  > test_check("gppm")
  make cmd is
    make -f "D:/RCompile/recent/R-4.3.0/etc/x64/Makeconf" -f "D:/RCompile/recent/R-4.3.0/share/make/winshlib.mk" CXX='$(CXX14) $(CXX14STD)' CXXFLAGS='$(CXX14FLAGS)' CXXPICFLAGS='$(CXX14PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX14LDFLAGS)' SHLIB_LD='$(SHLIB_CXX14LD)' SHLIB="file1b2d859762347.dll" WIN=64 TCLBIN= OBJECTS="file1b2d859762347.o"
  
  make would use
  make[1]: Entering directory '/d/temp/RtmpIhL8fe'
  if test "zfile1b2d859762347.o" != "z"; then \
    if test -e "file1b2d859762347-win.def"; then \
      echo g++  -shared -s -static-libgcc -o file1b2d859762347.dll file1b2d859762347-win.def file1b2d859762347.o  -L"d:/rtools43/x86_64-w64-mingw32.static.posix/lib/x64" -L"d:/rtools43/x86_64-w64-mingw32.static.posix/lib"  -L"D:/RCompile/recent/R-4.3.0/bin/x64" -lR ; \
      g++  -shared -s -static-libgcc -o file1b2d859762347.dll file1b2d859762347-win.def file1b2d859762347.o  -L"d:/rtools43/x86_64-w64-mingw32.static.posix/lib/x64" -L"d:/rtools43/x86_64-w64-mingw32.static.posix/lib"  -L"D:/RCompile/recent/R-4.3.0/bin/x64" -lR ; \
    else \
      echo EXPORTS > tmp.def; \
      nm file1b2d859762347.o | sed -n 's/^.* [BCDRT] / /p' | sed -e '/[.]refptr[.]/d' -e '/[.]weak[.]/d' | sed 's/[^ ][^ ]*/"&"/g'  >> tmp.def; \
      echo g++  -shared -s -static-libgcc -o file1b2d859762347.dll tmp.def file1b2d859762347.o  -L"d:/rtools43/x86_64-w64-mingw32.static.posix/lib/x64" -L"d:/rtools43/x86_64-w64-mingw32.static.posix/lib"  -L"D:/RCompile/recent/R-4.3.0/bin/x64" -lR ; \
      g++  -shared -s -static-libgcc -o file1b2d859762347.dll tmp.def file1b2d859762347.o  -L"d:/rtools43/x86_64-w64-mingw32.static.posix/lib/x64" -L"d:/rtools43/x86_64-w64-mingw32.static.posix/lib"  -L"D:/RCompile/recent/R-4.3.0/bin/x64" -lR ; \
      rm -f tmp.def; \
    fi \
  fi
  make[1]: Leaving directory '/d/temp/RtmpIhL8fe'
  Error in `source_file()`:
  ! In path: "D:\\RCompile\\CRANpkg\\local\\4.3\\gppm.Rcheck\\tests\\testthat\\setup-global.R"
  Caused by error in `compileCode()`:
  ! D:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: file1b2d859762347.o:file1b2d859762347.cpp:(.text$_ZN3tbb8internal26task_scheduler_observer_v3D0Ev[_ZN3tbb8internal26task_scheduler_observer_v3D0Ev]+0x1c): undefined reference to `tbb::internal::task_scheduler_observer_v3::observe(bool)'D:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: file1b2d859762347.o:file1b2d859762347.cpp:(.text$_ZN3tbb10interface623task_scheduler_observerD1Ev[_ZN3tbb10interface623task_scheduler_observerD1Ev]+0x1c): undefined reference to `tbb::internal::task_scheduler_observer_v3::observe(bool)'D:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: file1b2d859762347.o:file1b2d859762347.cpp:(.text$_ZN3tbb10interface623task_scheduler_observerD1Ev[_ZN3tbb10interface623task_scheduler_observerD1Ev]+0x37): undefined reference to `tbb::internal::task_scheduler_observer_v3::observe(bool)'D:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: file1b2d859762347.o:file1b2d859762347.cpp:(.text$_ZN3tbb10interface623task_scheduler_observerD0Ev[_ZN3tbb10interface623task_scheduler_observerD0Ev]+0x1c): undefined reference to `tbb::internal::task_scheduler_observer_v3::observe(bool)'D:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: file1b2d859762347.o:file1b2d859762347.cpp:(.text$_ZN3tbb10interface623task_scheduler_observerD0Ev[_ZN3tbb10interface623task_scheduler_observerD0Ev]+0x37): more undefined references to `tbb::internal::task_scheduler_observer_v3::observe(bool)' followcollect2.exe: error: ld returned 1 exit status
  Backtrace:
       ▆
    1. ├─testthat::test_check("gppm")
    2. │ └─testthat::test_dir(...)
    3. │   └─testthat:::test_files(...)
    4. │     └─testthat:::test_files_serial(...)
    5. │       └─testthat:::test_files_setup_state(...)
    6. │         └─testthat::source_test_setup(".", env)
    7. │           └─testthat::source_dir(path, "^setup.*\\.[rR]$", env = env, wrap = FALSE)
    8. │             └─base::lapply(...)
    9. │               └─testthat (local) FUN(X[[i]], ...)
   10. │                 └─testthat::source_file(path, env = env, chdir = chdir, wrap = wrap)
   11. │                   ├─base::withCallingHandlers(...)
   12. │                   └─base::eval(exprs, env)
   13. │                     └─base::eval(exprs, env)
   14. │                       └─gppm::gppm(...) at D:\RCompile\CRANpkg\local\4.3\gppm.Rcheck\tests\testthat\setup-global.R:3:0
   15. │                         └─gppm:::toStan(theModel$parsedModel, control)
   16. │                           ├─utils::capture.output(...)
   17. │                           │ └─base::withVisible(...elt(i))
   18. │                           └─rstan::stan_model(model_code = theCode, auto_write = TRUE)
   19. │                             └─rstan:::cxxfunctionplus(...)
   20. │                               ├─pkgbuild::with_build_tools(...)
   21. │                               │ └─withr::with_path(rtools_path(), code)
   22. │                               │   └─base::force(code)
   23. │                               └─inline::cxxfunction(...)
   24. │                                 └─inline:::compileCode(f, code, language = language, verbose = verbose)
   25. │                                   └─base::stop(tail(errmsg))
   26. └─base::.handleSimpleError(...)
   27.   └─testthat (local) h(simpleError(msg, call))
   28.     └─rlang::abort(...)
  Error in `source_file()`:
  ! In path: "D:\\RCompile\\CRANpkg\\local\\4.3\\gppm.Rcheck\\tests\\testthat\\setup-global.R"
  Caused by error in `sink()`:
  ! invalid connection
  Backtrace:
       ▆
    1. ├─testthat::test_check("gppm")
    2. │ └─testthat::test_dir(...)
    3. │   └─testthat:::test_files(...)
    4. │     └─testthat:::test_files_serial(...)
    5. │       └─testthat:::test_files_setup_state(...)
    6. │         └─testthat::source_test_setup(".", env)
    7. │           └─testthat::source_dir(path, "^setup.*\\.[rR]$", env = env, wrap = FALSE)
    8. │             └─base::lapply(...)
    9. │               └─testthat (local) FUN(X[[i]], ...)
   10. │                 └─testthat::source_file(path, env = env, chdir = chdir, wrap = wrap)
   11. │                   ├─base::withCallingHandlers(...)
   12. │                   └─base::eval(exprs, env)
   13. │                     └─base::eval(exprs, env)
   14. │                       └─gppm::gppm(...) at D:\RCompile\CRANpkg\local\4.3\gppm.Rcheck\tests\testthat\setup-global.R:3:0
   15. │                         └─gppm:::toStan(theModel$parsedModel, control)
   16. │                           ├─utils::capture.output(...)
   17. │                           │ └─base::withVisible(...elt(i))
   18. │                           └─rstan::stan_model(model_code = theCode, auto_write = TRUE)
   19. │                             └─rstan:::cxxfunctionplus(...)
   20. │                               └─base::sink(type = "output")
   21. └─base::.handleSimpleError(`<fn>`, "invalid connection", base::quote(sink(type = "output")))
   22.   └─testthat (local) h(simpleError(msg, call))
   23.     └─rlang::abort(...)
  Execution halted