CSF icon indicating copy to clipboard operation
CSF copied to clipboard

clang: error: unsupported option '-fopenmp' on Apple MacOS Monterey

Open dluks opened this issue 2 years ago • 3 comments

Device info:

  • Macbook Pro, mid-2015, Intel processor
  • macOS Montery (12.3)

After git cloneing and cding into the python directory, running python setup.py build results in the following error:

$ python setup.py build
running build
running build_py
running build_ext
building '_CSF' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/lusk/miniconda3/envs/PointClouds/include -fPIC -O2 -isystem /Users/lusk/miniconda3/envs/PointClouds/include -I/usr/local/opt/llvm/include -I/Users/lusk/miniconda3/envs/PointClouds/include/python3.9 -c ../src/CSF.cpp -o build/temp.macosx-10.9-x86_64-3.9/../src/CSF.o -fopenmp
clang: error: unsupported option '-fopenmp'
error: command '/usr/bin/clang' failed with exit code 1

I've tried installing the homebrew gcc package and then linking gcc to use gcc-11, but the issue persists.

dluks avatar Apr 30 '22 17:04 dluks

Hi, this may be the problem of mac configuration. I never tested it with MAC. I do a simple google, maybe this is caused by the compiler clang that is from XCode. you can try to install a gcc by yourself, such as brew install gcc

jianboqi avatar May 01 '22 16:05 jianboqi

Thanks @jianboqi, but unfortunately I've already tried this. Here's what I have tried, specifically:

  1. brew install gcc
  2. export PATH=/usr/local/bin:$PATH
  3. ln -s gcc-11 gcc
  4. 'gcc -v` to confirm that I am using the new symlinked gcc

Unfortunately this still results in the same error.

dluks avatar May 02 '22 08:05 dluks

遇到同样问题

miniygq avatar May 20 '22 05:05 miniygq