0

I was trying to install the SparseModelingSoftware and it initially gave me this error:

clang: error: unsupported option '-fopenmp'

After googling around I reinstalled gcc and exported CC and CXX to point to /usr/local/bin/gcc-6 and /usr/local/bin/g++-6

But it would still give me this error:

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

So I went to that linalg.h file and added some parenthesis, but then it gave me this error:

   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)

Now I have no idea how to proceed. I couldn't find anything else online either. The root problem seems to be that macOS's gcc actually points to clang. But the version that came with Xcode is too old and doesn't have the fopenmp option...

cactus
  • 81
  • 1
  • 2

1 Answers1

0

This link Update GCC on OSX provides the means via installing macports to install a newer version of gcc. It can also be accomplished by installing homebrew and downloading it from their repositories with brew install gcc47. Unfortunately these are the only two options I know of. I won't repaste the answer because that is stupid, but here you have the answer to install and compile your program with a newer version of gcc. Hope this fixes your problem.

Community
  • 1
  • 1
chevydog
  • 123
  • 7