我使用的是Mac OS X Sierra,我发现clang(LLVM版本8.1.0(clang-802.0.38))不支持OpenMP:当我运行时clang -fopenmp program_name.c,我收到以下错误:
clang: error: unsupported option '-fopenmp'
似乎clang不支持-fopenmp旗帜.
我在自制软件中找不到任何openmp库.根据LLVM网站,LLVM已经支持OpenMP.但是在编译期间我找不到启用它的方法.
这是否意味着Mac中的默认clang不支持OpenMP?你能提供什么建议吗?
(当我切换到GCC编译相同的程序(使用gcc安装brew install gcc --without-multilib)时,编译成功.)
自 Big Sur 以来,安装需要在 macOS 中编译的 R 包已被破坏。这是一个这样的例子。
> install.packages('nlme')
There is a binary version available but the source version is later:
binary source needs_compilation
nlme 3.1-150 3.1-151 TRUE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
installing the source package ‘nlme’
trying URL 'https://cran.rstudio.com/src/contrib/nlme_3.1-151.tar.gz'
Content type 'application/x-gzip' length 805592 bytes (786 KB)
==================================================
downloaded 786 KB
* installing *source* package ‘nlme’ ...
** package ‘nlme’ successfully unpacked and MD5 sums checked
** using …Run Code Online (Sandbox Code Playgroud)