2015年3月4日 星期三

YouCompleteMe on Debian Wheezy

reference : http://povilasb.com/vim/you_complete_me.html

Installation on Debian Wheezy

  1. Follow Ubuntu Linux x64 super-quick installation. It will install YouCompleteMe plugin which downloads libclang.so. Unfortunately the downloaded library depends on glibc 2.14 while Debian Wheezy comes with glibc 2.13.
  2. Get libclang.so library built for Debian Wheezy. It’s in libclang1-3.5 package:
    $ echo "deb http://llvm.org/apt/wheezy/ llvm-toolchain-wheezy main" >> /etc/apt/sources.list
    $ echo "deb-src http://llvm.org/apt/wheezy/ llvm-toolchain-wheezy main" >> /etc/apt/sources.list
    $ sudo apt-get update
    $ sudo apt-get install libclang1-3.5
  3. Put libclang.so to ~/.vim/bundle/YouCompleteMe/third_party/ycmd:
    $ cd ~/.vim/bundle/YouCompleteMe/third_party/ycmd
    $ ln -s /usr/lib/x86_64-linux-gnu/libclang-3.5.so.1 libclang.so
  4. That’s it. YouCompleteMe should work on Debian Wheezy.

Debugging

Enable YouCompleteMe logging by putting this in vimrc:
let g:ycm_server_keep_logfiles = 1
let g:ycm_server_log_level = 'debug'
Then open vim and enter :YcmDebugInfo command. It should print the log file paths:
Printing YouCompleteMe debug information...
-- Server crashed, no debug info from server
-- Server running at: http://127.0.0.1:50740
-- Server process ID: 9217
-- Server logfiles:
--   /tmp/ycm_temp/server_50740_stdout.log
--   /tmp/ycm_temp/server_50740_stderr.log

沒有留言: