FRBs / sigpyproc3

Python3 version of Ewan Barr's sigpyproc library
https://sigpyproc3.readthedocs.io
MIT License
14 stars 11 forks source link

Compilation issues on Mac OSX #3

Closed matteobachetti closed 3 years ago

matteobachetti commented 4 years ago

python setup.py install fails on Mac OSX (10.15.6, but it should be the same in all recent versions) with

clang: error: unsupported option '-fopenmp'
error: command 'gcc' failed with exit status 1

It is easy to work around (the system's compiler is not OpenMP-enabled and one needs to point to another gcc, e.g. installed with Homebrew), but it might be good to have a recommended Mac OSX installation somewhere in the repo or the docs. I myself don't know what is the cleanest and easiest solution.

I installed fftw and a new gcc with Homebrew, and then ran

CC="/usr/local/bin/gcc-10 -I/usr/local/include -L/usr/local/lib" python setup.py install
telegraphic commented 4 years ago

in-ter-resting. Yup looks like Apple clang doesn't support libomp by default.

I think homebrew is probably the best option. Some stackoverflow notes: https://stackoverflow.com/questions/43555410/enable-openmp-support-in-clang-in-mac-os-x-sierra-mojave