大佬教程收集整理的这篇文章主要介绍了MacOS Big Sur M1 芯片,R devtool monocle3 安装过程中出现 cmath 错误,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试使用以下方法在 M1 硅 MacOS Big Sur 11.4 上的 Rstudio(R 版本 4.1.0)中安装 Monocle3 (herE):
devtools::install_github('cole-trapnell-lab/lEIDenbase')
我收到此错误消息,它看起来像是 cmath 标头不起作用。
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/library/Frameworks/R.framework/resources/include" -DNDEBUG -I/usr/local/include -DIGRAPH_THREAD_LOCAL=/**/ -DNDEBUG -I. -Icigraph/src -Icigraph/include -Icigraph/src/prpack -IlEIDenalg/include -DUSING_R -DPRPACK_IGRAPH_SUPPORT -fPIC -Wall -g -O2 -c cigraph/src/DensityGrID.cpp -o cigraph/src/DensityGrID.o
In file included from cigraph/src/DensityGrID.cpp:41:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:321:9: error: no member named 'signbit' in the global namespace
using ::signbit;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:322:9: error: no member named 'fpclassify' in the global namespace
using ::fpclassify;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:323:9: error: no member named 'isfinite' in the global namespace; dID you mean 'finite'?
using ::isfinite;
~~^
/usr/local/include/math.h:752:12: note: 'finite' declared here
extern int finite(doublE)
^
In file included from cigraph/src/DensityGrID.cpp:41:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:324:9: error: no member named 'isinf' in the global namespace
using ::isinf;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:325:9: error: no member named 'isnan' in the global namespace
using ::isnan;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:326:9: error: no member named 'isnormal' in the global namespace
using ::isnormal;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:327:7: error: no member named 'isgreater' in the global namespace; dID you mean '::std::greater'?
using ::isgreater;
^~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/functional:738:29: note: '::std::greater' declared here
struct _liBCPP_TEMPLATE_VIS greater : binary_function<_Tp,_Tp,bool>
^
In file included from cigraph/src/DensityGrID.cpp:41:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:328:7: error: no member named 'isgreaterequal' in the global namespace; dID you mean '::std::greater_equal'?
using ::isgreaterequal;
^~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/functional:767:29: note: '::std::greater_equal' declared here
struct _liBCPP_TEMPLATE_VIS greater_equal : binary_function<_Tp,bool>
^
In file included from cigraph/src/DensityGrID.cpp:41:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:329:9: error: no member named 'isless' in the global namespace
using ::isless;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:330:9: error: no member named 'islessequal' in the global namespace
using ::islessequal;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:331:9: error: no member named 'islessgreater' in the global namespace
using ::islessgreater;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:332:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:333:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
~~^
13 errors generated.
make: *** [cigraph/src/DensityGrID.o] Error 1
ERROR: compilation Failed for package ‘lEIDenbase’
* removing ‘/library/Frameworks/R.framework/Versions/4.1/resources/library/lEIDenbase’
Warning message:
In i.p(...) :
installation of package ‘/var/folders/37/6b_9y9v11nzftf912bbhbhr00000gn/T//Rtmph3567G/file159343f7bb5fc/lEIDenbase_0.1.3.tar.gz’ had non-zero exit status
>
我使用技巧 here 编辑了 ~/.R/Makevars
文件,以将 SDK“重新链接”到 C++ 编译器。还是不行。
我也尝试过更新 Xcode,删除并重新下载 Xcode,以及删除并重新下载 Commandlinetools。
没有任何效果。
这是我当前的 ~/.R/Makevars
文件:
CC=clang
CXX=clang++
CXXFLAGS= -O3 -pedantic -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
提前感谢您的建议或解决方法。
通过将 cmath 文件中的 #include 更改为调用 #include 解决了该问题,其中 math.h 与 cmath 位于同一目录中。
以上是大佬教程为你收集整理的MacOS Big Sur M1 芯片,R devtool monocle3 安装过程中出现 cmath 错误全部内容,希望文章能够帮你解决MacOS Big Sur M1 芯片,R devtool monocle3 安装过程中出现 cmath 错误所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。