【问题标题】:Installing SPAMS on macOS Sierra在 macOS Sierra 上安装垃圾邮件
【发布时间】:2017-06-15 03:14:39
【问题描述】:

我试图安装SparseModelingSoftware,它最初给了我这个错误:

clang: error: unsupported option '-fopenmp'

谷歌搜索后,我重新安装了 gcc 并导出 CC 和 CXX 以指向 /usr/local/bin/gcc-6 和 /usr/local/bin/g++-6

但它仍然会给我这个错误:

spams/linalg/linalg.h:1680:10: error: expected '(' before 'isnan'
   if isnan(lambda) {

所以我去了那个 linalg.h 文件并添加了一些括号,但是它给了我这个错误:

   spams/decomp/decomp.h:2602:6: internal compiler error: Segmentation fault: 11
 void coreGroupIST(const Matrix<T>& G, Matrix<T>& RtDm,
      ^~~~~~~~~~~~
spams/decomp/decomp.h:2602:6: internal compiler error: Abort trap: 6
gcc-6: internal compiler error: Abort trap: 6 (program cc1plus)

现在我不知道如何进行。我在网上也找不到其他东西。根本问题似乎是macOS的gcc实际上指向了clang。但是Xcode自带的版本太旧了,没有fopenmp选项……

【问题讨论】:

    标签: c++ gcc clang


    【解决方案1】:

    linkUpdate GCC on OSX 提供了通过安装 macports 来安装更新版本的 gcc 的方法。也可以通过安装 homebrew 并使用 brew install gcc47 从他们的存储库下载它来完成。不幸的是,这是我所知道的仅有的两个选择。我不会重新粘贴答案,因为那很愚蠢,但是在这里您可以使用较新版本的 gcc 安装和编译您的程序。希望这能解决您的问题。

    【讨论】:

      猜你喜欢
      • 2017-05-05
      • 1970-01-01
      • 1970-01-01
      • 2018-12-05
      • 2017-05-30
      • 1970-01-01
      • 1970-01-01
      • 2017-12-11
      • 2017-04-19
      相关资源
      最近更新 更多