相关疑难解决方法(0)

在Mac OS X(sierra&Mojave)中的clang中启用OpenMP支持

我使用的是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)时,编译成功.)

macos openmp llvm clang

14
推荐指数
3
解决办法
1万
查看次数

clang-7:错误:链接器命令失败,macOS Big Sur 的退出代码为 1

自 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)

macos r clang macos-big-sur

11
推荐指数
1
解决办法
4272
查看次数

标签 统计

clang ×2

macos ×2

llvm ×1

macos-big-sur ×1

openmp ×1

r ×1