I am unable to run the stan function from the rstan package. I get the next error:
*Error in compileCode(f, code, language = language, verbose = verbose) : *
* C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: file425012bf77f2.o:file425012bf77f2.cpp:(.text$_ZN3tbb8internal26task_scheduler_observer_v3D0Ev[_ZN3tbb8internal26task_scheduler_observer_v3D0Ev]+0x1d): undefined reference to `tbb::internal::task_scheduler_observer_v3::observe(bool)'C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: file425012bf77f2.o:file425012bf77f2.cpp:(.text$_ZN3tbb10interface623task_scheduler_observerD1Ev[_ZN3tbb10interface623task_scheduler_observerD1Ev]+0x1d): undefined reference to `tbb::internal::task_scheduler_observer_v3::observe(bool)'C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: file425012bf77f2.o:file425012bf77f2.cpp:(.text$_ZN3tbb10interface623task_scheduler_observerD1Ev[_ZN3tbb10interface623task_scheduler_observerD1Ev]+0x3a): undefined reference to `tbb::internal::task_scheduler_observer_v3::observe(bool)'C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: file425012bf77f2.o:file425012bf77f2.cpp:(.text$_ZN3tbb10interface*
*Error in sink(type = "output") : invalid connection*
I already went through some threads from this site and still haven’t been able to run the function. Among the things I have tried, I have:
-
Restarted the R session and then reinstalled rtools4.2
-
Uninstalled and reinstalled rstan
-
Installed rstan and StanHeaders from source and restarted the R session.
My session info is stated below.
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22621)
I would appreaciate any help immensely.