-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[Installation]: Can't find OpenMP headers on macOS #14034
Comments
Have you:
|
Installing with editable mode doens't help. I'll reinstall the Command Line Tools for Xcode and give a try soon.
|
Update: I reinstalled Command Line Tools for Xcode and the problem was not fixed. I searched for solutions and found that Apple Clang doesn't ship with support for "-fopenmp". For more information, see the discussion from r-project. I solved the problem by doing following two things:
We may want to remind users not to use Apple Clang in the docs. |
Which version of Apple Clang were you using? The docs say you must use version 15 or newer https://docs.vllm.ai/en/latest/getting_started/installation/cpu/index.html?device=apple#requirements |
I use version 16, you could see from the output of
|
Ah, yes I missed that. It's strange that this has never been reported before. When I have time I'll see if I can install it on my Mac. |
I did a little test with Apple Clang and brew Clang. #include <stdio.h>
#include "omp.h"
using namespace std;
int main(){
printf("%d\n", omp_get_max_threads());
} I tried with Apple Clang and got, it failed to generate executable.
Then I tried with brew Clang and successfully built the executable.
Maybe people just never use Apple Clang? |
@wallashss could you weigh in as you originally added MacOS support and documented that Apple Clang worked? |
Hey everyone, Sorry to hear you guys are having problems with the buid/install on mac os. During the development I could build for both brew LLVM and Apple Clang. However I could not make it work right with brew, and the build was insanely more complex to make. The documentation is right, the working build is for Apple Clang, which some other people could make it work as well. One of the common issue that we identified is that sometimes the environment could not find the standard libraries and the build fails, but for that just reinstall the command line tools should solve it. I had also similar problems with OpenMP like you report it. The secret sauce to make Apple Clang include OpenMP is use the Add
But I suspect that maybe on Clang 16 we have to explicit include OMP headers. This is something that might worth try, from the top of my head I don't remember the exact include. Sorry, I can't test it right now for you. |
Hi Wallashss, I tried to compile the simple OpenMP with @hmellor Seems like the only thing we need is to include the header. |
Seems that clang can't find the OpenMP headers.
Your current environment
How you are installing vllm
Before submitting a new issue...
The text was updated successfully, but these errors were encountered: