在MacOS Monterey更新Xcode和rstudio之后,无法源
我犯了一个“错误”,以更新我的Macos Monterey Intel中的几件事,现在我无法像以前使用RCPP那样采购任何CPP文件。
我试图了解其他人如何解决类似问题,但是我的问题似乎仍然存在。
您可以找到错误消息,这可能有助于我指出可能的解决方案:
In file included from file1851d7b0603f9.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/RcppCommon.h:30:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp/r/headers.h:62:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:100:
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:642:26: error: no template named 'numeric_limits'
bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:642:60: error: no template named 'numeric_limits'
bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:643:18: error: no template named 'numeric_limits'
int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:643:50: error: no template named 'numeric_limits'
int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:648:17: error: no template named 'numeric_limits'
static_assert(numeric_limits<_FloatT>::radix == 2, "FloatT has incorrect radix");
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:651:25: error: no template named 'numeric_limits'
return _FloatBigger ? numeric_limits<_IntT>::max() : (numeric_limits<_IntT>::max() >> _Bits << _Bits);
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:651:58: error: no template named 'numeric_limits'
return _FloatBigger ? numeric_limits<_IntT>::max() : (numeric_limits<_IntT>::max() >> _Bits << _Bits);
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:661:16: error: no template named 'numeric_limits'
using _Lim = numeric_limits<_IntT>;
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:664:12: error: use of undeclared identifier '_Lim'
return _Lim::max();
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:665:21: error: use of undeclared identifier '_Lim'
} else if (__r <= _Lim::lowest()) {
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:666:12: error: use of undeclared identifier '_Lim'
return _Lim::min();
^
In file included from file1851d7b0603f9.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/RcppCommon.h:30:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp/r/headers.h:62:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:153:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/unordered_map:437:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__hash_table:16:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/algorithm:653:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/functional:490:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__algorithm/search.h:15:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__iterator/iterator_traits.h:14:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__iterator/incrementable_traits.h:14:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/concepts:134:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__functional_base:22:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/exception:83:
/usr/local/opt/llvm/bin/../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;
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:338:1: note: conflicting declaration
using ::abs _LIBCPP_USING_IF_EXISTS;
^
In file included from file1851d7b0603f9.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/RcppCommon.h:65:
/usr/local/opt/llvm/bin/../include/c++/v1/complex:853:1: error: declaration conflicts with target of using declaration already in scope
abs(const complex<_Tp>& __c)
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:338:1: note: target of using declaration
using ::abs _LIBCPP_USING_IF_EXISTS;
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:338:9: note: using declaration
using ::abs _LIBCPP_USING_IF_EXISTS;
^
In file included from file1851d7b0603f9.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/RcppCommon.h:65:
/usr/local/opt/llvm/bin/../include/c++/v1/complex:910:16: error: reference to unresolved using declaration
return abs(__c.real());
^
/usr/local/opt/llvm/bin/../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 file1851d7b0603f9.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/RcppCommon.h:65:
/usr/local/opt/llvm/bin/../include/c++/v1/complex:912:16: error: reference to unresolved using declaration
return abs(__c.imag());
^
/usr/local/opt/llvm/bin/../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 file1851d7b0603f9.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/RcppCommon.h:65:
/usr/local/opt/llvm/bin/../include/c++/v1/complex:969:16: error: reference to unresolved using declaration
__re = abs(__re);
^
/usr/local/opt/llvm/bin/../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 file1851d7b0603f9.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/RcppCommon.h:65:
/usr/local/opt/llvm/bin/../include/c++/v1/complex:1022:29: error: reference to unresolved using declaration
return complex<_Tp>(log(abs(__x)), arg(__x));
^
/usr/local/opt/llvm/bin/../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 file1851d7b0603f9.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/RcppCommon.h:65:
/usr/local/opt/llvm/bin/../include/c++/v1/complex:1049:23: error: reference to unresolved using declaration
return polar(sqrt(abs(__x)), arg(__x) / _Tp(2));
^
/usr/local/opt/llvm/bin/../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 file1851d7b0603f9.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/RcppCommon.h:65:
/usr/local/opt/llvm/bin/../include/c++/v1/complex:1174:33: error: reference to unresolved using declaration
return complex<_Tp>(abs(__x.real()), __x.imag());
^
/usr/local/opt/llvm/bin/../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: *** [file1851d7b0603f9.o] Error 1
/usr/local/opt/llvm/bin/clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include" -I"/private/var/folders/pq/hxwd9my563q_qpy4rbrlgkmw0000gn/T/RtmpYPQ7or/sourceCpp-x86_64-apple-darwin17.0-1.0.8.3" -I/usr/local/include -fPIC -I/usr/local/opt/llvm/include -c file1851d7b0603f9.cpp -o file1851d7b0603f9.o
Error in sourceCpp(code = code, env = env, rebuild = rebuild, cacheDir = cacheDir, :
Error 1 occurred building shared library.
I have made the 'mistake' to update few things in my MacOS Monterey Intel-based and now I cannot source any cpp file as I used to do with Rcpp.
I tried to understand how others have resolved similar issues, but my problem seem to still remain.
Below you can find the error message, which perhaps may help to point me out to the possible solution:
In file included from file1851d7b0603f9.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/RcppCommon.h:30:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp/r/headers.h:62:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:100:
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:642:26: error: no template named 'numeric_limits'
bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:642:60: error: no template named 'numeric_limits'
bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:643:18: error: no template named 'numeric_limits'
int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:643:50: error: no template named 'numeric_limits'
int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:648:17: error: no template named 'numeric_limits'
static_assert(numeric_limits<_FloatT>::radix == 2, "FloatT has incorrect radix");
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:651:25: error: no template named 'numeric_limits'
return _FloatBigger ? numeric_limits<_IntT>::max() : (numeric_limits<_IntT>::max() >> _Bits << _Bits);
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:651:58: error: no template named 'numeric_limits'
return _FloatBigger ? numeric_limits<_IntT>::max() : (numeric_limits<_IntT>::max() >> _Bits << _Bits);
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:661:16: error: no template named 'numeric_limits'
using _Lim = numeric_limits<_IntT>;
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:664:12: error: use of undeclared identifier '_Lim'
return _Lim::max();
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:665:21: error: use of undeclared identifier '_Lim'
} else if (__r <= _Lim::lowest()) {
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:666:12: error: use of undeclared identifier '_Lim'
return _Lim::min();
^
In file included from file1851d7b0603f9.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/RcppCommon.h:30:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp/r/headers.h:62:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:153:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/unordered_map:437:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__hash_table:16:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/algorithm:653:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/functional:490:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__algorithm/search.h:15:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__iterator/iterator_traits.h:14:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__iterator/incrementable_traits.h:14:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/concepts:134:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__functional_base:22:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/exception:83:
/usr/local/opt/llvm/bin/../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;
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:338:1: note: conflicting declaration
using ::abs _LIBCPP_USING_IF_EXISTS;
^
In file included from file1851d7b0603f9.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/RcppCommon.h:65:
/usr/local/opt/llvm/bin/../include/c++/v1/complex:853:1: error: declaration conflicts with target of using declaration already in scope
abs(const complex<_Tp>& __c)
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:338:1: note: target of using declaration
using ::abs _LIBCPP_USING_IF_EXISTS;
^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:338:9: note: using declaration
using ::abs _LIBCPP_USING_IF_EXISTS;
^
In file included from file1851d7b0603f9.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/RcppCommon.h:65:
/usr/local/opt/llvm/bin/../include/c++/v1/complex:910:16: error: reference to unresolved using declaration
return abs(__c.real());
^
/usr/local/opt/llvm/bin/../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 file1851d7b0603f9.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/RcppCommon.h:65:
/usr/local/opt/llvm/bin/../include/c++/v1/complex:912:16: error: reference to unresolved using declaration
return abs(__c.imag());
^
/usr/local/opt/llvm/bin/../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 file1851d7b0603f9.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/RcppCommon.h:65:
/usr/local/opt/llvm/bin/../include/c++/v1/complex:969:16: error: reference to unresolved using declaration
__re = abs(__re);
^
/usr/local/opt/llvm/bin/../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 file1851d7b0603f9.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/RcppCommon.h:65:
/usr/local/opt/llvm/bin/../include/c++/v1/complex:1022:29: error: reference to unresolved using declaration
return complex<_Tp>(log(abs(__x)), arg(__x));
^
/usr/local/opt/llvm/bin/../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 file1851d7b0603f9.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/RcppCommon.h:65:
/usr/local/opt/llvm/bin/../include/c++/v1/complex:1049:23: error: reference to unresolved using declaration
return polar(sqrt(abs(__x)), arg(__x) / _Tp(2));
^
/usr/local/opt/llvm/bin/../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 file1851d7b0603f9.cpp:1:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp.h:27:
In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/RcppCommon.h:65:
/usr/local/opt/llvm/bin/../include/c++/v1/complex:1174:33: error: reference to unresolved using declaration
return complex<_Tp>(abs(__x.real()), __x.imag());
^
/usr/local/opt/llvm/bin/../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: *** [file1851d7b0603f9.o] Error 1
/usr/local/opt/llvm/bin/clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include" -I"/private/var/folders/pq/hxwd9my563q_qpy4rbrlgkmw0000gn/T/RtmpYPQ7or/sourceCpp-x86_64-apple-darwin17.0-1.0.8.3" -I/usr/local/include -fPIC -I/usr/local/opt/llvm/include -c file1851d7b0603f9.cpp -o file1851d7b0603f9.o
Error in sourceCpp(code = code, env = env, rebuild = rebuild, cacheDir = cacheDir, :
Error 1 occurred building shared library.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论