Warnings when compiling CmdStan code on linux/arm64

I am building a dockerfile based on rocker/rstudio (rocker-bayes/bayes_4.4.1.Dockerfile at main · jmgirard/rocker-bayes · GitHub). When building on amd64, everything works great. However, on arm64, when I run cmdstanr::install_cmdstan(), I end up with the following warnings, which flood the console but do not seem to prevent the compilation or model from working. Is there anything I can do to clean this up?

Warning Text
Compiling Stan program...
In file included from stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/hypergeometric_pFq.hpp:11,
                 from stan/lib/stan_math/stan/math/prim/fun/hypergeometric_pFq.hpp:7,
                 from stan/lib/stan_math/stan/math/prim/fun/hypergeometric_2F1.hpp:19,
                 from stan/lib/stan_math/stan/math/prim/fun/grad_2F1.hpp:14,
                 from stan/lib/stan_math/stan/math/prim/fun.hpp:129,
                 from stan/lib/stan_math/stan/math/rev/fun/multiply.hpp:7,
                 from stan/lib/stan_math/stan/math/rev/fun/elt_multiply.hpp:9,
                 from stan/lib/stan_math/stan/math/rev/fun.hpp:56,
                 from stan/lib/stan_math/stan/math/rev.hpp:12,
                 from stan/lib/stan_math/stan/math.hpp:19,
                 from stan/src/stan/model/model_header.hpp:4:
stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/detail/hypergeometric_pFq_checked_series.hpp: In instantiation of ‘std::pair<_ForwardIterator, _ForwardIterator> boost::math::detail::hypergeometric_pFq_checked_series_impl(const Seq&, const Seq&, const Real&, const Policy&, const Terminal&, long long int&) [with Seq = std::vector<double, std::allocator<double> >; Real = long double; Policy = boost::math::policies::policy<boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>; Terminal = boost::math::detail::iteration_terminator]’:
stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/hypergeometric_pFq.hpp:61:107:   required from ‘typename boost::math::tools::promote_args<Real, typename Seq::value_type>::type boost::math::hypergeometric_pFq(const Seq&,
 const Seq&, const Real&, Real*, const Policy&) [with Seq = std::vector<double, std::allocator<double> >; Real = double; Policy = boost::math::policies::policy<boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>; typename boost::math::tools::promote_args<Real, typename Seq::value_type>::type = double; typename Seq::value_type = double]’
stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/hypergeometric_pFq.hpp:72:35:   required from ‘typename boost::math::tools::promote_args<Real, typename Seq::value_type>::type boost::math::hypergeometric_pFq(const Seq&, const Seq&, const Real&, Real*) [with Seq = std::vector<double, std::allocator<double> >; Real = double; typename boost::math::tools::promote_args<Real, typename Seq::value_type>::type = double; typename Seq::value_type = double]’
stan/lib/stan_math/stan/math/prim/fun/hypergeometric_pFq.hpp:55:41:   required from ‘stan::return_type_t<T_x, T_sigma, T_l> stan::math::hypergeometric_pFq(const Ta&, const Tb&, const Tz&) [with Ta = Eigen::Matrix<double, -1, 1>; Tb = Eigen::Matrix<double, -1, 1>; Tz = double; stan::require_all_eigen_st<std::is_arithmetic, Ta, Tb>* <anonymous> = 0; stan::require_arithmetic_t<Tz>* <anonymous> = 0; stan::return_type_t<T_x, T_sigma, T_l> = double]’
stan/lib/stan_math/stan/math/prim/fun/hypergeometric_3F2.hpp:125:28:   required from ‘auto stan::math::hypergeometric_3F2(const Ta&, const Tb&, const Tz&) [with Ta = std::vector<double, std::allocator<double> >; Tb = std::vector<double, std::allocator<double> >; Tz = double; stan::require_all_vector_t<T_y, T_high>* <anonymous> = 0; stan::require_stan_scalar_t<T2>* <
anonymous> = 0]’
stan/lib/stan_math/stan/math/prim/fun/hypergeometric_3F2.hpp:148:28:   required from ‘auto stan::math::hypergeometric_3F2(const std::initializer_list<_Tp>&, const std::initializer_list<_Value>&, const Tz&) [with Ta = double; Tb = double; Tz = double; stan::require_all_stan_scalar_t<Ta, Tb, Tz>* <anonymous> = 0]’
stan/lib/stan_math/stan/math/rev/fun/inv_inc_beta.hpp:77:37:   required from here
stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/detail/hypergeometric_pFq_checked_series.hpp:122:28: note: parameter passing for argument of type ‘std::pair<long double, long double>’ when C++17 is enabled changed to match C++14 in GCC 10.1
  122 |      std::pair<Real, Real> hypergeometric_pFq_checked_series_impl(const Seq& aj, const Seq& bj, const Real& z, const Policy& pol, const Terminal& termination, long long& log_scale)
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/detail/bessel_jy.hpp:14,
                 from stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/bessel.hpp:20,
                 from stan/lib/stan_math/stan/math/prim/fun/bessel_first_kind.hpp:6,
                 from stan/lib/stan_math/stan/math/rev/fun/bessel_first_kind.hpp:6,
                 from stan/lib/stan_math/stan/math/rev/fun.hpp:24,
                 from stan/lib/stan_math/stan/math/rev.hpp:12,
                 from stan/lib/stan_math/stan/math.hpp:19,
                 from stan/src/stan/model/model_header.hpp:4:
stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/gamma.hpp: In instantiation of ‘boost::math::detail::upper_incomplete_gamma_fract<T>::result_type boost::math::detail::upper_incomplete_gamma_fract<T>::operator()() [with T = double; boost::math::detail::upper_incomplete_gamma_fract<T>::result_type = std::pair<double, double>]’:
stan/lib/stan_math/lib/boost_1.84.0/boost/math/tools/fraction.hpp:217:20:   required from ‘typename boost::math::tools::detail::fraction_traits<Gen>::result_type boost::math::tools::continued_fraction_a(Gen&, const U&, uintmax_t&) [with Gen = boost::math::detail::upper_incomplete_gamma_fract<double>; U = double; typename boost::math::tools::detail::fraction_traits<Gen>::result_type = double; uintmax_t = long unsigned int]’
stan/lib/stan_math/lib/boost_1.84.0/boost/math/tools/fraction.hpp:252:31:   required from ‘typename boost::math::tools::detail::fraction_traits<Gen>::result_type boost::math::tools::continued_fraction_a(Gen&, const U&) [with Gen = boost::math::detail::upper_incomplete_gamma_fract<double>; U = double; typename boost::math::tools::detail::fraction_traits<Gen>::result_type = double]’
stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/gamma.hpp:314:68:   required from ‘T boost::math::detail::upper_gamma_fraction(T, T, T) [with T = double]’
stan/lib/stan_math/lib/boost_1.84.0/bo
ost/math/special_functions/gamma.hpp:1176:44:   required from ‘T boost::math::detail::gamma_incomplete_imp(T, T, bool, bool, const Policy&, T*) [with T = double; Policy = boost::math::policies::policy<boost::math::policies::pole_error<boost::math::policies::errno_on_error>, boost::math::policies::overflow_error<boost::math::policies::errno_on_error>, boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’
stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/gamma.hpp:2130:35:   required from ‘boost::math::tools::promote_args_t<RT1, RT2> boost::math::gamma_p(RT1, RT2, const Policy&) [with RT1 = double; RT2 = double; Policy = boost::math::policies::policy<boost::math::policies::overflow_error<boost::math::policies::errno_on_error>, boost::math::policies::pole_error<boost::math::policies::errno_on_error>, boost::math::policies::promote_double<false>, boost::math::policies::digits2<0>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>; boost::math::tools::promote_args_t<RT1, RT2> = double]’
stan/lib/stan_math/stan/math/prim/fun/gamma_p.hpp:76:30:   required from here
stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/gamma.hpp:299:16: note: parameter passing for argument of type ‘std::pair<double, double>’ when C++17 is enabled changed to match C++14 in GCC 10.1
  299 
|    result_type operator()()
      |                ^~~~~~~~

In file included from stan/lib/stan_math/stan/math/prim/fun/owens_t.hpp:6,
                 from stan/lib/stan_math/stan/math/prim/fun.hpp:261,
                 from stan/lib/stan_math/stan/math/rev/fun/multiply.hpp:7,
                 from stan/lib/stan_math/stan/math/rev/fun/elt_multiply.hpp:9,
                 from stan/lib/stan_math/stan/math/rev/fun.hpp:56,
                 from stan/lib/stan_math/stan/math/rev.hpp:12,
                 from stan/lib/stan_math/stan/math.hpp:19,
                 from stan/src/stan/model/model_header.hpp:4:
stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/owens_t.hpp: In instantiation of ‘std::pair<_FIter, _FIter> boost::math::detail::owens_t_T1_accelerated(T, T, const Policy&) [with T = long double; Policy = boost::math::policies::policy<boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’:
stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/owens_t.hpp:874:46:   required from ‘RealType boost::math::detail::owens_t_dispatch(RealType, RealType, RealType, const Policy&, const std::integral_constant<int, 65>&) [with RealType = long double; Policy = boost::math::policies::policy<boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’
stan/lib/stan_math/lib/boost_1.84
.0/boost/math/special_functions/owens_t.hpp:979:36:   required from ‘RealType boost::math::detail::owens_t_dispatch(RealType, RealType, RealType, const Policy&) [with RealType = long double; Policy = boost::math::policies::policy<boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’
stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/owens_t.hpp:1000:38:   required from ‘RealType boost::math::detail::owens_t(RealType, RealType, const Policy&) [with RealType = long double; Policy = boost::math::policies::policy<boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’
stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/owens_t.hpp:1072:86:   required from ‘boost::math::tools::promote_args_t<RT1, RT2> boost::math::owens_t(T1, T2, const Policy&) [with T1 = double; T2 = double; Policy = boost::math::policies::policy<boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::mat
h::policies::default_policy>; boost::math::tools::promote_args_t<RT1, RT2> = double]’
stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/owens_t.hpp:1078:24:   required from ‘boost::math::tools::promote_args_t<RT1, RT2> boost::math::owens_t(T1, T2) [with T1 = double; T2 = double; boost::math::tools::promote_args_t<RT1, RT2> = double]’
stan/lib/stan_math/stan/math/prim/fun/owens_t.hpp:58:72:   required from here
stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/owens_t.hpp:543:26: note: parameter passing for argument of type ‘std::pair<long double, long double>’ when C++17 is enabled changed to match C++14 in GCC 10.1
  543 |          std::pair<T, T> owens_t_T1_accelerated(T h, T a, const Policy& pol)
      |                          ^~~~~~~~~~~~~~~~~~~~~~

In file included from stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/binomial.hpp:15,
                 from stan/lib/stan_math/stan/math/prim/fun/choose.hpp:7,
                 from stan/lib/stan_math/stan/math/prim/fun.hpp:46,
                 from stan/lib/stan_math/stan/math/rev/fun/multiply.hpp:7,
                 from stan/lib/stan_math/stan/math/rev/fun/elt_multiply.hpp:9,
                 from stan/lib/stan_math/stan/math/rev/fun.hpp:56,
                 from stan/lib/stan_math/stan/math/rev.hpp:12,
                 from stan/lib/stan_math/stan/math.hpp:19,
                 from stan/src/stan/model/model_header.hpp:4:
stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/beta.hpp: In instantiation of ‘boost::math::detail::ibeta_fraction2_t<T>::result_type boost::math::detail::ibeta_fraction2_t<T>::operator()() [with T = double; boost::math::detail::ibeta_fraction2_t<T>::result_type = std::pair<double, double>]’:
stan/lib/stan_math/lib/boost_1.84.0/boost/math/tools/fraction.hpp:123:20:   required from ‘typename boost::math::tools::detail::fraction_traits<Gen>::result_type boost::math::tools::continued_fraction_b(Gen&, const U&, uintmax_t&) [with Gen = boost::math::detail::ibeta_fraction2_t<double>; U = double; typename boost::math::tools::detail::fraction_traits<Gen>::result_type = double; uintmax_t = long unsigned int]’
stan/lib/stan_math/lib/boost_1.84.0/boost/math/tools/fraction.hpp:156:31:   required from ‘typename boost::math::tools::detail::fraction_traits<Gen>::result_type boost::math::tools::continued_fraction_b(Gen&, const U&) [with Gen = boost::math::detail::ibeta_fraction2_t<double>; U = double; typename boost::math::tools::detail::fraction_traits<Gen>::result_type = double]’
stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/beta.hpp:830:54:   required from ‘T boost::math::detail::ibeta_fraction2(T, T, T, T, const Policy&, bool, T*) [with T = double; Policy = boost::math::policies::policy<boost::math::poli
cies::pole_error<boost::math::policies::errno_on_error>, boost::math::policies::overflow_error<boost::math::policies::errno_on_error>, boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’
stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/beta.hpp:1472:36:   required from ‘T boost::math::detail::ibeta_imp(T, T, T, const Policy&, bool, bool, T*) [with T = double; Policy = boost::math::policies::policy<boost::math::policies::pole_error<boost::math::policies::errno_on_error>, boost::math::policies::overflow_error<boost::math::policies::errno_on_error>, boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’
stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/beta.hpp:1509:20:   required from ‘T boost::math::detail::ibeta_imp(T, T, T, const Policy&, bool, bool) [with T = double; Policy = boost::math::policies::policy<boost::math::policies::pole_error<boost::math::policies::errno_on_error>, boost::math::policies::overflow_error<boost::math::policies::errno_on_error>, boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::ma
th::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’
stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/beta.hpp:1663:93:   required from ‘boost::math::tools::promote_args_t<RT1, RT2, A> boost::math::ibeta(RT1, RT2, RT3, const Policy&) [with RT1 = double; RT2 = double; RT3 = double; Policy = boost::math::policies::policy<boost::math::policies::overflow_error<boost::math::policies::errno_on_error>, boost::math::policies::pole_error<boost::math::policies::errno_on_error>, boost::math::policies::promote_double<false>, boost::math::policies::digits2<0>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>; boost::math::tools::promote_args_t<RT1, RT2, A> = double]’
stan/lib/stan_math/stan/math/prim/fun/inc_beta.hpp:29:28:   required from here
stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/beta.hpp:793:16: note: parameter passing for argument of type ‘std::pair<double, double>’ when C++17 is enabled changed to match C++14 in GCC 10.1
  793 |    result_type operator()()
      |                ^~~~~~~~

In file included from stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/gamma.hpp:18,
                 from stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/detail/bessel_jy.hpp:14,
                 from stan/lib/stan_math/lib/boost_1.84.0/boost/math/special_functions/bessel.hpp:20,
                 from stan/lib/stan_math/stan/math/prim/fun/bessel_first_kind.hpp:6,
                 from stan/lib/stan_math/stan/math/rev/fun/bessel_first_kind.hpp:6,
                 from stan/lib/stan_math/stan/math/rev/fun.hpp:24,
                 from stan/lib/stan_math/stan/math/rev.hpp:12,
                 from stan/lib/stan_math/stan/math.hpp:19,
                 from stan/src/stan/model/model_header.hpp:4:
stan/lib/stan_math/lib/boost_1.84.0/boost/math/tools/fraction.hpp: In function ‘typename boost::math::tools::detail::fraction_traits<Gen>::result_type boost::math::tools::continued_fraction_a(Gen&, const U&, uintmax_t&) [with Gen = boost::math::detail::upper_incomplete_gamma_fract<long double>; U = long double]’:
stan/lib/stan_math/lib/boost_1.84.0/boost/math/tools/fraction.hpp:217:15: note: parameter passing for argument of type ‘std::pair<long double, long double>’ when C++17 is enabled changed to match C++14 in GCC 10.1
  217 |    value_type v = g();
      |               ^

stan/lib/stan_math/lib/boost_1.84.0/boost/math/tools/fraction.hpp: In function ‘typename boost::math::tools::detail::fraction_traits<Gen>::result_type boost::math::tools::continued_fraction_a(Gen&, const U&, uintmax_t&) [with Gen = boost::math::detail::upper_incomplete_gamma_fract<double>; U = double]’:
stan/lib/stan_math/lib/boost_1.84.0/boost/math/tools/fraction.hpp:217:20: note: parameter passing for argument of type ‘std::pair<double, double>’ when C++17 is enabled changed to match C++14 in GCC 10.1
  217 |    value_type v = g();
      |                   ~^~

stan/lib/stan_math/lib/boost_1.84.0/boost/math/tools/fraction.hpp: In function ‘typename boost::math::tools::detail::fraction_traits<Gen>::result_type boost::math::tools::continued_fraction_a(Gen&, const U&, uintmax_t&) [with Gen = boost::math::detail::upper_incomplete_gamma_fract<long double>; U = long double]’:
stan/lib/stan_math/lib/boost_1.84.0/boost/math/tools/fraction.hpp:217:20: note: parameter passing for argument of type ‘std::pair<long double, long double>’ when C++17 is enabled changed to match C++14 in GCC 10.1
  217 |    value_type v = g();
      |                   ~^~

As far as I can tell, this warning is irrelevant if you’re compiling from scratch without mixing different versions of compilers. A post about an older version of the warning suggested that -Wno-psabi could be passed to silence it

1 Like