Vim: Caught deadly signal ABRT
Abort trap: 6
This ticket is quite old, but since it keeps getting referenced I thought I'd give some insight in how to use YCM with vim compiled from MacPorts (same probably applies to Homebrew). As previously noted in this ticket, building YCM against a different Python version than vim itself can cause problems.
We can switch the version of Python used by YCM in a few spots:
- At load time using
DYLD_FORCE_FLAT_NAMESPACEworks at the same point in time. While those might work depending on your current configuration they rely on system Python and whatever custom Python you have to be binary compatible.
- After building using
install_name_toolto swap the Python library being referenced by the loadable module (or even worse, the MacVim binary). This will also only work, if the Python implementations being swapped are binary compatible.
- At compile time using the
cmake. This is advisable, because it will actually use the set of headers that will match the library that will later be used, rather than replacing the library later and hoping the headers will be compatible with the swapped library.
YCM actually tries hard to get this right using
function python_finder in
install.sh. This will, however, not work correctly, if your custom
configtool is not in
$PATH when installing YCM. For MacPorts, you should
sudo port select --set python python27 (or whatever version you used to
compile vim) to fulfill this requirement. If you want to restore your previous
setting afterwards, check what it was using
port select --list python (it's
the one marked active).
If you got Python installed using Homebrew, before doing YouCompleteMe installation, unlink it
brew unlink python
然后再 build 一遍。
在重新安装过 YCMD 之后重现这个问题，解决方法就是和上面的一样，不过之前没说清楚，正确是应该是：
brew unlink python
然后重新 build 一遍 YCMD，而不是 VIM！！！