Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dluks opened this issue Apr 30, 2022 · 3 comments
Open

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

dluks opened this issue Apr 30, 2022 · 3 comments

Comments

@dluks
Copy link

dluks commented Apr 30, 2022

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.

@jianboqi
Copy link
Owner

jianboqi commented May 1, 2022

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

@dluks
Copy link
Author

dluks commented May 2, 2022

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.

@miniygq
Copy link

miniygq commented May 20, 2022

遇到同样问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants