-
Notifications
You must be signed in to change notification settings - Fork 56
Description
Hi. I have an issue when installing RcppArmadillo on my computer (macOS Monterey). I want to install a package from github and it requires installing RcppArmadillo. I did install with install.package("RcppArmadillo") and call its library but when I install the package from github, tonnes of warnings show up. Here are the warnings.
install_github("config-i1/smooth")
Downloading GitHub repo config-i1/smooth@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?1: All
2: CRAN packages only
3: None
4: nloptr (2.0.0 -> 2.0.1) [CRAN]Enter one or more numbers, or an empty line to skip updates:
✔ checking for file ‘/private/var/folders/fh/h16m_j410rjc0vltls1lx7qr0000gn/T/Rtmpf9Q5Zu/remotes23440f1033f/config-i1-smooth-a747588/DESCRIPTION’ ...
─ preparing ‘smooth’:
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘smooth_3.1.7.41007.tar.gz’
- installing source package ‘smooth’ ...
** using staged installation
** libs
clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include -I/usr/local/include -Xclang -fopenmp -fPIC -falign-functions=64 -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include/RcppCommon.h:30:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include/Rcpp/r/headers.h:62:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:100:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cmath:642:26: error: no template named 'numeric_limits'
bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cmath:642:60: error: no template named 'numeric_limits'
bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cmath:643:18: error: no template named 'numeric_limits'
int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cmath:643:50: error: no template named 'numeric_limits'
int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cmath:648:17: error: no template named 'numeric_limits'
static_assert(numeric_limits<_FloatT>::radix == 2, "FloatT has incorrect radix");
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cmath:651:25: error: no template named 'numeric_limits'
return _FloatBigger ? numeric_limits<_IntT>::max() : (numeric_limits<_IntT>::max() >> _Bits << _Bits);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cmath:651:58: error: no template named 'numeric_limits'
return _FloatBigger ? numeric_limits<_IntT>::max() : (numeric_limits<_IntT>::max() >> _Bits << _Bits);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cmath:645:25: error: no return statement in constexpr function
_LIBCPP_CONSTEXPR _IntT __max_representable_int_for_float() _NOEXCEPT {
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cmath:661:16: error: no template named 'numeric_limits'
using _Lim = numeric_limits<_IntT>;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cmath:664:12: error: use of undeclared identifier '_Lim'
return _Lim::max();
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cmath:665:21: error: use of undeclared identifier '_Lim'
} else if (__r <= _Lim::lowest()) {
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cmath:666:12: error: use of undeclared identifier '_Lim'
return _Lim::min();
^
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include/RcppCommon.h:30:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include/Rcpp/r/headers.h:62:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:153:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/unordered_map:437:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__hash_table:16:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/algorithm:653:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/functional:490:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__algorithm/search.h:15:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__iterator/iterator_traits.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__iterator/incrementable_traits.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/concepts:134:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__functional_base:22:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/exception:83:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cstdlib:138:9: error: target of using declaration conflicts with declaration already in scope
using ::abs _LIBCPP_USING_IF_EXISTS;
^
/usr/local/include/stdlib.h:132:6: note: target of using declaration
int abs(int) __pure2;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cmath:338:1: note: conflicting declaration
using ::abs _LIBCPP_USING_IF_EXISTS;
^
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include/RcppCommon.h:65:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/complex:853:1: error: declaration conflicts with target of using declaration already in scope
abs(const complex<_Tp>& __c)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cmath:338:1: note: target of using declaration
using ::abs _LIBCPP_USING_IF_EXISTS;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cmath:338:9: note: using declaration
using ::abs _LIBCPP_USING_IF_EXISTS;
^
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include/RcppCommon.h:65:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/complex:910:16: error: reference to unresolved using declaration
return abs(__c.real());
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cmath:338:1: note: using declaration annotated with 'using_if_exists' here
using ::abs _LIBCPP_USING_IF_EXISTS;
^
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include/RcppCommon.h:65:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/complex:912:16: error: reference to unresolved using declaration
return abs(__c.imag());
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cmath:338:1: note: using declaration annotated with 'using_if_exists' here
using ::abs _LIBCPP_USING_IF_EXISTS;
^
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include/RcppCommon.h:65:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/complex:969:16: error: reference to unresolved using declaration
__re = abs(__re);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cmath:338:1: note: using declaration annotated with 'using_if_exists' here
using ::abs _LIBCPP_USING_IF_EXISTS;
^
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include/RcppCommon.h:65:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/complex:1022:29: error: reference to unresolved using declaration
return complex<_Tp>(log(abs(__x)), arg(__x));
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cmath:338:1: note: using declaration annotated with 'using_if_exists' here
using ::abs _LIBCPP_USING_IF_EXISTS;
^
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include/RcppCommon.h:65:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/complex:1049:23: error: reference to unresolved using declaration
return polar(sqrt(abs(__x)), arg(__x) / _Tp(2));
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/cmath:338:1: note: using declaration annotated with 'using_if_exists' here
using ::abs _LIBCPP_USING_IF_EXISTS;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘smooth’- removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/smooth’
- restoring previous ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/smooth’
Warning message:
In i.p(...) :
installation of package ‘/var/folders/fh/h16m_j410rjc0vltls1lx7qr0000gn/T//Rtmpf9Q5Zu/file234f0c3e68/smooth_3.1.7.41007.tar.gz’ had non-zero exit status
I have tried this suggestion (https://thecoatlessprofessor.com/programming/cpp/r-compiler-tools-for-rcpp-on-macos/), but no avail. I installed and reinstalled xcode (IDE or command line tools), and it still didn't work. However, when I execute a simple helloworld.rcpp, it works.
First, I am not sure what are the problems - I do not and cannot understand the warnings, to be honest. So, can you pinpoint the main issue of my problem? Secondly, if you know what is the main problem, could you please let me know how to solve this?
Thank you very much, your help is much appreciated.