-
Notifications
You must be signed in to change notification settings - Fork 768
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
Compilation errors with --system-libclang on macOS Mojave #1141
Comments
Your system libclang is too old. Ycmd requires clang 7. |
@puremourning Thank you for diagnosing the problem! For anyone else running into the same problem -- my solution was to point ycmd to the LLVM version installed by Homebrew. The key is to prefix the For example, I currently use the following. EXTRA_CMAKE_ARGS="-DEXTERNAL_LIBCLANG_PATH=$(brew --prefix llvm)/lib/libclang.dylib" \
python3 ./build.py --clang-completer --go-completer --rust-completer |
@pwnall thank you, except id you mean |
install.py is a wrapper in YouCompleteMe for build.py which is in ycmd |
When using @pwnall recommendation, it compiles, but still getting strange errors. As per issue ycm-core/YouCompleteMe#3283, I added custom include directories:
now the
It works just fine in Ubuntu 18.04, so I wonder if I should give up and use VirtualBox? Using VBox feels awkward. |
Figured it out, with new Mac, you have to:
Brand new Mac requires header installation for C++ development. |
That’s an option. Apple removed the headers from system frameworks in Mojave (for unknowable reasons). Running the above reinstalls them. A PR is coming in ycmd which makes this not required anymore. |
In my case the problem was solved by going with |
I've been using It looks like 187e836 in In my case, even if I fix the compilation issue in |
Are you saying that the latest YCM doesn't work for iOS projects ? You no longer need to use If it's not working, then could you raise an issue with a full repro case that we can test/confirm? We'd like to fix it. |
For the record, i'm pretty sure we tested it with this: https://github.com/puremourning/YCMTest-iOS. We should probably add some sort of iOS test to our regression suite I suppose. |
Just double checked but unfortunately it doesn't work for me. (building https://github.com/glimpse-project/glimpse)
That will also end up creating a Here's a minimal snippit from compile_commands.json:
I can open a separate issue. |
To begin, I acknowledge that
--system-libclang
is unsupported, and I'm grateful for any help you might be able to give.I've needed
--system-libclang
on macOS since I started using ycmd (10.11 or 10.12). It's been letting me do my work around Chromium, and I've been having a pretty good experience. After upgrading to Mojave (10.14.0 / 10.14.1), I haven't been able to build ycmd with--system-libclang
-- I keep getting the error below.I am able to build ycmd without
--system-libclang
, but when I do that, I can't find C++ system libraries like<memory>
,<string>
and<vector>
. (I've seen a fair number of issues pointing to that problem, and I can't figure out which one is canonical. I hope it's OK to not link to a particular issue, but I'm happy to point one out of it's helpful.)The text was updated successfully, but these errors were encountered: