在macOS Sierra上安装SPAMS

时间:2017-01-30 01:23:47

标签: c++ gcc clang

我试图安装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选项...

1 个答案:

答案 0 :(得分:0)

link Update GCC on OSX通过安装macport来安装更新版本的gcc提供了方法。它也可以通过安装homebrew并使用 brew install gcc47 从其存储库下载它来完成。不幸的是,这是我所知道的两个选项。我不会重复这个答案,因为那是愚蠢的,但是你可以在这里安装和编译你的程序,使用更新版本的gcc。希望这可以解决您的问题。