Compilation error when verifying install of Rstan

Upgraded Studio on my MacBook Air. All my packages went out the window for some reason. When reinstalling Rstan I couldn’t get the verification to work

(example(stan_model, package = “rstan”, run.dontrun = TRUE))

Received this error message:
Error in compileCode(f, code, language = language, verbose = verbose) :
^/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/StanHeaders/include/stan/math/prim/fun/inv_inc_beta.hpp:32:23: note: in instantiation of function template specialization ‘boost::math::ibeta_inv<double, double, double, boost::math::policies::policy<boost::math::policies::overflow_errorboost::math::policies::errno_on_error, boost::math::policies::pole_errorboost::math::policies::errno_on_error, boost::math::policies::promote_double, boost::math::policies::digits2<>>>’ requested here return boost::math::ibeta_inv(a, b, p, boost_policy_t<>()); ^11 warnings and 1 error generated.make: *** [file63242869be2.o] Error 1

I run version 2024.04.2+764 (2024.04.2+764) of Rstudio on MacBook Air (M2).

Any guidance on what is wrong and how I can fix it would be much appreciated.

Best regards,
Daniel

Afternoon,

Can you tell us what version of xcode you have installed? And the same for rstan? Thanks!

ara

I managed to solve it by removing Xcode and installing macOS RTools package “macOS Rtools package • macrtools

Thanks though!

1 Like