I am trying to install an R package with the following command:
devtools::install_github('ococrook/bandle)
However, I keep running into compiler issues. When I run the command I get many, many errors. For example this error related to BH:
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -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) <= 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<long double, boost::math::policies::policy<detail::forwarding_arg1, detail::forwarding_arg2>>' requested here
temme_ik(u, x, &Ku, &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<long double, boost::math::policies::policy<detail::forwarding_arg1, detail::forwarding_arg2>>' requested here
bessel_ik(v, x, &I, &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<long double, boost::math::policies::policy<detail::forwarding_arg1, detail::forwarding_arg2>>' requested here
return cyl_bessel_k_imp(v, x, bessel_no_int_tag(), pol);
^
Or this error related to RcppArmadillo:
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -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);
So far I have tried this , and this , and this , and this . However, so far, none of these solutions have worked and I am running out of ideas on how to solve this.
Any help would be greatly appreciated, Thanks!
Try following the instructions here and change the default timeout to ensure the relatively large "pRolocdata" package is downloaded completely, ie
options(timeout = 600)
devtools::install_github('ococrook/bandle')
Using this approach, Bandle installed with a bunch of warnings but without error on my system.
sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.6
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
locale:
[1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
loaded via a namespace (and not attached):
[1] compiler_4.1.1 tools_4.1.1
My ~/.R/Makevars file:
LOC = /usr/local/gfortran
CC=$(LOC)/bin/gcc -fopenmp
CXX=$(LOC)/bin/g++ -fopenmp
CXX11 = $(LOC)/bin/g++ -fopenmp
CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe
CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe
LDFLAGS=-L$(LOC)/lib -Wl,-rpath,$(LOC)/lib
CPPFLAGS=-I$(LOC)/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
FLIBS=-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin19/10.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
CXX1X=/usr/local/gfortran/bin/g++
CXX98=/usr/local/gfortran/bin/g++
CXX11=/usr/local/gfortran/bin/g++
CXX14=/usr/local/gfortran/bin/g++
CXX17=/usr/local/gfortran/bin/g++
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.