首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >R devtool monocle3安装过程中出现MacOS Big Sur M1硅,cmath错误

R devtool monocle3安装过程中出现MacOS Big Sur M1硅,cmath错误
EN

Stack Overflow用户
提问于 2021-06-29 02:17:03
回答 1查看 245关注 0票数 2

我正在尝试在M1硅MacOS Big Sur 11.4上的Rstudio (R版本4.1.0)中安装Monocle3 (here),使用:

代码语言:javascript
复制
devtools::install_github('cole-trapnell-lab/leidenbase')

我得到了这个错误消息,这使它看起来像是cmath头不工作。

代码语言:javascript
复制
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, _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
> 

我已经编辑了~/.R/Makevars文件使用技巧here“重新链接”到C++编译器。还是不能工作。

我还尝试了更新Xcode,删除并重新下载Xcode,以及删除并重新下载CommandLineTools。

什么都不起作用。

这是我当前的~/.R/Makevars文件:

代码语言:javascript
复制
CC=clang
CXX=clang++
CXXFLAGS= -O3 -pedantic -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

提前感谢您的建议或变通方法。

EN

回答 1

Stack Overflow用户

发布于 2021-06-30 04:43:28

已通过以下方法解决此问题:将cmath文件中的#include<>更改为调用#include<\Full\path\here\to\math.h>,其中math.h与cmath位于同一目录中。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68168291

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档