Running ‘testthat.R’ [228s/250s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > Sys.setenv("R_TESTS" = "")
  > library(testthat)
  > library(rstansim)
  Loading required package: Rcpp
  > 
  > test_check("rstansim")
  ── 1. Error: single_sim testing with stansim_data input (@test-single_sim.R#426)
  Compilation ERROR, function(s)/method(s) not created! In file included from /tmp/Rtmpppa4wP/RLIBS_52b74de540c/BH/include/boost/config.hpp:39:0,
                   from /tmp/Rtmpppa4wP/RLIBS_52b74de540c/BH/include/boost/math/tools/config.hpp:13,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core/var.hpp:7,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core/gevv_vvv_vari.hpp:5,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core.hpp:12,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c3876147e.cpp:8:
  /tmp/Rtmpppa4wP/RLIBS_52b74de540c/BH/include/boost/config/compiler/gcc.hpp:186:0: warning: "BOOST_NO_CXX11_RVALUE_REFERENCES" redefined
   #  define BOOST_NO_CXX11_RVALUE_REFERENCES
   ^
  <command-line>:0:0: note: this is the location of the previous definition
  In file included from /usr/include/sys/ucontext.h:20:0,
                   from /usr/include/sys/signal.h:231,
                   from /usr/include/sys/procset.h:23,
                   from /usr/include/sys/wait.h:25,
                   from /usr/include/stdlib.h:21,
                   from /opt/csw/include/c++/5.2.0/cstdlib:72,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/memory/stack_alloc.hpp:8,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core/autodiffstackstorage.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c3876147e.cpp:8:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:97:24: error: expected nested-name-specifier before numeric constant
       template <typename FS, typename F, typename T0, typename T1>
                          ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:97:24: error: expected ‘>’ before numeric constant
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:100:7: error: expected unqualified-id before numeric constant
         FS fs_;
         ^
  In file included from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_solver.hpp:4:0,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:55,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c3876147e.cpp:8:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:106:28: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
         hybrj_functor_solver(const FS& fs,
                              ^
  In file included from /usr/include/sys/ucontext.h:20:0,
                   from /usr/include/sys/signal.h:231,
                   from /usr/include/sys/procset.h:23,
                   from /usr/include/sys/wait.h:25,
                   from /usr/include/stdlib.h:21,
                   from /opt/csw/include/c++/5.2.0/cstdlib:72,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/memory/stack_alloc.hpp:8,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core/autodiffstackstorage.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c3876147e.cpp:8:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:106:34: error: expected ‘,’ or ‘...’ before numeric constant
         hybrj_functor_solver(const FS& fs,
                                    ^
  In file included from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_solver.hpp:4:0,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:55,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c3876147e.cpp:8:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp: In constructor ‘stan::math::hybrj_functor_solver<<anonymous> >::hybrj_functor_solver(int)’:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:11: error: class ‘stan::math::hybrj_functor_solver<<anonymous> >’ does not have any field named ‘fs_’
           : fs_(f, x, y, dat, dat_int, msgs),
             ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:15: error: ‘f’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                 ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:18: error: ‘x’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                    ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:21: error: ‘y’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                       ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:24: error: ‘dat’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                          ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:29: error: ‘dat_int’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                               ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:38: error: ‘msgs’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                                        ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp: In member function ‘int stan::math::hybrj_functor_solver<<anonymous> >::operator()(const VectorXd&, Eigen::VectorXd&)’:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:124:18: error: ‘fs_’ was not declared in this scope
           jacobian(fs_, iv, fvec, J_);
                    ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp: In member function ‘Eigen::MatrixXd stan::math::hybrj_functor_solver<<anonymous> >::get_jacobian(const VectorXd&)’:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:147:18: error: ‘fs_’ was not declared in this scope
           jacobian(fs_, iv, fvec, J_);
                    ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp: In member function ‘Eigen::VectorXd stan::math::hybrj_functor_solver<<anonymous> >::get_value(const VectorXd&) const’:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:158:22: error: there are no arguments to ‘fs_’ that depend on a template parameter, so a declaration of ‘fs_’ must be available [-fpermissive]
           return fs_(iv);
                        ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:158:22: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
  In file included from /usr/include/sys/ucontext.h:20:0,
                   from /usr/incl
  1: capture_output(test_stanfit <- rstan::stan_model(file = "data-raw/simtestreg.stan")) at testthat/test-single_sim.R:426
  2: capture_output_lines(code, print, width = width)
  3: eval_with_output(code, print = print, width = width)
  4: withr::with_output_sink(temp, withVisible(code))
  5: force(code)
  6: withVisible(code)
  7: rstan::stan_model(file = "data-raw/simtestreg.stan")
  8: cxxfunctionplus(signature(), body = paste(" return Rcpp::wrap(\"", model_name, "\");", 
         sep = ""), includes = inc, plugin = "rstan", save_dso = save_dso | auto_write, 
         module_name = paste("stan_fit4", model_cppname, "_mod", sep = ""), verbose = verbose)
  9: cxxfunction(sig = sig, body = body, plugin = plugin, includes = includes, settings = settings, 
         ..., verbose = verbose)
  10: compileCode(f, code, language = language, verbose = verbose)
  11: stop(paste("Compilation ERROR, function(s)/method(s) not created!", paste(errmsg, 
         collapse = "\n")))
  
  ── 2. Error: stansim test with stansim_data object; cache FALSE, loo FALSE (@tes
  Compilation ERROR, function(s)/method(s) not created! In file included from /tmp/Rtmpppa4wP/RLIBS_52b74de540c/BH/include/boost/config.hpp:39:0,
                   from /tmp/Rtmpppa4wP/RLIBS_52b74de540c/BH/include/boost/math/tools/config.hpp:13,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core/var.hpp:7,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core/gevv_vvv_vari.hpp:5,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core.hpp:12,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c5de17a37.cpp:8:
  /tmp/Rtmpppa4wP/RLIBS_52b74de540c/BH/include/boost/config/compiler/gcc.hpp:186:0: warning: "BOOST_NO_CXX11_RVALUE_REFERENCES" redefined
   #  define BOOST_NO_CXX11_RVALUE_REFERENCES
   ^
  <command-line>:0:0: note: this is the location of the previous definition
  In file included from /usr/include/sys/ucontext.h:20:0,
                   from /usr/include/sys/signal.h:231,
                   from /usr/include/sys/procset.h:23,
                   from /usr/include/sys/wait.h:25,
                   from /usr/include/stdlib.h:21,
                   from /opt/csw/include/c++/5.2.0/cstdlib:72,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/memory/stack_alloc.hpp:8,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core/autodiffstackstorage.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c5de17a37.cpp:8:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:97:24: error: expected nested-name-specifier before numeric constant
       template <typename FS, typename F, typename T0, typename T1>
                          ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:97:24: error: expected ‘>’ before numeric constant
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:100:7: error: expected unqualified-id before numeric constant
         FS fs_;
         ^
  In file included from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_solver.hpp:4:0,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:55,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c5de17a37.cpp:8:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:106:28: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
         hybrj_functor_solver(const FS& fs,
                              ^
  In file included from /usr/include/sys/ucontext.h:20:0,
                   from /usr/include/sys/signal.h:231,
                   from /usr/include/sys/procset.h:23,
                   from /usr/include/sys/wait.h:25,
                   from /usr/include/stdlib.h:21,
                   from /opt/csw/include/c++/5.2.0/cstdlib:72,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/memory/stack_alloc.hpp:8,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core/autodiffstackstorage.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c5de17a37.cpp:8:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:106:34: error: expected ‘,’ or ‘...’ before numeric constant
         hybrj_functor_solver(const FS& fs,
                                    ^
  In file included from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_solver.hpp:4:0,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:55,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c5de17a37.cpp:8:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp: In constructor ‘stan::math::hybrj_functor_solver<<anonymous> >::hybrj_functor_solver(int)’:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:11: error: class ‘stan::math::hybrj_functor_solver<<anonymous> >’ does not have any field named ‘fs_’
           : fs_(f, x, y, dat, dat_int, msgs),
             ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:15: error: ‘f’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                 ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:18: error: ‘x’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                    ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:21: error: ‘y’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                       ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:24: error: ‘dat’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                          ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:29: error: ‘dat_int’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                               ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:38: error: ‘msgs’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                                        ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp: In member function ‘int stan::math::hybrj_functor_solver<<anonymous> >::operator()(const VectorXd&, Eigen::VectorXd&)’:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:124:18: error: ‘fs_’ was not declared in this scope
           jacobian(fs_, iv, fvec, J_);
                    ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp: In member function ‘Eigen::MatrixXd stan::math::hybrj_functor_solver<<anonymous> >::get_jacobian(const VectorXd&)’:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:147:18: error: ‘fs_’ was not declared in this scope
           jacobian(fs_, iv, fvec, J_);
                    ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp: In member function ‘Eigen::VectorXd stan::math::hybrj_functor_solver<<anonymous> >::get_value(const VectorXd&) const’:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:158:22: error: there are no arguments to ‘fs_’ that depend on a template parameter, so a declaration of ‘fs_’ must be available [-fpermissive]
           return fs_(iv);
                        ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:158:22: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
  In file included from /usr/include/sys/ucontext.h:20:0,
                   from /usr/incl
  1: capture_output(ss_data <- simulate_data(file = "data-raw/simtestreg.stan", data_name = "saved stansim_data", 
         input_data = reg_data, nsim = 1, path = "testdir", param_values = test_vals, 
         vars = c("sim_x", "sim_y", "N"), use_cores = 1)$datasets) at testthat/test-stansim_external_functions.R:805
  2: capture_output_lines(code, print, width = width)
  3: eval_with_output(code, print = print, width = width)
  4: withr::with_output_sink(temp, withVisible(code))
  5: force(code)
  6: withVisible(code)
  7: simulate_data(file = "data-raw/simtestreg.stan", data_name = "saved stansim_data", 
         input_data = reg_data, nsim = 1, path = "testdir", param_values = test_vals, 
         vars = c("sim_x", "sim_y", "N"), use_cores = 1)
  8: rstan::stan_model(file = file)
  9: cxxfunctionplus(signature(), body = paste(" return Rcpp::wrap(\"", model_name, "\");", 
         sep = ""), includes = inc, plugin = "rstan", save_dso = save_dso | auto_write, 
         module_name = paste("stan_fit4", model_cppname, "_mod", sep = ""), verbose = verbose)
  10: cxxfunction(sig = sig, body = body, plugin = plugin, includes = includes, settings = settings, 
         ..., verbose = verbose)
  11: compileCode(f, code, language = language, verbose = verbose)
  12: stop(paste("Compilation ERROR, function(s)/method(s) not created!", paste(errmsg, 
         collapse = "\n")))
  
  ── 3. Error: stansim test with stansim_data object; cache TRUE, loo FALSE (@test
  Compilation ERROR, function(s)/method(s) not created! In file included from /tmp/Rtmpppa4wP/RLIBS_52b74de540c/BH/include/boost/config.hpp:39:0,
                   from /tmp/Rtmpppa4wP/RLIBS_52b74de540c/BH/include/boost/math/tools/config.hpp:13,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core/var.hpp:7,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core/gevv_vvv_vari.hpp:5,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core.hpp:12,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c5f0122bc.cpp:8:
  /tmp/Rtmpppa4wP/RLIBS_52b74de540c/BH/include/boost/config/compiler/gcc.hpp:186:0: warning: "BOOST_NO_CXX11_RVALUE_REFERENCES" redefined
   #  define BOOST_NO_CXX11_RVALUE_REFERENCES
   ^
  <command-line>:0:0: note: this is the location of the previous definition
  In file included from /usr/include/sys/ucontext.h:20:0,
                   from /usr/include/sys/signal.h:231,
                   from /usr/include/sys/procset.h:23,
                   from /usr/include/sys/wait.h:25,
                   from /usr/include/stdlib.h:21,
                   from /opt/csw/include/c++/5.2.0/cstdlib:72,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/memory/stack_alloc.hpp:8,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core/autodiffstackstorage.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c5f0122bc.cpp:8:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:97:24: error: expected nested-name-specifier before numeric constant
       template <typename FS, typename F, typename T0, typename T1>
                          ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:97:24: error: expected ‘>’ before numeric constant
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:100:7: error: expected unqualified-id before numeric constant
         FS fs_;
         ^
  In file included from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_solver.hpp:4:0,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:55,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c5f0122bc.cpp:8:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:106:28: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
         hybrj_functor_solver(const FS& fs,
                              ^
  In file included from /usr/include/sys/ucontext.h:20:0,
                   from /usr/include/sys/signal.h:231,
                   from /usr/include/sys/procset.h:23,
                   from /usr/include/sys/wait.h:25,
                   from /usr/include/stdlib.h:21,
                   from /opt/csw/include/c++/5.2.0/cstdlib:72,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/memory/stack_alloc.hpp:8,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core/autodiffstackstorage.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c5f0122bc.cpp:8:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:106:34: error: expected ‘,’ or ‘...’ before numeric constant
         hybrj_functor_solver(const FS& fs,
                                    ^
  In file included from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_solver.hpp:4:0,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:55,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c5f0122bc.cpp:8:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp: In constructor ‘stan::math::hybrj_functor_solver<<anonymous> >::hybrj_functor_solver(int)’:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:11: error: class ‘stan::math::hybrj_functor_solver<<anonymous> >’ does not have any field named ‘fs_’
           : fs_(f, x, y, dat, dat_int, msgs),
             ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:15: error: ‘f’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                 ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:18: error: ‘x’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                    ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:21: error: ‘y’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                       ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:24: error: ‘dat’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                          ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:29: error: ‘dat_int’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                               ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:38: error: ‘msgs’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                                        ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp: In member function ‘int stan::math::hybrj_functor_solver<<anonymous> >::operator()(const VectorXd&, Eigen::VectorXd&)’:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:124:18: error: ‘fs_’ was not declared in this scope
           jacobian(fs_, iv, fvec, J_);
                    ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp: In member function ‘Eigen::MatrixXd stan::math::hybrj_functor_solver<<anonymous> >::get_jacobian(const VectorXd&)’:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:147:18: error: ‘fs_’ was not declared in this scope
           jacobian(fs_, iv, fvec, J_);
                    ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp: In member function ‘Eigen::VectorXd stan::math::hybrj_functor_solver<<anonymous> >::get_value(const VectorXd&) const’:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:158:22: error: there are no arguments to ‘fs_’ that depend on a template parameter, so a declaration of ‘fs_’ must be available [-fpermissive]
           return fs_(iv);
                        ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:158:22: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
  In file included from /usr/include/sys/ucontext.h:20:0,
                   from /usr/incl
  1: capture_output(ss_data <- simulate_data(file = "data-raw/simtestreg.stan", data_name = "saved stansim_data", 
         input_data = reg_data, nsim = 1, path = "testdir", param_values = test_vals, 
         vars = c("sim_x", "sim_y", "N"), use_cores = 1)$datasets) at testthat/test-stansim_external_functions.R:994
  2: capture_output_lines(code, print, width = width)
  3: eval_with_output(code, print = print, width = width)
  4: withr::with_output_sink(temp, withVisible(code))
  5: force(code)
  6: withVisible(code)
  7: simulate_data(file = "data-raw/simtestreg.stan", data_name = "saved stansim_data", 
         input_data = reg_data, nsim = 1, path = "testdir", param_values = test_vals, 
         vars = c("sim_x", "sim_y", "N"), use_cores = 1)
  8: rstan::stan_model(file = file)
  9: cxxfunctionplus(signature(), body = paste(" return Rcpp::wrap(\"", model_name, "\");", 
         sep = ""), includes = inc, plugin = "rstan", save_dso = save_dso | auto_write, 
         module_name = paste("stan_fit4", model_cppname, "_mod", sep = ""), verbose = verbose)
  10: cxxfunction(sig = sig, body = body, plugin = plugin, includes = includes, settings = settings, 
         ..., verbose = verbose)
  11: compileCode(f, code, language = language, verbose = verbose)
  12: stop(paste("Compilation ERROR, function(s)/method(s) not created!", paste(errmsg, 
         collapse = "\n")))
  
  ── 4. Error: (unknown) (@test-stansim_simulate-utilities.R#4)  ─────────────────
  Compilation ERROR, function(s)/method(s) not created! In file included from /tmp/Rtmpppa4wP/RLIBS_52b74de540c/BH/include/boost/config.hpp:39:0,
                   from /tmp/Rtmpppa4wP/RLIBS_52b74de540c/BH/include/boost/math/tools/config.hpp:13,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core/var.hpp:7,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core/gevv_vvv_vari.hpp:5,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core.hpp:12,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c76916a0.cpp:8:
  /tmp/Rtmpppa4wP/RLIBS_52b74de540c/BH/include/boost/config/compiler/gcc.hpp:186:0: warning: "BOOST_NO_CXX11_RVALUE_REFERENCES" redefined
   #  define BOOST_NO_CXX11_RVALUE_REFERENCES
   ^
  <command-line>:0:0: note: this is the location of the previous definition
  In file included from /usr/include/sys/ucontext.h:20:0,
                   from /usr/include/sys/signal.h:231,
                   from /usr/include/sys/procset.h:23,
                   from /usr/include/sys/wait.h:25,
                   from /usr/include/stdlib.h:21,
                   from /opt/csw/include/c++/5.2.0/cstdlib:72,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/memory/stack_alloc.hpp:8,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core/autodiffstackstorage.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c76916a0.cpp:8:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:97:24: error: expected nested-name-specifier before numeric constant
       template <typename FS, typename F, typename T0, typename T1>
                          ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:97:24: error: expected ‘>’ before numeric constant
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:100:7: error: expected unqualified-id before numeric constant
         FS fs_;
         ^
  In file included from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_solver.hpp:4:0,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:55,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c76916a0.cpp:8:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:106:28: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
         hybrj_functor_solver(const FS& fs,
                              ^
  In file included from /usr/include/sys/ucontext.h:20:0,
                   from /usr/include/sys/signal.h:231,
                   from /usr/include/sys/procset.h:23,
                   from /usr/include/sys/wait.h:25,
                   from /usr/include/stdlib.h:21,
                   from /opt/csw/include/c++/5.2.0/cstdlib:72,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/memory/stack_alloc.hpp:8,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core/autodiffstackstorage.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c76916a0.cpp:8:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:106:34: error: expected ‘,’ or ‘...’ before numeric constant
         hybrj_functor_solver(const FS& fs,
                                    ^
  In file included from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_solver.hpp:4:0,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:55,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c76916a0.cpp:8:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp: In constructor ‘stan::math::hybrj_functor_solver<<anonymous> >::hybrj_functor_solver(int)’:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:11: error: class ‘stan::math::hybrj_functor_solver<<anonymous> >’ does not have any field named ‘fs_’
           : fs_(f, x, y, dat, dat_int, msgs),
             ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:15: error: ‘f’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                 ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:18: error: ‘x’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                    ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:21: error: ‘y’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                       ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:24: error: ‘dat’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                          ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:29: error: ‘dat_int’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                               ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:38: error: ‘msgs’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                                        ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp: In member function ‘int stan::math::hybrj_functor_solver<<anonymous> >::operator()(const VectorXd&, Eigen::VectorXd&)’:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:124:18: error: ‘fs_’ was not declared in this scope
           jacobian(fs_, iv, fvec, J_);
                    ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp: In member function ‘Eigen::MatrixXd stan::math::hybrj_functor_solver<<anonymous> >::get_jacobian(const VectorXd&)’:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:147:18: error: ‘fs_’ was not declared in this scope
           jacobian(fs_, iv, fvec, J_);
                    ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp: In member function ‘Eigen::VectorXd stan::math::hybrj_functor_solver<<anonymous> >::get_value(const VectorXd&) const’:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:158:22: error: there are no arguments to ‘fs_’ that depend on a template parameter, so a declaration of ‘fs_’ must be available [-fpermissive]
           return fs_(iv);
                        ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:158:22: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
  In file included from /usr/include/sys/ucontext.h:20:0,
                   from /usr/include/s
  1: capture_output(compiled_model <- rstan::stan_model(file = "data-raw/simtestreg.stan")) at testthat/test-stansim_simulate-utilities.R:4
  2: capture_output_lines(code, print, width = width)
  3: eval_with_output(code, print = print, width = width)
  4: withr::with_output_sink(temp, withVisible(code))
  5: force(code)
  6: withVisible(code)
  7: rstan::stan_model(file = "data-raw/simtestreg.stan")
  8: cxxfunctionplus(signature(), body = paste(" return Rcpp::wrap(\"", model_name, "\");", 
         sep = ""), includes = inc, plugin = "rstan", save_dso = save_dso | auto_write, 
         module_name = paste("stan_fit4", model_cppname, "_mod", sep = ""), verbose = verbose)
  9: cxxfunction(sig = sig, body = body, plugin = plugin, includes = includes, settings = settings, 
         ..., verbose = verbose)
  10: compileCode(f, code, language = language, verbose = verbose)
  11: stop(paste("Compilation ERROR, function(s)/method(s) not created!", paste(errmsg, 
         collapse = "\n")))
  
  ── 5. Error: simulate_data returns correct output (@test-stansim_simulate.R#135)
  Compilation ERROR, function(s)/method(s) not created! In file included from /tmp/Rtmpppa4wP/RLIBS_52b74de540c/BH/include/boost/config.hpp:39:0,
                   from /tmp/Rtmpppa4wP/RLIBS_52b74de540c/BH/include/boost/math/tools/config.hpp:13,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core/var.hpp:7,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core/gevv_vvv_vari.hpp:5,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core.hpp:12,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c78354b5c.cpp:8:
  /tmp/Rtmpppa4wP/RLIBS_52b74de540c/BH/include/boost/config/compiler/gcc.hpp:186:0: warning: "BOOST_NO_CXX11_RVALUE_REFERENCES" redefined
   #  define BOOST_NO_CXX11_RVALUE_REFERENCES
   ^
  <command-line>:0:0: note: this is the location of the previous definition
  In file included from /usr/include/sys/ucontext.h:20:0,
                   from /usr/include/sys/signal.h:231,
                   from /usr/include/sys/procset.h:23,
                   from /usr/include/sys/wait.h:25,
                   from /usr/include/stdlib.h:21,
                   from /opt/csw/include/c++/5.2.0/cstdlib:72,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/memory/stack_alloc.hpp:8,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core/autodiffstackstorage.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c78354b5c.cpp:8:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:97:24: error: expected nested-name-specifier before numeric constant
       template <typename FS, typename F, typename T0, typename T1>
                          ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:97:24: error: expected ‘>’ before numeric constant
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:100:7: error: expected unqualified-id before numeric constant
         FS fs_;
         ^
  In file included from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_solver.hpp:4:0,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:55,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c78354b5c.cpp:8:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:106:28: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
         hybrj_functor_solver(const FS& fs,
                              ^
  In file included from /usr/include/sys/ucontext.h:20:0,
                   from /usr/include/sys/signal.h:231,
                   from /usr/include/sys/procset.h:23,
                   from /usr/include/sys/wait.h:25,
                   from /usr/include/stdlib.h:21,
                   from /opt/csw/include/c++/5.2.0/cstdlib:72,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/memory/stack_alloc.hpp:8,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core/autodiffstackstorage.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/core.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c78354b5c.cpp:8:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:106:34: error: expected ‘,’ or ‘...’ before numeric constant
         hybrj_functor_solver(const FS& fs,
                                    ^
  In file included from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_solver.hpp:4:0,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat.hpp:55,
                   from /home/ripley/R/Lib32/StanHeaders/include/stan/math.hpp:4,
                   from /home/ripley/R/Lib32/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file655c78354b5c.cpp:8:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp: In constructor ‘stan::math::hybrj_functor_solver<<anonymous> >::hybrj_functor_solver(int)’:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:11: error: class ‘stan::math::hybrj_functor_solver<<anonymous> >’ does not have any field named ‘fs_’
           : fs_(f, x, y, dat, dat_int, msgs),
             ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:15: error: ‘f’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                 ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:18: error: ‘x’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                    ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:21: error: ‘y’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                       ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:24: error: ‘dat’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                          ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:29: error: ‘dat_int’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                               ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:113:38: error: ‘msgs’ was not declared in this scope
           : fs_(f, x, y, dat, dat_int, msgs),
                                        ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp: In member function ‘int stan::math::hybrj_functor_solver<<anonymous> >::operator()(const VectorXd&, Eigen::VectorXd&)’:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:124:18: error: ‘fs_’ was not declared in this scope
           jacobian(fs_, iv, fvec, J_);
                    ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp: In member function ‘Eigen::MatrixXd stan::math::hybrj_functor_solver<<anonymous> >::get_jacobian(const VectorXd&)’:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:147:18: error: ‘fs_’ was not declared in this scope
           jacobian(fs_, iv, fvec, J_);
                    ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp: In member function ‘Eigen::VectorXd stan::math::hybrj_functor_solver<<anonymous> >::get_value(const VectorXd&) const’:
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:158:22: error: there are no arguments to ‘fs_’ that depend on a template parameter, so a declaration of ‘fs_’ must be available [-fpermissive]
           return fs_(iv);
                        ^
  /home/ripley/R/Lib32/StanHeaders/include/stan/math/rev/mat/functor/algebra_system.hpp:158:22: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
  In file included from /usr/include/sys/ucontext.h:20:0,
                   from /usr/incl
  1: capture_output(output1 <- simulate_data(file = "data-raw/simtestreg.stan", data_name = "test data", 
         input_data = reg_data, vars = c("sim_x", "sim_y", "N"), path = "testdir", param_values = test_vals, 
         nsim = 5)) at testthat/test-stansim_simulate.R:135
  2: capture_output_lines(code, print, width = width)
  3: eval_with_output(code, print = print, width = width)
  4: withr::with_output_sink(temp, withVisible(code))
  5: force(code)
  6: withVisible(code)
  7: simulate_data(file = "data-raw/simtestreg.stan", data_name = "test data", input_data = reg_data, 
         vars = c("sim_x", "sim_y", "N"), path = "testdir", param_values = test_vals, 
         nsim = 5)
  8: rstan::stan_model(file = file)
  9: cxxfunctionplus(signature(), body = paste(" return Rcpp::wrap(\"", model_name, "\");", 
         sep = ""), includes = inc, plugin = "rstan", save_dso = save_dso | auto_write, 
         module_name = paste("stan_fit4", model_cppname, "_mod", sep = ""), verbose = verbose)
  10: cxxfunction(sig = sig, body = body, plugin = plugin, includes = includes, settings = settings, 
         ..., verbose = verbose)
  11: compileCode(f, code, language = language, verbose = verbose)
  12: stop(paste("Compilation ERROR, function(s)/method(s) not created!", paste(errmsg, 
         collapse = "\n")))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 1067 SKIPPED: 0 FAILED: 5
  1. Error: single_sim testing with stansim_data input (@test-single_sim.R#426) 
  2. Error: stansim test with stansim_data object; cache FALSE, loo FALSE (@test-stansim_external_functions.R#805) 
  3. Error: stansim test with stansim_data object; cache TRUE, loo FALSE (@test-stansim_external_functions.R#994) 
  4. Error: (unknown) (@test-stansim_simulate-utilities.R#4) 
  5. Error: simulate_data returns correct output (@test-stansim_simulate.R#135) 
  
  Error: testthat unit tests failed
  Execution halted