Running ‘testthat.R’ [7s/9s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > Sys.setenv("R_TESTS" = "")
  > library(testthat)
  > 
  > test_check("bridgesampling")
  Loading required package: bridgesampling
  Running /Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB foo.c
  using C compiler: ‘Apple clang version 14.0.3 (clang-1403.0.22.14.1)’
  using SDK: ‘NA’
  clang -arch arm64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o foo.so foo.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
  ld: framework not found CoreFoundation
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  make: *** [foo.so] Error 1
  make cmd is
    make -f '/Library/Frameworks/R.framework/Resources/etc/Makeconf' -f '/Library/Frameworks/R.framework/Resources/share/make/shlib.mk' CXX='$(CXX17) $(CXX17STD)' CXXFLAGS='$(CXX17FLAGS)' CXXPICFLAGS='$(CXX17PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX17LDFLAGS)' SHLIB_LD='$(SHLIB_CXX17LD)' SHLIB='file7b9774210f7a.so' OBJECTS='file7b9774210f7a.o'
  
  make would use
  clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I"/Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/Rcpp/include/"  -I"/Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/RcppEigen/include/"  -I"/Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/RcppEigen/include/unsupported"  -I"/Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/BH/include" -I"/Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/StanHeaders/include/src/"  -I"/Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/StanHeaders/include/"  -I"/Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/RcppParallel/include/"  -I"/Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/rstan/include" -DEIGEN_NO_DEBUG  -DBOOST_DISABLE_ASSERTS  -DBOOST_PENDING_INTEGER_LOG2_HPP  -DSTAN_THREADS  -DUSE_STANC3 -DSTRICT_R_HEADERS  -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION  -D_HAS_AUTO_PTR_ETC=0  -include '/Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/StanHeaders/include/stan/math/prim/fun/Eigen.hpp'  -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1   -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2   -c file7b9774210f7a.cpp -o file7b9774210f7a.o
  if test  "zfile7b9774210f7a.o" != "z"; then \
  	  echo clang++ -arch arm64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L"/Library/Frameworks/R.framework/Resources/lib" -L/opt/R/arm64/lib -o file7b9774210f7a.so file7b9774210f7a.o  '/Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/rstan/lib//libStanServices.a' -L'/Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/StanHeaders/lib/' -lStanHeaders -L'/Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/RcppParallel/lib/' -ltbb -L/Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/RcppParallel/lib -ltbb -ltbbmalloc   -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation; \
  	  clang++ -arch arm64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L"/Library/Frameworks/R.framework/Resources/lib" -L/opt/R/arm64/lib -o file7b9774210f7a.so file7b9774210f7a.o  '/Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/rstan/lib//libStanServices.a' -L'/Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/StanHeaders/lib/' -lStanHeaders -L'/Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/RcppParallel/lib/' -ltbb -L/Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/RcppParallel/lib -ltbb -ltbbmalloc   -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation; \
  	fi
  Saving _problems/test-stan_bridge_sampler_basic-59.R
  [ FAIL 2 | WARN 0 | SKIP 19 | PASS 75 ]
  
  ══ Skipped tests (19) ══════════════════════════════════════════════════════════
  • On CRAN (19): 'test-bridge_sampler_CmdStanMCMC.R:4:3',
    'test-bridge_sampler_CmdStanMCMC.R:75:3', 'test-bridge_sampler_Rcpp.R:6:3',
    'test-bridge_sampler_Rcpp_parallel.R:6:3',
    'test-bridge_sampler_mcmc.list.R:6:3', 'test-bridge_sampler_parallel.R:6:3',
    'test-log_posterior_cmdstan.R:4:3', 'test-log_posterior_cmdstan.R:133:3',
    'test-nimble_bridge_sampler.R:5:3', 'test-stan_bridge_sampler_basic.R:113:3',
    'test-stan_bridge_sampler_bugs.R:65:3',
    'test-stan_bridge_sampler_bugs.R:82:3',
    'test-stan_bridge_sampler_bugs.R:126:3',
    'test-stanreg_bridge_sampler_basic.R:6:3',
    'test-stanreg_bridge_sampler_basic.R:26:3',
    'test-vignette_example_jags.R:6:3', 'test-vignette_example_nimble.R:6:3',
    'test-vignette_example_stan.R:6:3', 'test-vignette_stan_ttest.R:6:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-stan_bridge_sampler_basic.R:57:5'): stan_bridge_sampler ────────
  Error in `compileCode(f, code, language = language, verbose = verbose)`: using C++ compiler: ‘Apple clang version 14.0.3 (clang-1403.0.22.14.1)’
  using C++17
  using SDK: ‘NA’
  In file included from <built-in>:1:
  In file included from /Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/StanHeaders/include/stan/math/prim/fun/Eigen.hpp:22:
  In file included from /Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/RcppEigen/include/Eigen/Dense:1:
  In file included from /Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/RcppEigen/include/Eigen/Core:19:
  In file included from /Volumes/Builds/packages/big-sur-arm64/Rlib/4.4/RcppEigen/include/Eigen/src/Core/util/Macros.h:679:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:308:
  /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/math.h:300:15: fatal error: 'math.h' file not found
  #include_next <math.h>
                ^~~~~~~~
  1 error generated.
  make: *** [file7b9774210f7a.o] Error 1
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(stan_model(model_code = stancodeH0, model_name = "stanmodel")) at test-stan_bridge_sampler_basic.R:57:5
   2. │ └─base::withCallingHandlers(...)
   3. └─rstan::stan_model(model_code = stancodeH0, model_name = "stanmodel")
   4.   └─rstan:::cxxfunctionplus(...)
   5.     ├─pkgbuild::with_build_tools(...)
   6.     └─inline::cxxfunction(...)
   7.       └─inline:::compileCode(f, code, language = language, verbose = verbose)
  ── Error ('test-stan_bridge_sampler_basic.R:57:5'): stan_bridge_sampler ────────
  Error in `sink(type = "output")`: invalid connection
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(stan_model(model_code = stancodeH0, model_name = "stanmodel")) at test-stan_bridge_sampler_basic.R:57:5
   2. │ └─base::withCallingHandlers(...)
   3. └─rstan::stan_model(model_code = stancodeH0, model_name = "stanmodel")
   4.   └─rstan:::cxxfunctionplus(...)
   5.     └─base::sink(type = "output")
  
  [ FAIL 2 | WARN 0 | SKIP 19 | PASS 75 ]
  Error:
  ! Test failures.
  Execution halted