Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New version of BH breaks Hector R package build #768

Open
kdorheim opened this issue Feb 21, 2025 · 1 comment
Open

New version of BH breaks Hector R package build #768

kdorheim opened this issue Feb 21, 2025 · 1 comment

Comments

@kdorheim
Copy link
Contributor

BH 1.87.0-1 causes the Hector build to fail locally and is partially responsible for the failing CI tests 😒

> library(BH)
> packageVersion("BH")
[1] β€˜1.87.0.1’

> devtools::build()
── R CMD build ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
βœ”  checking for file β€˜/Users/dorh012/Documents/Hector-WD/hector/DESCRIPTION’ ...
─  preparing β€˜hector’: (1.7s)
βœ”  checking DESCRIPTION meta-information ...
─  cleaning src
─  installing the package to build vignettes
         -----------------------------------
─  installing *source* package β€˜hector’ ...
   ** using staged installation
   ** libs
   using C compiler: β€˜Apple clang version 16.0.0 (clang-1600.0.26.6)’
   using C++ compiler: β€˜Apple clang version 16.0.0 (clang-1600.0.26.6)’
   using C++11
   using SDK: β€˜β€™
   clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -DUSE_RCPP -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -Wall -pedantic -fdiagnostics-color=always -c INIReader.cpp -o INIReader.o
   clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -DUSE_RCPP -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -Wall -pedantic -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o
   clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -DUSE_RCPP -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -Wall -pedantic -fdiagnostics-color=always -c bc_component.cpp -o bc_component.o
   clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -DUSE_RCPP -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -Wall -pedantic -fdiagnostics-color=always -c carbon-cycle-model.cpp -o carbon-cycle-model.o
   clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -DUSE_RCPP -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include' -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -Wall -pedantic -fdiagnostics-color=always -c carbon-cycle-solver.cpp -o carbon-cycle-solver.o
   In file included from carbon-cycle-solver.cpp:23:
   In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint.hpp:27:
   In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/euler.hpp:23:
   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp:165:42: error: 'auto' not allowed in lambda parameter
     165 |         m_resizer.adjust_size(in, [this](auto&& arg) { return this->resize_impl<StateIn>(std::forward<decltype(arg)>(arg)); });
         |                                          ^~~~
   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp:228:41: error: 'auto' not allowed in lambda parameter
     228 |         m_resizer.adjust_size(x, [this](auto&& arg) { return this->resize_impl<StateInOut>(std::forward<decltype(arg)>(arg)); });
         |                                         ^~~~
   In file included from carbon-cycle-solver.cpp:23:
   In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint.hpp:28:
   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/runge_kutta4_classic.hpp:94:42: error: 'auto' not allowed in lambda parameter
      94 |         m_resizer.adjust_size(in, [this](auto&& arg) { return this->resize_impl<StateIn>(std::forward<decltype(arg)>(arg)); });
         |                                          ^~~~
   In file included from carbon-cycle-solver.cpp:23:
   In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint.hpp:29:
   In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/runge_kutta4.hpp:27:
   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/explicit_generic_rk.hpp:149:42: error: 'auto' not allowed in lambda parameter
     149 |         m_resizer.adjust_size(in, [this](auto&& arg) { return this->resize_impl<StateIn>(std::forward<decltype(arg)>(arg)); });
         |                                          ^~~~
   In file included from carbon-cycle-solver.cpp:23:
   In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint.hpp:30:
   In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/runge_kutta_cash_karp54.hpp:24:
   In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/explicit_error_generic_rk.hpp:22:
   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/base/explicit_error_stepper_base.hpp:182:42: error: 'auto' not allowed in lambda parameter
     182 |         m_resizer.adjust_size(in, [this](auto&& arg) { return this->resize_impl<StateIn>(std::forward<decltype(arg)>(arg)); });
         |                                          ^~~~
   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/base/explicit_error_stepper_base.hpp:261:42: error: 'auto' not allowed in lambda parameter
     261 |         m_resizer.adjust_size(in, [this](auto&& arg) { return this->resize_impl<StateIn>(std::forward<decltype(arg)>(arg)); });
         |                                          ^~~~
   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/base/explicit_error_stepper_base.hpp:292:41: error: 'auto' not allowed in lambda parameter
     292 |         m_resizer.adjust_size(x, [this](auto&& arg) { return this->resize_impl<StateInOut>(std::forward<decltype(arg)>(arg)); });
         |                                         ^~~~
   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/base/explicit_error_stepper_base.hpp:301:41: error: 'auto' not allowed in lambda parameter
     301 |         m_resizer.adjust_size(x, [this](auto&& arg) { return this->resize_impl<StateInOut>(std::forward<decltype(arg)>(arg)); });
         |                                         ^~~~
   In file included from carbon-cycle-solver.cpp:23:
   In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint.hpp:30:
   In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/runge_kutta_cash_karp54.hpp:24:
   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/explicit_error_generic_rk.hpp:132:42: error: 'auto' not allowed in lambda parameter
     132 |         m_resizer.adjust_size(in, [this](auto&& arg) { return this->resize_impl<StateIn>(std::forward<decltype(arg)>(arg)); });
         |                                          ^~~~
   In file included from carbon-cycle-solver.cpp:23:
   In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint.hpp:31:
   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/runge_kutta_cash_karp54_classic.hpp:148:42: error: 'auto' not allowed in lambda parameter
     148 |         m_resizer.adjust_size(in, [this](auto&& arg) { return this->resize_impl<StateIn>(std::forward<decltype(arg)>(arg)); });
         |                                          ^~~~
   In file included from carbon-cycle-solver.cpp:23:
   In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint.hpp:32:
   In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/runge_kutta_dopri5.hpp:25:
   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/base/explicit_error_stepper_fsal_base.hpp:180:46: error: 'auto' not allowed in lambda parameter
     180 |         if( m_resizer.adjust_size(in, [this](auto&& arg) { return this->resize_impl<StateIn>(std::forward<decltype(arg)>(arg)); }) || m_first_call )
         |                                              ^~~~
   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/base/explicit_error_stepper_fsal_base.hpp:254:46: error: 'auto' not allowed in lambda parameter
     254 |         if( m_resizer.adjust_size(in, [this](auto&& arg) { return this->resize_impl<StateIn>(std::forward<decltype(arg)>(arg)); }) || m_first_call )
         |                                              ^~~~
   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/base/explicit_error_stepper_fsal_base.hpp:313:45: error: 'auto' not allowed in lambda parameter
     313 |         if( m_resizer.adjust_size(x, [this](auto&& arg) { return this->resize_impl<StateInOut>(std::forward<decltype(arg)>(arg)); }) || m_first_call )
         |                                             ^~~~
   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/base/explicit_error_stepper_fsal_base.hpp:323:45: error: 'auto' not allowed in lambda parameter
     323 |         if( m_resizer.adjust_size(x, [this](auto&& arg) { return this->resize_impl<StateInOut>(std::forward<decltype(arg)>(arg)); }) || m_first_call )
         |                                             ^~~~
   In file included from carbon-cycle-solver.cpp:23:
   In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint.hpp:32:
   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/runge_kutta_dopri5.hpp:128:50: error: 'auto' not allowed in lambda parameter
     128 |         m_k_x_tmp_resizer.adjust_size(in, [this](auto&& arg) { return this->resize_k_x_tmp_impl<StateIn>(std::forward<decltype(arg)>(arg)); });
         |                                                  ^~~~
   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/runge_kutta_dopri5.hpp:182:55: error: 'auto' not allowed in lambda parameter
     182 |             m_dxdt_tmp_resizer.adjust_size(in, [this](auto&& arg) { return this->resize_dxdt_tmp_impl<StateIn>(std::forward<decltype(arg)>(arg)); });
         |                                                       ^~~~
   In file included from carbon-cycle-solver.cpp:23:
   In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint.hpp:35:
   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/controlled_runge_kutta.hpp:340:46: error: 'auto' not allowed in lambda parameter
     340 |         m_xnew_resizer.adjust_size(x, [this](auto&& arg) { return this->resize_m_xnew_impl<StateInOut>(std::forward<decltype(arg)>(arg)); });
         |                                              ^~~~
   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/controlled_runge_kutta.hpp:381:47: error: 'auto' not allowed in lambda parameter
     381 |         m_dxdt_resizer.adjust_size(in, [this](auto&& arg) { return this->resize_m_dxdt_impl<StateIn>(std::forward<decltype(arg)>(arg)); });
         |                                               ^~~~
   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/BH/include/boost/numeric/odeint/stepper/controlled_runge_kutta.hpp:422:47: error: 'auto' not allowed in lambda parameter
     422 |         m_xerr_resizer.adjust_size(in, [this](auto&& arg) { return this->resize_m_xerr_impl<StateIn>(std::forward<decltype(arg)>(arg)); });
         |                                               ^~~~
   fatal error: too many errors emitted, stopping now [-ferror-limit=]
   20 errors generated.
   make: *** [carbon-cycle-solver.o] Error 1
   ERROR: compilation failed for package β€˜hector’
─  removing β€˜/private/var/folders/_y/tftrxl2d0h1962g9ct_ccvwc0000gn/T/RtmpFqZjhx/Rinst15d50403a14a5/hector’
         -----------------------------------
   ERROR: package installation failed
Error in `(function (command = NULL, args = character(), error_on_status = TRUE, …`:
! System command 'R' failed
---
Exit status: 1
stdout & stderr: <printed>
---
Type .Last.error to see the more details.

Temporary Fixes

  • Revert back to BH 1.84 by running
    remotes::install_version("BH", version = "1.84.0", repos = "http://cran.us.r-project.org/") this works on local machines but I have been struggling with getting it to run on Github Actions

Longer-Term Fixes

  • Make the required changes to the C++ code to be compatible with the BH 1.87, but some things to consider
    • Will this cause issues for the GCAM coupling? We will probably need to check with @pralitp?
  • Is there a way to include a BH <= 1.84.0 requirement?
  • Use package management?
@kdorheim
Copy link
Contributor Author

@bpbond have you run into this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant