-
Notifications
You must be signed in to change notification settings - Fork 32
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 Mac OS #3
Comments
Yes I am facing the same issue. Any resolution found? |
So far no good news. I chose to run pypoisson on a linux system, which separated my code into two parts. Hope you good luck :) |
I wanted it for R tool support. So I switched to lower version of R and resolved the issues. |
I just ran into this problem, I will try to find a solution by my own. But if anyone got a solution in the meantime, I am interested :) |
find this solved my problem https://daijiang.name/en/2017/06/21/fopenmp-option-of-clang-error/ |
Same issue. |
I just tried to install the package as well from a mac. I managed to install but am still not able to run the examples. I have previously installed gcc and g++ with homebrew. Then, exporting and aliasing them, as enables me to succesfully run python setup.py build after modifying the first line of pypoisson.pyx, However, running python test.py halts to the error and so far I haven't been able to advance from here. |
I tested 5 years ago so sorry I don’t remember the last exact environment I used. |
Thanks for the quick reply! I actually just gor forward. The issue was solved by changing the line (After this, example/test.py yields segmentation fault 11, I'll check out the other issue thread) |
I believe I did with gcc 5.x version. |
Thanks for the reply! I was able to install with the above modifications, but for some reason the example segfaults (this does not change when changing e.g. depth in the program, just changes the time it takes before the segfault). |
Here's another solution I found (with clang llvm installed):
# Using compiler of clang with llvm installed
os.environ["CC"] = "/usr/local/opt/llvm/bin/clang"
os.environ["CXX"] = "/usr/local/opt/llvm/bin/clang++" # Add include/link dirs, and modify the stdlib to libc++
exts = [Extension("pypoisson", sources,
include_dirs=["/usr/local/opt/llvm/include"],
library_dirs=["/usr/local/opt/llvm/lib"],
language="c++",
extra_compile_args=["-w", "-fopenmp", '-stdlib=libc++'],
extra_link_args=["-fopenmp", '-stdlib=libc++']
)] |
I added this your code but It doen't work
|
here's what worked for me (haven't tested yet, but it compiles \o/) brew reinstall gcc
brew reinstall libomp
export CC=/usr/local/bin/gcc-10
export CXX=/usr/local/bin/g++-10 In the file // #ifdef __linux__
// hash_map<long long,int>::iterator iter;
// #elif _WIN32
// std::map<long long, int>::iterator iter;
// #endif
std::map<long long, int>::iterator iter; In the file #include <stdio.h> After that, |
...too bad, |
there are several issues here.
|
Hi there,
I tried to run order "python setup.py build" on Mac OS 10.12.3, and got the error
clang: error: unsupported option '-fopenmp'
I tried export CC=/usr/bin/gcc, gcc-6, clang or llvm-gcc, they all don't work.
for gcc-6 case, I got different error:
gcc-6: error: unrecognized command line option '-Wshorten-64-to-32'
Has anyone encountered the same issue?
Thanks,
Michael
The text was updated successfully, but these errors were encountered: