title: MacOS Big Sur x86_64 complier error during R devtool install
body: <p>I am trying to install an R package with the following command:</p>
  <pre><code>devtools::install_github('ococrook/bandle)
  </code></pre>
  <p>However, I keep running into compiler issues. When I run the command I get many, many errors. For example this error related to BH:</p>
  <pre class="lang-R prettyprint-override"><code>clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I&quot;/Library/Frameworks/R.framework/Resources/include&quot; -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/BH/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include    -fPIC  -Wall -g -O2  -Wall -pedantic -fdiagnostics-color=always -c Bessel2ndKind.cpp -o Bessel2ndKind.o
     In file included from Bessel2ndKind.cpp:1:
     In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include/RcppArmadillo.h:34:
     In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:59:
     In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp/exceptions_impl.h:38:
     In file included from /usr/local/include/execinfo.h:28:
     /usr/local/include/os/base.h:274:37: warning: type nullability specifier '_Nullable' is a Clang extension [-Wnullability-extension]
     typedef void (*os_function_t)(void *_Nullable);
                                         ^
     Bessel2ndKind.cpp:621:55: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign]
                                                nk, tau, D = D, j + 1, nu).t();
                                                         ~ ^ ~
     Bessel2ndKind.cpp:774:49: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign]
                                          nk, tau, D = D, j + 1).t();
                                                   ~ ^ ~
     In file included from Bessel2ndKind.cpp:2:
     In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/BH/include/boost/math/special_functions/bessel.hpp:24:
     /Library/Frameworks/R.framework/Versions/4.1/Resources/library/BH/include/boost/math/special_functions/detail/bessel_ik.hpp:97:18: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]
         BOOST_ASSERT(abs(x) &lt;= 2);
                      ^
     /Library/Frameworks/R.framework/Versions/4.1/Resources/library/BH/include/boost/math/special_functions/detail/bessel_ik.hpp:366:9: note: in instantiation of function template specialization 'boost::math::detail::temme_ik&lt;long double, boost::math::policies::policy&lt;detail::forwarding_arg1, detail::forwarding_arg2&gt;&gt;' requested here
             temme_ik(u, x, &amp;Ku, &amp;Ku1, pol);             // Temme series
             ^
     /Library/Frameworks/R.framework/Versions/4.1/Resources/library/BH/include/boost/math/special_functions/bessel.hpp:246:4: note: in instantiation of function template specialization 'boost::math::detail::bessel_ik&lt;long double, boost::math::policies::policy&lt;detail::forwarding_arg1, detail::forwarding_arg2&gt;&gt;' requested here
        bessel_ik(v, x, &amp;I, &amp;K, need_k, pol);
        ^
     /Library/Frameworks/R.framework/Versions/4.1/Resources/library/BH/include/boost/math/special_functions/bessel.hpp:258:11: note: in instantiation of function template specialization 'boost::math::detail::cyl_bessel_k_imp&lt;long double, boost::math::policies::policy&lt;detail::forwarding_arg1, detail::forwarding_arg2&gt;&gt;' requested here
        return cyl_bessel_k_imp(v, x, bessel_no_int_tag(), pol);
               ^
  </code></pre>
  <p>Or this error related to RcppArmadillo:</p>
  <pre class="lang-R prettyprint-override"><code>clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I&quot;/Library/Frameworks/R.framework/Resources/include&quot; -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/BH/include' -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include    -fPIC  -Wall -g -O2  -Wall -pedantic -fdiagnostics-color=always -c leapfrogGPcpp.cpp -o leapfrogGPcpp.o
     In file included from leapfrogGPcpp.cpp:1:
     In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include/RcppArmadillo.h:34:
     In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:59:
     In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp/exceptions_impl.h:38:
     In file included from /usr/local/include/execinfo.h:28:
     /usr/local/include/os/base.h:274:37: warning: type nullability specifier '_Nullable' is a Clang extension [-Wnullability-extension]
     typedef void (*os_function_t)(void *_Nullable);
                                         ^
     In file included from leapfrogGPcpp.cpp:1:
     In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include/RcppArmadillo.h:31:
     In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:49:
     In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include/armadillo:646:
     /Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include/armadillo_bits/op_inv_meat.hpp:200:28: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]
         const  T abs_det_val = std::abs(det_val);
  </code></pre>
  <p>So far I have tried <a href="https://stackoverflow.com/questions/66359031/install-with-devtoolsinstall-github-fails-to-detect-build-tools">this</a>, and <a href="https://stackoverflow.com/questions/29992066/rcpp-warning-directory-not-found-for-option-l-usr-local-cellar-gfortran-4-8?noredirect=1&amp;lq=1">this</a>, and <a href="https://stackoverflow.com/questions/68168291/macos-big-sur-m1-silicon-cmath-error-during-r-devtool-monocle3-install">this</a>, and <a href="https://medium.com/biosyntax/following-up-library-dependency-when-compiling-r-packages-89f191b9f227" rel="nofollow noreferrer">this</a>. However, so far, none of these solutions have worked and I am running out of ideas on how to solve this.</p>
  <p>Any help would be greatly appreciated,
  Thanks!</p>