--- Compiling, linking C++ code --- g++ -std=c++1y -pthread -D_REENTRANT -Wno-sign-compare -Wno-ignored-attributes -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.78.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DBOOST_DISABLE_ASSERTS -c -Wno-ignored-attributes -include /home/alecks/git/MinimalODEExample/odefunc.hpp -x c++ -o /home/alecks/git/MinimalODEExample/minimalODEExampleExternal.o /home/alecks/git/MinimalODEExample/minimalODEExampleExternal.hpp In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/multi_array/multi_array_ref.hpp:32, from stan/lib/stan_math/lib/boost_1.78.0/boost/multi_array.hpp:34, from stan/lib/stan_math/lib/boost_1.78.0/boost/numeric/odeint/algebra/multi_array_algebra.hpp:22, from stan/lib/stan_math/lib/boost_1.78.0/boost/numeric/odeint.hpp:63, from stan/lib/stan_math/stan/math/prim/functor/ode_rk45.hpp:9, from stan/lib/stan_math/stan/math/prim/functor/integrate_ode_rk45.hpp:6, from stan/lib/stan_math/stan/math/prim/functor.hpp:15, from stan/lib/stan_math/stan/math/rev/fun.hpp:198, from stan/lib/stan_math/stan/math/rev.hpp:10, from stan/lib/stan_math/stan/math.hpp:19, from stan/src/stan/model/model_header.hpp:4, from /home/alecks/git/MinimalODEExample/odefunc.hpp:3, from : stan/lib/stan_math/lib/boost_1.78.0/boost/functional.hpp:180:45: warning: ‘template struct std::unary_function’ is deprecated [-Wdeprecated-declarations] 180 | : public boost::functional::detail::unary_function::argument_type,bool> | ^~~~~~~~~~~~~~ In file included from /usr/include/c++/13.1.1/string:49, from /usr/include/c++/13.1.1/bits/locale_classes.h:40, from /usr/include/c++/13.1.1/bits/ios_base.h:41, from /usr/include/c++/13.1.1/ios:44, from /usr/include/c++/13.1.1/istream:40, from /usr/include/c++/13.1.1/sstream:40, from /usr/include/c++/13.1.1/complex:45, from stan/lib/stan_math/lib/eigen_3.4.0/Eigen/Core:50, from stan/lib/stan_math/lib/eigen_3.4.0/Eigen/Dense:1, from stan/lib/stan_math/stan/math/prim/fun/Eigen.hpp:22, from stan/lib/stan_math/stan/math/rev.hpp:4: /usr/include/c++/13.1.1/bits/stl_function.h:117:12: note: declared here 117 | struct unary_function | ^~~~~~~~~~~~~~ stan/lib/stan_math/lib/boost_1.78.0/boost/functional.hpp:214:45: warning: ‘template struct std::binary_function’ is deprecated [-Wdeprecated-declarations] 214 | : public boost::functional::detail::binary_function< | ^~~~~~~~~~~~~~~ /usr/include/c++/13.1.1/bits/stl_function.h:131:12: note: declared here 131 | struct binary_function | ^~~~~~~~~~~~~~~ stan/lib/stan_math/lib/boost_1.78.0/boost/functional.hpp:252:45: warning: ‘template struct std::unary_function’ is deprecated [-Wdeprecated-declarations] 252 | : public boost::functional::detail::unary_function< | ^~~~~~~~~~~~~~ /usr/include/c++/13.1.1/bits/stl_function.h:117:12: note: declared here 117 | struct unary_function | ^~~~~~~~~~~~~~ stan/lib/stan_math/lib/boost_1.78.0/boost/functional.hpp:299:45: warning: ‘template struct std::unary_function’ is deprecated [-Wdeprecated-declarations] 299 | : public boost::functional::detail::unary_function< | ^~~~~~~~~~~~~~ /usr/include/c++/13.1.1/bits/stl_function.h:117:12: note: declared here 117 | struct unary_function | ^~~~~~~~~~~~~~ stan/lib/stan_math/lib/boost_1.78.0/boost/functional.hpp:345:57: warning: ‘template struct std::unary_function’ is deprecated [-Wdeprecated-declarations] 345 | class mem_fun_t : public boost::functional::detail::unary_function | ^~~~~~~~~~~~~~ /usr/include/c++/13.1.1/bits/stl_function.h:117:12: note: declared here 117 | struct unary_function | ^~~~~~~~~~~~~~ stan/lib/stan_math/lib/boost_1.78.0/boost/functional.hpp:361:58: warning: ‘template struct std::binary_function’ is deprecated [-Wdeprecated-declarations] 361 | class mem_fun1_t : public boost::functional::detail::binary_function | ^~~~~~~~~~~~~~~ /usr/include/c++/13.1.1/bits/stl_function.h:131:12: note: declared here 131 | struct binary_function | ^~~~~~~~~~~~~~~ stan/lib/stan_math/lib/boost_1.78.0/boost/functional.hpp:377:63: warning: ‘template struct std::unary_function’ is deprecated [-Wdeprecated-declarations] 377 | class const_mem_fun_t : public boost::functional::detail::unary_function | ^~~~~~~~~~~~~~ /usr/include/c++/13.1.1/bits/stl_function.h:117:12: note: declared here 117 | struct unary_function | ^~~~~~~~~~~~~~ stan/lib/stan_math/lib/boost_1.78.0/boost/functional.hpp:393:64: warning: ‘template struct std::binary_function’ is deprecated [-Wdeprecated-declarations] 393 | class const_mem_fun1_t : public boost::functional::detail::binary_function | ^~~~~~~~~~~~~~~ /usr/include/c++/13.1.1/bits/stl_function.h:131:12: note: declared here 131 | struct binary_function | ^~~~~~~~~~~~~~~ stan/lib/stan_math/lib/boost_1.78.0/boost/functional.hpp:438:61: warning: ‘template struct std::unary_function’ is deprecated [-Wdeprecated-declarations] 438 | class mem_fun_ref_t : public boost::functional::detail::unary_function | ^~~~~~~~~~~~~~ /usr/include/c++/13.1.1/bits/stl_function.h:117:12: note: declared here 117 | struct unary_function | ^~~~~~~~~~~~~~ stan/lib/stan_math/lib/boost_1.78.0/boost/functional.hpp:454:62: warning: ‘template struct std::binary_function’ is deprecated [-Wdeprecated-declarations] 454 | class mem_fun1_ref_t : public boost::functional::detail::binary_function | ^~~~~~~~~~~~~~~ /usr/include/c++/13.1.1/bits/stl_function.h:131:12: note: declared here 131 | struct binary_function | ^~~~~~~~~~~~~~~ stan/lib/stan_math/lib/boost_1.78.0/boost/functional.hpp:470:67: warning: ‘template struct std::unary_function’ is deprecated [-Wdeprecated-declarations] 470 | class const_mem_fun_ref_t : public boost::functional::detail::unary_function | ^~~~~~~~~~~~~~ /usr/include/c++/13.1.1/bits/stl_function.h:117:12: note: declared here 117 | struct unary_function | ^~~~~~~~~~~~~~ stan/lib/stan_math/lib/boost_1.78.0/boost/functional.hpp:487:68: warning: ‘template struct std::binary_function’ is deprecated [-Wdeprecated-declarations] 487 | class const_mem_fun1_ref_t : public boost::functional::detail::binary_function | ^~~~~~~~~~~~~~~ /usr/include/c++/13.1.1/bits/stl_function.h:131:12: note: declared here 131 | struct binary_function | ^~~~~~~~~~~~~~~ stan/lib/stan_math/lib/boost_1.78.0/boost/functional.hpp:533:73: warning: ‘template struct std::unary_function’ is deprecated [-Wdeprecated-declarations] 533 | class pointer_to_unary_function : public boost::functional::detail::unary_function | ^~~~~~~~~~~~~~ /usr/include/c++/13.1.1/bits/stl_function.h:117:12: note: declared here 117 | struct unary_function | ^~~~~~~~~~~~~~ stan/lib/stan_math/lib/boost_1.78.0/boost/functional.hpp:557:74: warning: ‘template struct std::binary_function’ is deprecated [-Wdeprecated-declarations] 557 | class pointer_to_binary_function : public boost::functional::detail::binary_function | ^~~~~~~~~~~~~~~ /usr/include/c++/13.1.1/bits/stl_function.h:131:12: note: declared here 131 | struct binary_function | ^~~~~~~~~~~~~~~ /home/alecks/git/MinimalODEExample/odefunc.hpp: In instantiation of ‘Eigen::Matrix, -1, 1> minimalODEExampleExternal_model_namespace::odefunc(const double&, const T1__&, const double&, std::ostream*) [with T1__ = Eigen::Matrix, -1, 1>; stan::require_all_t, stan::is_vt_not_complex >* = 0; std::ostream = std::basic_ostream]’: /home/alecks/git/MinimalODEExample/minimalODEExampleExternal.hpp:38:0: required from ‘Eigen::Matrix::type, T2__>::type, -1, 1> minimalODEExampleExternal_model_namespace::odefunc_variadic2_functor__::operator()(const T0__&, const T1__&, std::ostream*, const T2__&) const [with T0__ = double; T1__ = Eigen::Matrix, -1, 1>; T2__ = double; stan::require_all_t, stan::is_col_vector, stan::is_vt_not_complex, stan::is_stan_scalar >* = 0; typename boost::math::tools::promote_args::type, T2__>::type = stan::math::var_value; typename stan::base_type::type = stan::math::var_value; std::ostream = std::basic_ostream]’ stan/lib/stan_math/stan/math/rev/functor/coupled_ode_system.hpp:130:40: required from ‘stan::math::coupled_ode_system_impl, const double&>::operator()(const std::vector >&, std::vector >&, double):: [with auto:616 = {const double&}]’ stan/lib/stan_math/stan/math/prim/functor/apply.hpp:26:11: required from ‘constexpr decltype(auto) stan::math::internal::apply_impl(F&&, Tuple&&, std::index_sequence) [with F = stan::math::coupled_ode_system_impl, const double&>::operator()(const std::vector >&, std::vector >&, double)::; Tuple = std::tuple&; long unsigned int ...I = {0}; std::index_sequence = std::integer_sequence]’ stan/lib/stan_math/stan/math/prim/functor/apply.hpp:44:30: required from ‘constexpr decltype(auto) stan::math::apply(F&&, Tuple&&) [with F = coupled_ode_system_impl, const double&>::operator()(const std::vector >&, std::vector >&, double)::; Tuple = std::tuple&]’ stan/lib/stan_math/stan/math/rev/functor/coupled_ode_system.hpp:129:67: required from ‘void stan::math::coupled_ode_system_impl::operator()(const std::vector >&, std::vector >&, double) [with F = minimalODEExampleExternal_model_namespace::odefunc_variadic2_functor__; T_y0 = stan::math::var_value; Args = {const double&}]’ stan/lib/stan_math/lib/boost_1.78.0/boost/numeric/odeint/stepper/dense_output_runge_kutta.hpp:329:16: [ skipping 4 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ] stan/lib/stan_math/stan/math/prim/functor/ode_rk45.hpp:145:20: required from ‘std::vector::type, -1, 1> > stan::math::ode_rk45_tol_impl(const char*, const F&, const T_y0&, T_t0, const std::vector&, double, double, long int, std::ostream*, const Args& ...) [with F = minimalODEExampleExternal_model_namespace::odefunc_variadic2_functor__; T_y0 = Eigen::Matrix, -1, 1>; T_t0 = double; T_ts = double; Args = {double}; stan::require_eigen_vector_t* = 0; typename stan::return_type::type = var_value; std::ostream = std::basic_ostream]’ stan/lib/stan_math/stan/math/prim/functor/ode_rk45.hpp:253:27: required from ‘std::vector::type, -1, 1> > stan::math::ode_rk45(const F&, const T_y0&, T_t0, const std::vector&, std::ostream*, const Args& ...) [with F = minimalODEExampleExternal_model_namespace::odefunc_variadic2_functor__; T_y0 = Eigen::Matrix, -1, 1>; T_t0 = double; T_ts = double; Args = {double}; stan::require_eigen_vector_t* = 0; typename stan::return_type::type = var_value; std::ostream = std::basic_ostream]’ /home/alecks/git/MinimalODEExample/minimalODEExampleExternal.hpp:297:0: required from ‘stan::scalar_type_t minimalODEExampleExternal_model_namespace::minimalODEExampleExternal_model::log_prob_impl(VecR&, VecI&, std::ostream*) const [with bool propto__ = false; bool jacobian__ = false; VecR = Eigen::Matrix, -1, 1>; VecI = Eigen::Matrix; stan::require_vector_like_t* = 0; stan::require_vector_like_vt* = 0; stan::require_st_var* = 0; stan::scalar_type_t = stan::math::var_value; std::ostream = std::basic_ostream]’ /home/alecks/git/MinimalODEExample/minimalODEExampleExternal.hpp:543:0: required from ‘T_ minimalODEExampleExternal_model_namespace::minimalODEExampleExternal_model::log_prob(Eigen::Matrix&, std::ostream*) const [with bool propto__ = false; bool jacobian__ = false; T_ = stan::math::var_value; std::ostream = std::basic_ostream]’ stan/src/stan/model/model_base_crtp.hpp:98:0: required from ‘stan::math::var stan::model::model_base_crtp::log_prob(Eigen::Matrix, -1, 1>&, std::ostream*) const [with M = minimalODEExampleExternal_model_namespace::minimalODEExampleExternal_model; stan::math::var = stan::math::var_value; std::ostream = std::basic_ostream]’ stan/src/stan/model/model_base_crtp.hpp:96:0: required from here /home/alecks/git/MinimalODEExample/odefunc.hpp:37: error: invalid use of incomplete type ‘class stan::math::var_value, -1, 1>, void>’ 37 | stan::math::make_callback_var(dydt, [y_arena, jacobian](auto& res){ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 38 | y_arena.adj() += jacobian.transpose() * res.adj(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 39 | }); | In file included from stan/lib/stan_math/stan/math/rev/core/vari.hpp:4, from stan/lib/stan_math/stan/math/rev/core/var.hpp:8, from stan/lib/stan_math/stan/math/rev/meta/conditional_var_value.hpp:4, from stan/lib/stan_math/stan/math/rev/meta.hpp:6, from stan/lib/stan_math/stan/math/rev/core/accumulate_adjoints.hpp:5, from stan/lib/stan_math/stan/math/rev/core.hpp:4, from stan/lib/stan_math/stan/math/rev.hpp:8: stan/lib/stan_math/stan/math/rev/core/var_value_fwd_declare.hpp:8:7: note: declaration of ‘class stan::math::var_value, -1, 1>, void>’ 8 | class var_value; | ^~~~~~~~~ In file included from stan/lib/stan_math/stan/math/rev/core.hpp:13: stan/lib/stan_math/stan/math/rev/core/callback_vari.hpp: In instantiation of ‘stan::math::var_value::type> stan::math::make_callback_var(T&&, F&&) [with T = Eigen::Matrix, -1, 1>&; F = minimalODEExampleExternal_model_namespace::odefunc, -1, 1> >(const double&, const Eigen::Matrix, -1, 1>&, const double&, std::ostream*)::; typename stan::plain_type::type = Eigen::Matrix, -1, 1>]’: /home/alecks/git/MinimalODEExample/odefunc.hpp:37:0: required from ‘Eigen::Matrix, -1, 1> minimalODEExampleExternal_model_namespace::odefunc(const double&, const T1__&, const double&, std::ostream*) [with T1__ = Eigen::Matrix, -1, 1>; stan::require_all_t, stan::is_vt_not_complex >* = 0; std::ostream = std::basic_ostream]’ /home/alecks/git/MinimalODEExample/minimalODEExampleExternal.hpp:38:0: required from ‘Eigen::Matrix::type, T2__>::type, -1, 1> minimalODEExampleExternal_model_namespace::odefunc_variadic2_functor__::operator()(const T0__&, const T1__&, std::ostream*, const T2__&) const [with T0__ = double; T1__ = Eigen::Matrix, -1, 1>; T2__ = double; stan::require_all_t, stan::is_col_vector, stan::is_vt_not_complex, stan::is_stan_scalar >* = 0; typename boost::math::tools::promote_args::type, T2__>::type = stan::math::var_value; typename stan::base_type::type = stan::math::var_value; std::ostream = std::basic_ostream]’ stan/lib/stan_math/stan/math/rev/functor/coupled_ode_system.hpp:130:40: required from ‘stan::math::coupled_ode_system_impl, const double&>::operator()(const std::vector >&, std::vector >&, double):: [with auto:616 = {const double&}]’ stan/lib/stan_math/stan/math/prim/functor/apply.hpp:26:11: required from ‘constexpr decltype(auto) stan::math::internal::apply_impl(F&&, Tuple&&, std::index_sequence) [with F = stan::math::coupled_ode_system_impl, const double&>::operator()(const std::vector >&, std::vector >&, double)::; Tuple = std::tuple&; long unsigned int ...I = {0}; std::index_sequence = std::integer_sequence]’ stan/lib/stan_math/stan/math/prim/functor/apply.hpp:44:30: required from ‘constexpr decltype(auto) stan::math::apply(F&&, Tuple&&) [with F = coupled_ode_system_impl, const double&>::operator()(const std::vector >&, std::vector >&, double)::; Tuple = std::tuple&]’ stan/lib/stan_math/stan/math/rev/functor/coupled_ode_system.hpp:129:67: [ skipping 5 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ] stan/lib/stan_math/stan/math/prim/functor/ode_rk45.hpp:145:20: required from ‘std::vector::type, -1, 1> > stan::math::ode_rk45_tol_impl(const char*, const F&, const T_y0&, T_t0, const std::vector&, double, double, long int, std::ostream*, const Args& ...) [with F = minimalODEExampleExternal_model_namespace::odefunc_variadic2_functor__; T_y0 = Eigen::Matrix, -1, 1>; T_t0 = double; T_ts = double; Args = {double}; stan::require_eigen_vector_t* = 0; typename stan::return_type::type = var_value; std::ostream = std::basic_ostream]’ stan/lib/stan_math/stan/math/prim/functor/ode_rk45.hpp:253:27: required from ‘std::vector::type, -1, 1> > stan::math::ode_rk45(const F&, const T_y0&, T_t0, const std::vector&, std::ostream*, const Args& ...) [with F = minimalODEExampleExternal_model_namespace::odefunc_variadic2_functor__; T_y0 = Eigen::Matrix, -1, 1>; T_t0 = double; T_ts = double; Args = {double}; stan::require_eigen_vector_t* = 0; typename stan::return_type::type = var_value; std::ostream = std::basic_ostream]’ /home/alecks/git/MinimalODEExample/minimalODEExampleExternal.hpp:297:0: required from ‘stan::scalar_type_t minimalODEExampleExternal_model_namespace::minimalODEExampleExternal_model::log_prob_impl(VecR&, VecI&, std::ostream*) const [with bool propto__ = false; bool jacobian__ = false; VecR = Eigen::Matrix, -1, 1>; VecI = Eigen::Matrix; stan::require_vector_like_t* = 0; stan::require_vector_like_vt* = 0; stan::require_st_var* = 0; stan::scalar_type_t = stan::math::var_value; std::ostream = std::basic_ostream]’ /home/alecks/git/MinimalODEExample/minimalODEExampleExternal.hpp:543:0: required from ‘T_ minimalODEExampleExternal_model_namespace::minimalODEExampleExternal_model::log_prob(Eigen::Matrix&, std::ostream*) const [with bool propto__ = false; bool jacobian__ = false; T_ = stan::math::var_value; std::ostream = std::basic_ostream]’ stan/src/stan/model/model_base_crtp.hpp:98:0: required from ‘stan::math::var stan::model::model_base_crtp::log_prob(Eigen::Matrix, -1, 1>&, std::ostream*) const [with M = minimalODEExampleExternal_model_namespace::minimalODEExampleExternal_model; stan::math::var = stan::math::var_value; std::ostream = std::basic_ostream]’ stan/src/stan/model/model_base_crtp.hpp:96:0: required from here stan/lib/stan_math/stan/math/rev/core/callback_vari.hpp:61:28: error: return type ‘class stan::math::var_value, -1, 1>, void>’ is incomplete 61 | var_value> make_callback_var(T&& value, F&& functor) { | ^~~~~~~~~~~~~~~~~ stan/lib/stan_math/stan/math/rev/core/callback_vari.hpp:62:10: error: invalid use of incomplete type ‘class stan::math::var_value, -1, 1>, void>’ 62 | return var_value>( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 63 | make_callback_vari(std::move(value), std::forward(functor))); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ stan/lib/stan_math/stan/math/rev/core/var_value_fwd_declare.hpp:8:7: note: declaration of ‘class stan::math::var_value, -1, 1>, void>’ 8 | class var_value; | ^~~~~~~~~ make: *** [make/program:58: /home/alecks/git/MinimalODEExample/minimalODEExampleExternal] Error 1