-
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
Issue with building YCM with semantic support on Mac OS X 10.7 #112
Comments
Start by installing the latest Xcode plus the Command Line Tools from within Xcode. Then try again. |
This seems to be somewhat related to #93 |
As per Valloric's suggestion, I updated XCode and the CLT from within XCode - compilation was done without a hitch!
However, when I launched Vim after that, it immediately crashed:
Just to be sure, I reinstalled YCM through Vundle (after doing rm -rf * for that directory), and then re-ran the build - exact same result. Do let me know if any additional info (specs/debug builds/core dumps as needed, I'll be happy to attach them!) |
Additional info:
|
Try to start Vim under gdb/lldb; that should show you more details about the crash. |
Output from gdb (version 6.3, installed by default in /usr/bin):
I'm not sure why its showing a version mismatch, seeing that it correctly detected python during installation. FWIW, here's the version used by defult on my system:
|
I got more info on this, using gdb 7.5 that I updated today via MacPorts:
It seems to me that while loading, YCM is somehow trying to use Python 2.6 in /System/Library..., though why it is doing so, and how to dissuade it from doing so, I'm not really sure - hope this helps! |
Sorry I don't know how to help you with this. You've got it tracked down, Vim is loading one version of Python while you've got YCM compiled against a different version. Where did you get your Vim binary? Are you using MacVim? |
Yes, as specified in the installation instructions, I'm using MacVim:
Any ideas as to what flags one can use to point to the python version to be used, or any hacks (such as symlinking the python library/binary in the YCM python folder) that can be applied? I do want to make this work, and would appreciate any help you can provide! |
Try passing the following to cmake; don't forget to always fully delete everything in your build folder before changing something in the cmake call.
|
Closing since no further info provided by issue reporter. |
@Valloric
With that, I'm getting the following issue:
I then pulled the latest release of YCM, which supposedly has this automated (inside install.sh), but I still get the same abort with same call stack: Installation log:
Call stack on abort:
Do you want me to |
shan23, See: Homebrew/legacy-homebrew#17908 Also, from that output it looks like both MacVim and YouCompleteMe found Python in your system path, which is fine. However YouCompleteMe used 2.7 and MacVim is using 2.6. What is the output of:
If its 2.7 then you need to recompile MacVim. |
@xgalaxy |
YouCompleteMe and MacVim need to be compiled targeting the same Python version. If MacVim is targeting 2.6 then you need to force YouCompleteMe to target 2.6. Run:
This will tell you exactly which Python it was linked against. Then you can run the same command on the ycm_cor.so and see exactly which Python it was linked against. If they aren't the same you will continue to get this error. Here is mine:
|
Hmmm - does that mean I'll have to employ the somewhat "dirty" solution mentioned here, each time I want to build/update YCM? Just wanted to confirm if
|
Again, please do the below commands and the ones I've given you and note their output here. Otherwise we are just guessing.
and
And tell us what those say. |
It seems I've to force YCM to use 2.6, or get a new MacVim compiled with 2.7... |
Yes. All YCM can do is guess as to which the best Python would be to use based on the currently active Python version, as found via python-config --prefix. Another option is to improve the install script for YCM further by prompting the user to choose a Python version to compile against or provide an additional optional argument to force a version. I could probably find the time to add the additional optional argument to the install script some time later this week. |
@xgalaxy But yeah, having a fix would definitely be nice, either using otool or the cmdline option to force python version... |
@xgalaxy I support the possible additional argument for the install script that lets the user choose a version of Python to compile against. I'd gladly merge that in. @shan23 I'd like to address why I closed this issue. First, don't take the issue status too seriously; open issues are merely those for which I think I still need to do something. If I think there's nothing more to do, I close it. I've often encountered issue reports where I give the reporter instructions on how to fix his problem and then he resolves it, but never comes back to say "everything works" and close the issue. Thus when there have been a few days of inactivity by the reporter, I close the issue so it doesn't obscure my TODO list. It can always easily be reopened if need be. I'm glad to see you got this resolved. BTW, my output for
Which shows MacVim linking against Python 2.7. I'm on Mac OS X 10.8.2 and using the latest upstream MacVim binary. |
…ed-info Add additionial class information to gocode completion data
I'm trying to install YCM on my MBP running Mac OS X 10.7. I'm using MacVim and have installed YCM using Vundle, as described in the installation instructions. The CMake I'm using was installed via MacPorts. Here is the output I'm getting when trying to build:
The error seems weird, as the log seems to indicate it had got a "good enough" libclang to use, but then it errored while trying to use an external libclang for some reason! I tried the following:
Use the flag -DEXTERNAL_LIBCLANG_PATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib in install.sh (as the following lines):
Even that produced the same error! Let me know what else I can do to resolve this, and feel free to request additional info for helping solve it!
The text was updated successfully, but these errors were encountered: