-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Installing YCM with Yosemite and brew vim #1136
Comments
Since you just want to change the cmake args the build process uses, you can set the This would work for your use-case:
Sadly you can't have both python2 and python3 support compiled into Vim. Since basically all Vim plugins that use Python use python2, that's what you should use. Thanks for posting your experience; people coming from Google will appreciate it. Closing issue. |
Thanks for the quick reply @Valloric! :) One thing that I should point out is that I tried to initially use this:
But it fails to build. |
I don't remember the details, but I doubt you can set both USE_SYSTEM_LIBCLANG and EXTERNAL_LIBCLANG_PATH; such a combination of flags doesn't really make any sense. One says "go look for the libclang in system dirs" while the other says "use this libclang I gave you." They can't both work at the same time. |
Sorry to revive this, but on Yosemite final build, I tried to:
and
and I get
Editing Hope it helps someone out there (and hopefully have this issue fixed soon 👍 ) |
I think I found the reason why |
Sure, as soon as I arrive home I'll do it! Thank you for taking your time and looking into this :D |
It works! Removing that comma did the trick! 😁 |
Thanks a lot TheZoc. I finally got it to work with your instructions! |
@mbarakatt Glad it helped you :) |
It could actually be many things. Initially I ran into the ycm server crashing. Then played around, but only made it worst, I was getting vim to crash when it launched ('error' 6 or something like that ) . My guess is that is was probably linked with libclang and the fact that I just switched to yosemite. Had to reinstall the Command line tools.. |
Hello,
This isn't really an issue (maybe except for build.sh search path, noted below), but I'd like to share the process I used to install a working YCM with the homebrew version of vim and system clang.
I didn't manage to get it to work with the default installation parameters, so, I thought this might help some people out there.
This isn't a step by step on how I figured out what I need to do, but rather a streamlined version of how to get everything working.
When trying to run:
./install.sh --clang-completer --omnisharp-completer
, it downloads clang 3.4 and the installation fails.Also, trying to run
./install.sh --clang-completer --omnisharp-completer --system-libclang
fails because it can't findlibclang.dylib
Lets get some info:
It exists. So, this shouldn't be a problem. Also, lets check the version of system clang:
It's newer than the required version, it's supposed to work fine.
So, you need to modify the file:
~/.vim/bundle/YouCompleteMe/third_party/ycmd/build.sh"
and change the line:
cmake_args="$cmake_args -DUSE_SYSTEM_LIBCLANG=ON"
to:
cmake_args="$cmake_args -DEXTERNAL_LIBCLANG_PATH=/Library/Developer/CommandLineTools/usr/lib/libclang.dylib"
. Please note that this change is the output ofmdfind -name libclang.dylib
.Note: I noticed that
build.sh
search for the lib in that path. Still, it didn't find it. I'm not sure why.Installing now works flawlessly.
Last but not least, my vim was installed with python3 support. I had to replace it with python (2.x) support.
I really would like to keep it supporting python3, but I'm happy trading that for an IntelliSense-like functionality.
(Hopefully a future version of YCM will support both versions of python)
So the entire process to get YCM working with homebrew's vim + Yosemite would be:
I also did in this step:
Okay, so at this point you install YCM through Vundle. Once it's done, edit
~/.vim/bundle/YouCompleteMe/third_party/ycmd/build.sh"
with above changesThen run:
And you're done!
Please note that
run_tests.sh
will still fail to find the correct dylib.I hope this helps someone out there!
Also, I'd love to ask to @Valloric - What's the correct way of fixing build.sh so it searches for the correct dylib automatically, instead of doing this modification of build.sh?
Thank you for your excellent work on YCM! 😀
The text was updated successfully, but these errors were encountered: